zevairouter 1.0.190 → 1.0.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -9
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
- package/cli/app/.next-cli-build/required-server-files.json +2 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -9
- package/cli/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1131.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1998.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2760.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/3675.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/3696.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3999.js +24 -0
- package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4566.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4621.js +45 -0
- package/cli/app/.next-cli-build/server/chunks/4720.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/{8242.js → 4721.js} +2 -2
- package/cli/app/.next-cli-build/server/chunks/4803.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5295.js +51 -0
- package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/{318.js → 5330.js} +3 -3
- package/cli/app/.next-cli-build/server/chunks/5436.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5470.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5800.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/5846.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/6103.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/6252.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/6492.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/7239.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7250.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/{3155.js → 7276.js} +2 -52
- package/cli/app/.next-cli-build/server/chunks/7319.js +471 -0
- package/cli/app/.next-cli-build/server/chunks/7464.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/7688.js +4 -0
- package/cli/app/.next-cli-build/server/chunks/7726.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8062.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8274.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8469.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8666.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8895.js +6 -6
- package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9048.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/cli/app/.next-cli-build/server/instrumentation.js +1 -0
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/cli/app/.next-cli-build/static/chunks/620-249977f9b2e0b7fa.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-e5efdecc55c42601.js → page-5482865f680033fb.js} +2 -2
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-2b460c956a7f0a30.js +1 -0
- package/cli/app/.next-cli-build/static/css/da8bb26878f01d92.css +1 -0
- package/cli/app/CHANGELOG.md +11 -0
- package/cli/app/package.json +1 -1
- package/cli/package.json +1 -1
- package/package.json +1 -1
- package/cli/app/.next-cli-build/server/chunks/1188.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/1818.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/2693.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/6457.js +0 -4
- package/cli/app/.next-cli-build/server/chunks/8590.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/877.js +0 -24
- package/cli/app/.next-cli-build/server/chunks/9071.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/9621.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/620-7016f473d3f50f28.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-465deae43bb4635c.js +0 -1
- package/cli/app/.next-cli-build/static/css/934d7e4bee6b9fa0.css +0 -1
- /package/cli/app/.next-cli-build/static/{oU2ATjp7Ko7FfQ5eQHM8x → EEihXestozORJ8znRIdjp}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{oU2ATjp7Ko7FfQ5eQHM8x → EEihXestozORJ8znRIdjp}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=2693,exports.ids=[2693],exports.modules={42693:(a,b,c)=>{c.d(b,{$O:()=>k,AUTOCLAW_WALLET_ENDPOINT:()=>i,Cw:()=>g,VR:()=>h,_V:()=>j,buildAutoClawWalletHeaders:()=>m,df:()=>e,p8:()=>l});var d=c(55511);let e="100003",f="https://autoglm-api.autoglm.ai",g=`${f}/autoclaw-proxy/proxy/autoclaw`,h=`${f}/userapi/v1/refresh`,i=`${f}/agent-assetmgr/api/v2/wallets?biz_app_id=autoclaw`,j="1.10.0";function k(a){let b=`${e}&${a}&38d2391985e2369a5fb8227d8e6cd5e5`;return(0,d.createHash)("md5").update(b).digest("hex")}function l(a={}){let b=String(Math.floor(Date.now()/1e3));return{accept:"*/*","content-type":"application/json",origin:"https://autoclaw.z.ai",referer:"https://autoclaw.z.ai/","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36","x-auth-appid":e,"x-auth-timestamp":b,"x-auth-sign":k(b),"x-product":"autoclaw","x-version":j,"x-tm":"web","x-channel":"official","x-client-type":"web","x-trace-id":(0,d.randomUUID)(),"x-lang":"zh-CN",...a}}function m(a){let b=String(a||"").replace(/^Bearer\s+/i,"");return l({authorization:`Bearer ${b}`})}}};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6457,exports.ids=[6457],exports.modules={66457:(a,b,c)=>{c.d(b,{rI:()=>a7,cw:()=>a5,Lh:()=>a4,Z2:()=>as,Lx:()=>a8,DA:()=>a6,u7:()=>a3,rH:()=>a_,Rg:()=>ag,mh:()=>a$,cb:()=>af,Al:()=>L,jd:()=>o,Dd:()=>J,oN:()=>aY,H4:()=>a0,Qn:()=>aa,Jv:()=>ah,A1:()=>aI,nN:()=>S,xh:()=>aB,a$:()=>aD,Kp:()=>aE,hp:()=>aF,ss:()=>R,C7:()=>m,X$:()=>ac});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(49120);let i=g().join(h.DATA_DIR,"tunnel"),j=g().join(i,"state.json"),k="abcdefghijklmnpqrstuvwxyz23456789";function l(){e().existsSync(i)||e().mkdirSync(i,{recursive:!0})}function m(){try{if(e().existsSync(j))return JSON.parse(e().readFileSync(j,"utf8"))}catch{}return null}function n(a){l(),e().writeFileSync(j,JSON.stringify(a,null,2))}function o(){let a="";for(let b=0;b<6;b++)a+=k.charAt(Math.floor(Math.random()*k.length));return a}var p=c(55591),q=c.n(p),r=c(21820),s=c.n(r),t=c(79646),u=c(15754);let v=g().join(i,"cloudflared.pid"),w=/cloudflared/i;function x(){return(0,u.resolveVerifiedPid)(v,{commandPattern:w}).pid}function y(){(0,u.removePidFile)(v)}let z=g().join(h.DATA_DIR,"bin"),A="cloudflared",B="win32"===s().platform(),C=B?`${A}.exe`:A,D=g().join(z,C),E="http2",F=new Set(["http2","quic","auto"]),G={darwin:{x64:"cloudflared-darwin-amd64.tgz",arm64:"cloudflared-darwin-arm64.tgz"},win32:{x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-386.exe"},linux:{x64:"cloudflared-linux-amd64",arm64:"cloudflared-linux-arm64"}},H={darwin:"cloudflared-darwin-amd64.tgz",win32:"cloudflared-windows-386.exe",linux:"cloudflared-linux-amd64"},I={downloading:!1,progress:0};function J(){return{downloading:I.downloading,progress:I.progress}}let K=null;async function L(){return K||(K=M().finally(()=>{K=null}))}async function M(){e().existsSync(z)||e().mkdirSync(z,{recursive:!0});let a=`${D}.tmp`;if(e().existsSync(a))try{e().unlinkSync(a)}catch{}if(e().existsSync(D))if(function(a){try{if(e().statSync(a).size<1048576)return!1;let b=e().openSync(a,"r"),c=Buffer.alloc(4);e().readSync(b,c,0,4,0),e().closeSync(b);let d=c.toString("hex");if(B)return d.startsWith("4d5a");if("darwin"===s().platform())return d.startsWith("cffaedfe")||d.startsWith("cefaedfe");return d.startsWith("7f454c46")}catch{return!1}}(D))return B||e().chmodSync(D,"755"),D;else console.log("[cloudflared] Invalid binary detected, re-downloading..."),e().unlinkSync(D);let b=function(){let a=s().platform(),b=s().arch(),c=G[a];if(!c)throw Error(`Unsupported platform: ${a}`);let d=c[b]||H[a];return`https://github.com/cloudflare/cloudflared/releases/latest/download/${d}`}(),c=b.endsWith(".tgz"),d=c?g().join(z,"cloudflared.tgz.tmp"):a;return await function a(b,c){return new Promise((d,f)=>{let g=e().createWriteStream(c);q().get(b,b=>{if([301,302,303,307,308].includes(b.statusCode)){g.close(),e().unlinkSync(c),a(b.headers.location,c).then(d).catch(f);return}if(200!==b.statusCode){g.close(),e().unlinkSync(c),f(Error(`Download failed with status ${b.statusCode}`));return}let h=parseInt(b.headers["content-length"],10)||0,i=0;I.downloading=!0,I.progress=0,b.on("data",a=>{i+=a.length,h>0&&(I.progress=Math.round(i/h*100))}),b.pipe(g),g.on("finish",()=>{I.downloading=!1,I.progress=100,g.close(()=>d(c))}),g.on("error",a=>{I.downloading=!1,I.progress=0,g.close(),e().unlinkSync(c),f(a)})}).on("error",a=>{I.downloading=!1,I.progress=0,g.close(),e().existsSync(c)&&e().unlinkSync(c),f(a)})})}(b,d),c?((0,t.execSync)(`tar -xzf "${d}" -C "${z}"`,{stdio:"pipe",windowsHide:!0}),e().unlinkSync(d)):e().renameSync(d,D),B||e().chmodSync(D,"755"),D}let N=null,O=null,P=!1;async function Q(a,b){var c;let d=await L(),f=e().mkdtempSync(g().join(s().tmpdir(),"cloudflared-quick-")),h=g().join(f,"config.yml");e().writeFileSync(h,"# quick-tunnel config placeholder\n","utf8");let i=!1,j=()=>{if(!i){i=!0;try{e().rmSync(f,{recursive:!0,force:!0})}catch(a){}}},k=String(process.env.TUNNEL_TRANSPORT_PROTOCOL||process.env.CLOUDFLARED_PROTOCOL||E).trim().toLowerCase(),m=F.has(k)?k:E,n=(0,t.spawn)(d,["tunnel","--url",`http://127.0.0.1:${a}`,"--config",h,"--no-autoupdate","--retries","99"],{detached:!1,windowsHide:!0,cwd:s().tmpdir(),env:{...process.env,TUNNEL_TRANSPORT_PROTOCOL:m},stdio:["ignore","pipe","pipe"]});return N=n,c=n.pid,l(),(0,u.writePidFile)(v,c,{kind:"cloudflared"}),new Promise((c,d)=>{let e=!1,f="",g=setTimeout(()=>{e||(e=!0,j(),d(Error(`Quick tunnel timed out. Last log: ${f.slice(-800)||"(empty)"}`)))},9e4),h=null,i=a=>{let d=a.toString();f=(f+d).slice(-4e3);let i=function(a){let b=[];for(let c of a.matchAll(/https:\/\/([a-z0-9-]+)\.trycloudflare\.com/gi)){let a=c[1];"api"!==a&&b.push(`https://${a}.trycloudflare.com`)}return b.length?b[b.length-1]:null}(d);if(i){if(!e){e=!0,h=i,clearTimeout(g),j(),console.log(`[Tunnel] cloudflared URL: ${i}`),c({child:n,tunnelUrl:i});return}i!==h&&(console.log(`[Tunnel] cloudflared URL changed: ${i}`),h=i,b&&b(i))}};n.stdout.on("data",i),n.stderr.on("data",i),n.on("error",a=>{e||(e=!0,clearTimeout(g),j(),d(a))}),n.on("exit",(b,c)=>{if(N=null,y(),P){P=!1,clearTimeout(g),j(),e||(e=!0,d(Error("cloudflared killed")));return}if(console.log(`[Tunnel] cloudflared exit code=${b} signal=${c}`),!e){e=!0,clearTimeout(g),j();let c=f.slice(-600).trim()||"(empty)";1===b?d(Error(`cloudflared quick tunnel exited (code 1). Common causes: (1) outbound port 7844 (TCP/UDP) blocked, (2) TryCloudflare service issue, (3) cannot reach 127.0.0.1:${a}, (4) protocol (http2/quic) blocked by network. Last log: ${c}`)):2===b?d(Error(`cloudflared exited (code 2). Bad arguments. Last log: ${c}`)):d(Error(`cloudflared exited (code ${b}). Last log: ${c}`));return}O&&O(),j()})})}function R(a){let b=!!N,c=!1;if(N){try{N.kill()}catch(a){}N=null}let d=x();if(d){try{process.kill(d),c=!0}catch(a){}y()}if(a)try{if(B){let b=`Get-CimInstance Win32_Process -Filter \\"Name='cloudflared.exe'\\" | Where-Object { $_.CommandLine -match ':${a}(\\D|$)' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }`;(0,t.execSync)(`powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command "${b}"`,{stdio:"ignore",windowsHide:!0})}else(0,t.execSync)(`pkill -f "cloudflared.*:${a}([^0-9]|$)" 2>/dev/null || true`,{stdio:"ignore",windowsHide:!0})}catch(a){}P=b||c}function S(){let a=x();if(!a)return!1;try{return process.kill(a,0),!0}catch(a){return!1}}var T=c(14985),U=c.n(T);let V=new(U()).promises.Resolver;async function W(a,b){let c=a=>Promise.race([a(),new Promise((a,c)=>setTimeout(()=>c(Error("dns timeout")),b))]).then(()=>!0).catch(()=>!1);return!!await c(()=>V.resolve4(a))||c(()=>U().promises.resolve4(a))}V.setServers(["1.1.1.1","1.0.0.1","8.8.8.8"]);let X=process.env.TUNNEL_WORKER_URL||"https://abc-tunnel.us";async function Y(a){let b;if(!a)return!1;try{b=new URL(a).hostname}catch{return!1}if(!await W(b,2e3))return!1;try{return(await fetch(`${a}/api/health`,{signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function Z(a,b={cancelled:!1}){let c=Date.now();for(;Date.now()-c<6e4;){if(b.cancelled)throw Error("cancelled");if(await Y(a))return!0;await new Promise(a=>setTimeout(a,2e3))}throw Error("Health check timeout after 60000ms")}var $=c(89718);let _={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null};function aa(){return _}let ab=null;function ac(a){ab=a}async function ad(a,b){await fetch(`${X}/api/tunnel/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shortId:a,tunnelUrl:b})})}function ae(a){if(a.cancelled)throw Error("tunnel cancelled")}async function af(a=1997){console.log(`[Tunnel] enable start (port=${a})`),_.cancelToken={cancelled:!1},_.activeLocalPort=a,_.spawnInProgress=!0;let b=_.cancelToken;try{if(S()){let a=m();if(a?.tunnelUrl&&a?.shortId){let b=`https://r${a.shortId}.abc-tunnel.us`,[c,d]=await Promise.all([Y(a.tunnelUrl),Y(b)]);if(c&&d)return console.log(`[Tunnel] already running, reuse: ${a.tunnelUrl}`),{success:!0,tunnelUrl:a.tunnelUrl,shortId:a.shortId,publicUrl:b,alreadyRunning:!0};console.log(`[Tunnel] stale (direct=${c} public=${d}), respawn`)}}R(a),console.log("[Tunnel] killed existing cloudflared"),ae(b);let c=m(),d=c?.shortId||o(),e=async a=>{b.cancelled||(console.log(`[Tunnel] url updated: ${a}`),await ad(d,a),n({shortId:d,tunnelUrl:a}),await (0,$.Xx)({tunnelEnabled:!0,tunnelUrl:a}))};O=()=>{console.warn("[Tunnel] cloudflared exited unexpectedly, scheduling respawn"),ab&&ab()};let{tunnelUrl:f}=await Q(a,e);console.log(`[Tunnel] spawned: ${f}`),ae(b);let g=`https://r${d}.abc-tunnel.us`;return await ad(d,f),n({shortId:d,tunnelUrl:f}),await (0,$.Xx)({tunnelEnabled:!0,tunnelUrl:f}),console.log(`[Tunnel] registered shortId=${d} publicUrl=${g}`),await Z(g,b),console.log("[Tunnel] public URL healthy"),await Y(f)?console.log("[Tunnel] direct URL healthy"):console.warn("[Tunnel] direct URL not reachable yet, continuing via publicUrl"),console.log("[Tunnel] enable success"),{success:!0,tunnelUrl:f,shortId:d,publicUrl:g}}catch(a){throw/cloudflared killed|tunnel cancelled/.test(a.message)||console.error(`[Tunnel] enable error: ${a.message}`),a}finally{_.spawnInProgress=!1}}async function ag(){console.log("[Tunnel] disable"),_.cancelToken.cancelled=!0,O=null;try{R(_.activeLocalPort)}catch(a){console.warn(`[Tunnel] kill warn: ${a.message}`)}y();let a=m();return a&&n({shortId:a.shortId,tunnelUrl:null}),await (0,$.Xx)({tunnelEnabled:!1,tunnelUrl:""}),_.spawnInProgress=!1,_.activeLocalPort=null,{success:!0}}async function ah(){let a=!0===(await (0,$.mt)()).tunnelEnabled,b=m(),c=b?.shortId||"",d=c?`https://r${c}.abc-tunnel.us`:"",e=b?.tunnelUrl||"",f=!!a&&S();return{enabled:a&&f,settingsEnabled:a,tunnelUrl:e,shortId:c,publicUrl:d,running:f}}var ai=c(55511),aj=c.n(ai),ak=c(28354),al=c(66936);let am=(0,ak.promisify)(t.exec),an=g().join(h.DATA_DIR,"bin"),ao="darwin"===s().platform();s().platform();let ap="win32"===s().platform(),aq=g().join(an,ap?"tailscale.exe":"tailscale"),ar=g().join(h.DATA_DIR,"tailscale"),as=g().join(ar,"tailscaled.sock"),at=ap?[]:["--socket",as],au="C:\\Program Files\\Tailscale\\tailscale.exe",av=["/usr/local/bin/tailscale","/opt/homebrew/bin/tailscale","/usr/bin/tailscale"],aw={value:void 0,fetchedAt:0,refreshing:!1},ax={value:!1,fetchedAt:0,refreshing:!1},ay={value:null,port:null,fetchedAt:0,refreshing:!1};function az(){return e().existsSync(aq)?aq:ap&&e().existsSync(au)?au:!ap&&av.find(a=>e().existsSync(a))||null}function aA(){return Date.now()-aw.fetchedAt>1e4&&(aw.refreshing||(aw.refreshing=!0,am(ap?"where tailscale 2>nul":"which tailscale 2>/dev/null",{windowsHide:!0,timeout:1500}).then(({stdout:a})=>{aw.value=a.trim()||az()}).catch(()=>{aw.value=az()}).finally(()=>{aw.fetchedAt=Date.now(),aw.refreshing=!1}))),void 0===aw.value&&(e().existsSync(aq)?aw.value=aq:ap&&e().existsSync(au)?aw.value=au:ap?aw.value=null:aw.value=av.find(a=>e().existsSync(a))||null),aw.value}function aB(){return null!==aA()}function aC(...a){return[...at,...a]}function aD(){let a=aA();if(!a)return!1;try{let b=(0,t.execSync)(`"${a}" ${at.join(" ")} status --json`,{encoding:"utf8",windowsHide:!0,env:{...process.env,PATH:aJ},timeout:5e3}),c=JSON.parse(b);return"Running"===c.BackendState&&c.Self?.Online===!0}catch(a){return!1}}function aE(){return Date.now()-ax.fetchedAt>1e4&&function(){if(ax.refreshing)return;let a=aA();if(!a){ax.value=!1,ax.fetchedAt=Date.now();return}ax.refreshing=!0,am(`"${a}" ${at.join(" ")} funnel status --json`,{windowsHide:!0,timeout:1500}).then(({stdout:a})=>{try{let b=JSON.parse(a);ax.value=Object.keys(b.AllowFunnel||{}).length>0}catch{ax.value=!1}}).catch(()=>{ax.value=!1}).finally(()=>{ax.fetchedAt=Date.now(),ax.refreshing=!1})}(),ax.value}function aF(){let a=aA();if(!a)return!1;try{let b=(0,t.execSync)(`"${a}" ${at.join(" ")} funnel status --json`,{encoding:"utf8",windowsHide:!0,stdio:["ignore","pipe","ignore"],timeout:1500}),c=JSON.parse(b),d=Object.keys(c.AllowFunnel||{}).length>0;return ax.value=d,ax.fetchedAt=Date.now(),d}catch{return!1}}function aG(){let a=aA();if(!a)return null;try{let b=(0,t.execSync)(`"${a}" ${at.join(" ")} status --json`,{encoding:"utf8",windowsHide:!0,env:{...process.env,PATH:aJ},timeout:5e3}),c=JSON.parse(b),d=c.Self?.DNSName?.replace(/\.$/,"");return d?`https://${d}`:null}catch{return null}}function aH(a){return(Date.now()-ay.fetchedAt>1e4||ay.port!==a)&&function(a){if(ay.refreshing)return;let b=aA();b&&(ay.refreshing=!0,am(`"${b}" ${at.join(" ")} status --json`,{windowsHide:!0,timeout:1500}).then(({stdout:a})=>{try{let b=JSON.parse(a),c=b.Self?.DNSName?.replace(/\.$/,"");ay.value=c?`https://${c}`:null}catch{}}).catch(()=>{}).finally(()=>{ay.port=a,ay.fetchedAt=Date.now(),ay.refreshing=!1}))}(a),ay.value}async function aI(a,b,c){let d=c||(()=>{});return ap?(await aM(d),{success:!0}):(ao?await aK(a,d):await aL(a,d),d("Starting daemon..."),await aO(a),d("Logging in..."),aQ(b))}let aJ=`/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:${process.env.PATH||""}`;async function aK(a,b){if(function(){try{return(0,t.execSync)("which brew",{stdio:"ignore",windowsHide:!0,env:{...process.env,PATH:aJ}}),!0}catch{return!1}}()){b("Installing via Homebrew..."),await new Promise((a,c)=>{let d=(0,t.spawn)("brew",["install","tailscale"],{stdio:["ignore","pipe","pipe"],windowsHide:!0,env:{...process.env,PATH:aJ}});d.stdout.on("data",a=>{let c=a.toString().trim();c&&b(c)}),d.stderr.on("data",a=>{let c=a.toString().trim();c&&b(c)}),d.on("close",b=>{0===b?a():c(Error(`brew install failed (code ${b})`))}),d.on("error",c)});return}let c=g().join(s().tmpdir(),"tailscale.pkg");b("Downloading Tailscale package..."),await new Promise((a,d)=>{let e=(0,t.spawn)("curl",["-fL","--progress-bar","https://pkgs.tailscale.com/stable/tailscale-latest.pkg","-o",c],{stdio:["ignore","pipe","pipe"],windowsHide:!0});e.stderr.on("data",a=>{let c=a.toString().trim();c&&b(c)}),e.on("close",b=>{0===b?a():d(Error("Download failed"))}),e.on("error",d)}),b("Installing package..."),await new Promise((d,e)=>{let f=(0,t.spawn)("sudo",["-S","installer","-pkg",c,"-target","/"],{stdio:["pipe","pipe","pipe"],windowsHide:!0}),g="";f.stderr.on("data",a=>{g+=a.toString()}),f.stdout.on("data",a=>{let c=a.toString().trim();c&&b(c)}),f.on("close",a=>{try{(0,t.execSync)(`rm -f ${c}`,{stdio:"ignore",windowsHide:!0})}catch{}0===a?d():e(Error(g.includes("incorrect password")||g.includes("Sorry")?"Wrong sudo password":g||`Exit code ${a}`))}),f.on("error",e),f.stdin.write(`${a}
|
|
2
|
-
`),f.stdin.end()})}async function aL(a,b){if("string"!=typeof a||a.includes("\n"))throw Error("Invalid sudo password");return b("Downloading install script..."),new Promise((c,d)=>{let f=(0,t.spawn)("curl",["-fsSL","https://tailscale.com/install.sh"],{stdio:["ignore","pipe","pipe"],windowsHide:!0}),h="",i="";f.stdout.on("data",a=>{h+=a.toString()}),f.stderr.on("data",a=>{i+=a.toString()}),f.on("exit",f=>{if(0!==f)return d(Error(`Failed to download install script: ${i}`));b("Running install script...");let j=g().join(s().tmpdir(),`tailscale-install-${aj().randomBytes(8).toString("hex")}.sh`);try{e().writeFileSync(j,h,{mode:448})}catch(a){return d(Error(`Failed to write install script: ${a.message}`))}let k=()=>{try{e().unlinkSync(j)}catch{}},l=(0,t.spawn)("sudo",["-S","sh",j],{stdio:["pipe","pipe","pipe"],windowsHide:!0}),m="";l.stdout.on("data",a=>{let c=a.toString().trim();c&&b(c)}),l.stderr.on("data",a=>{m+=a.toString()}),l.on("close",a=>{k(),0===a?c():d(Error(m.includes("incorrect password")||m.includes("Sorry")?"Wrong sudo password":m||`Exit code ${a}`))}),l.on("error",a=>{k(),d(a)}),l.stdin.write(`${a}
|
|
3
|
-
`),l.stdin.end()}),f.on("error",d)})}async function aM(a){let b=g().join(s().tmpdir(),"tailscale-setup.msi");a("Downloading Tailscale installer..."),await new Promise((c,d)=>{let e=(0,t.spawn)("curl.exe",["-L","-#","-o",b,"https://pkgs.tailscale.com/stable/tailscale-setup-latest-amd64.msi"],{stdio:["ignore","pipe","pipe"],windowsHide:!0}),f="";e.stderr.on("data",b=>{let c=b.toString().match(/(\d+\.\d)%/);c&&c[1]!==f&&(f=c[1],a(`Downloading... ${f}%`))}),e.on("close",a=>0===a?c():d(Error("Download failed"))),e.on("error",d)}),a("Installing Tailscale (UAC prompt may appear)..."),await new Promise((c,d)=>{let f=`'/i','${b}','TS_NOLAUNCH=true','/quiet','/norestart'`,g=(0,t.spawn)("powershell",["-NoProfile","-NonInteractive","-Command",`Start-Process msiexec -ArgumentList ${f} -Verb RunAs -Wait`],{stdio:["ignore","pipe","pipe"],windowsHide:!0});g.stderr.on("data",b=>{let c=b.toString().trim();c&&a(c)}),g.on("close",a=>{try{e().unlinkSync(b)}catch{}0===a?c():d(Error(`msiexec failed (code ${a})`))}),g.on("error",d)}),a("Verifying installation...");let c=Date.now();for(;Date.now()-c<1e4;){if(e().existsSync(au))return void a("Installation complete.");await new Promise(a=>setTimeout(a,1e3))}throw Error("Installation finished but tailscale.exe not found")}async function aN(a){try{if(!e().existsSync(a))return void e().mkdirSync(a,{recursive:!0});let b=process.getuid(),c=process.getgid();if(!(()=>{let c=[a];for(;c.length;){let a=c.pop();try{let d=e().statSync(a);if(d.uid!==b)return!0;if(d.isDirectory())for(let b of e().readdirSync(a))c.push(g().join(a,b))}catch{}}return!1})())return;try{(0,t.execSync)(`chown -R ${b}:${c} "${a}"`,{stdio:"ignore",timeout:3e3})}catch{try{(0,t.execSync)(`sudo -n chown -R ${b}:${c} "${a}"`,{stdio:"ignore",timeout:3e3})}catch{}}}catch{}}async function aO(a){if(ap){let a=aA();console.log("[Tailscale] win: net start Tailscale");try{(0,t.execSync)("net start Tailscale",{stdio:"ignore",windowsHide:!0,timeout:1e4})}catch{}if(!a)return;for(let b=0;b<20;b++){try{let c=(0,t.execSync)(`"${a}" status --json`,{encoding:"utf8",windowsHide:!0,timeout:2e3}),d=JSON.parse(c);if(d.BackendState&&"NoState"!==d.BackendState)return void console.log(`[Tailscale] win: BackendState=${d.BackendState} after ${500*b}ms`)}catch{}await new Promise(a=>setTimeout(a,500))}console.log("[Tailscale] win: BackendState still NoState after poll");return}let b=!!a,c=function(){try{let a=(0,t.execSync)(`pgrep -af "tailscaled.*${as}"`,{encoding:"utf8",timeout:2e3}).trim();if(!a)return null;return!a.includes("--tun=userspace-networking")}catch{return null}}();if(null!==c&&c===b)try{let a=aA()||"tailscale";(0,t.execSync)(`"${a}" ${at.join(" ")} status --json`,{stdio:"ignore",windowsHide:!0,env:{...process.env,PATH:aJ},timeout:3e3});return}catch{}try{(0,t.execSync)(`pkill -9 -f "tailscaled.*${as}"`,{stdio:"ignore",timeout:3e3})}catch{}if(a)try{await (0,al.execWithPassword)(`pkill -9 -f "tailscaled.*${as}"`,a)}catch{}else try{(0,t.execSync)(`sudo -n pkill -9 -f "tailscaled.*${as}"`,{stdio:"ignore",timeout:3e3})}catch{}await new Promise(a=>setTimeout(a,1500)),await aN(ar);let d=ao?"/usr/local/bin/tailscaled":"tailscaled",e=[`--socket=${as}`,`--statedir=${ar}`];if(b||e.push("--tun=userspace-networking"),b){let b=(0,t.spawn)("sudo",["-S",d,...e],{detached:!0,stdio:["pipe","ignore","ignore"],cwd:s().tmpdir(),env:{...process.env,PATH:aJ}});b.stdin.write(`${a}
|
|
4
|
-
`),b.stdin.end(),b.unref()}else(0,t.spawn)(d,e,{detached:!0,stdio:"ignore",cwd:s().tmpdir(),env:{...process.env,PATH:aJ}}).unref();await new Promise(a=>setTimeout(a,3e3))}function aP(){let a=aA();if(!a)return null;try{let b=(0,t.execSync)(`"${a}" ${at.join(" ")} status --json`,{encoding:"utf8",windowsHide:!0,timeout:2e3}),c=JSON.parse(b);if(c.AuthURL)return c.AuthURL;return null}catch{return null}}function aQ(a){let b=aA();return b?new Promise((c,d)=>{if(aO("").catch(()=>{}),aD())return void c({alreadyLoggedIn:!0});let e=aC("up","--accept-routes");a&&e.push(`--hostname=${a}`);let f=(0,t.spawn)(b,e,{stdio:["ignore","pipe","pipe"],detached:!0,windowsHide:!0}),g=!1,h="",i=a=>{let b=a.match(/https:\/\/login\.tailscale\.com\/a\/[a-zA-Z0-9]+/);return b?b[0]:null},j=(a,b)=>{g||(g=!0,clearTimeout(l),clearInterval(k),console.log(`[Tailscale] login authUrl detected (${b})`),f.unref(),c({authUrl:a}))},k=setInterval(()=>{if(g)return;let a=aP();a&&j(a,"status")},500),l=setTimeout(()=>{if(g)return;g=!0,clearInterval(k),f.unref();let a=i(h)||aP();a?c({authUrl:a}):d(Error("tailscale up timed out without auth URL"))},15e3),m=a=>{let b=i(h+=a.toString());b&&j(b,"stdout")};f.stdout.on("data",m),f.stderr.on("data",m),f.on("error",a=>{g||(g=!0,clearTimeout(l),clearInterval(k),console.error(`[Tailscale] login spawn error: ${a.message}`),d(a))}),f.on("exit",a=>{if(g)return;console.log(`[Tailscale] login exit code=${a}`);let b=i(h)||aP();if(b)return void j(b,"exit");if(aD()){g=!0,clearTimeout(l),clearInterval(k),c({alreadyLoggedIn:!0});return}})}):Promise.reject(Error("Tailscale not installed"))}async function aR(a){let b=aA();if(!b)throw Error("Tailscale not installed");try{(0,t.execSync)(`"${b}" ${at.join(" ")} funnel --bg reset`,{stdio:"ignore",windowsHide:!0})}catch(a){}return new Promise((c,d)=>{let e=(0,t.spawn)(b,aC("funnel","--bg",`${a}`),{stdio:["ignore","pipe","pipe"],windowsHide:!0}),f=!1,g="",h=setTimeout(()=>{if(f)return;f=!0;let b=aG()||aH(a);b?c({tunnelUrl:b}):d(Error(`Tailscale funnel timed out: ${g.trim()||"no output"}`))},3e4),i=!1,j=a=>{if((g+=a.toString()).includes("Funnel is not enabled")&&(i=!0),i&&!f){let a=g.match(/https:\/\/login\.tailscale\.com\/[^\s]+/);if(a){f=!0,clearTimeout(h),e.kill(),c({funnelNotEnabled:!0,enableUrl:a[0]});return}}let b=aG();b&&!f&&(f=!0,clearTimeout(h),c({tunnelUrl:b}))};e.stdout.on("data",j),e.stderr.on("data",j),e.on("exit",b=>{if(f)return;f=!0,clearTimeout(h),console.log(`[Tailscale] funnel exit code=${b} output="${g.trim().slice(0,200)}"`);let e=aG()||aH(a);e?c({tunnelUrl:e}):d(Error(`tailscale funnel failed (code ${b}): ${g.trim()}`))}),e.on("error",a=>{f||(f=!0,clearTimeout(h),d(a))})})}async function aS(a){let b=aA();if(!b||!a)return;let c=g().join(ar,"certs");e().mkdirSync(c,{recursive:!0});let d=g().join(c,`${a}.crt`),f=g().join(c,`${a}.key`);try{await am(`"${b}" ${at.join(" ")} cert --cert-file "${d}" --key-file "${f}" "${a}"`,{windowsHide:!0,env:{...process.env,PATH:aJ},timeout:3e4}),console.log(`[Tailscale] cert provisioned for ${a}`)}catch(a){console.warn(`[Tailscale] cert provision failed (non-fatal): ${a.message}`)}}function aT(){let a=aA();if(a)try{(0,t.execSync)(`"${a}" ${at.join(" ")} funnel --bg reset`,{stdio:"ignore",windowsHide:!0})}catch(a){}}async function aU(a){let b;if(!a)return!1;try{b=new URL(a).hostname}catch{return!1}if(!await W(b,3e3))return!1;try{return(await fetch(`${a}/api/health`,{signal:AbortSignal.timeout(8e3)})).ok}catch{return!1}}async function aV(a,b={cancelled:!1}){let c=Date.now();for(;Date.now()-c<18e4;){if(b.cancelled)throw Error("cancelled");if(await aU(a))return!0;await new Promise(a=>setTimeout(a,2e3))}throw Error("Health check timeout after 180000ms")}var aW=c(96182);(0,aW.initDbHooks)($.mt,$.Xx);let aX={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null};function aY(){return aX}function aZ(a){if(a.cancelled)throw Error("tailscale cancelled")}async function a$(a=1997){console.log(`[Tailscale] enable start (port=${a})`),aX.cancelToken={cancelled:!1},aX.activeLocalPort=a,aX.spawnInProgress=!0;let b=aX.cancelToken;try{let c,d=(0,aW.getCachedPassword)()||await (0,aW.loadEncryptedPassword)()||"";await aO(d),console.log("[Tailscale] daemon ready"),aZ(b);let e=m(),f=e?.shortId||o(),g=aD();if(console.log(`[Tailscale] loggedIn=${g}`),!g){let a=await aQ(f);if(a.authUrl)return console.log(`[Tailscale] needs login, authUrl=${a.authUrl}`),{success:!1,needsLogin:!0,authUrl:a.authUrl};console.log("[Tailscale] login resolved alreadyLoggedIn")}aZ(b),aT();try{console.log("[Tailscale] starting funnel"),c=await aR(a)}catch(a){if(console.error(`[Tailscale] funnel error: ${a.message}`),/NoState|unexpected state|not logged in|Logged ?out|NeedsLogin/i.test(a.message||"")){console.log("[Tailscale] retry via startLogin");let a=await aQ(f);if(a.authUrl)return{success:!1,needsLogin:!0,authUrl:a.authUrl}}throw a}if(aZ(b),c.funnelNotEnabled)return console.log(`[Tailscale] funnel not enabled, enableUrl=${c.enableUrl}`),{success:!1,funnelNotEnabled:!0,enableUrl:c.enableUrl};if(!aD()||!aF())return console.error("[Tailscale] strict probe failed (device removed?)"),aT(),{success:!1,error:"Tailscale not connected. Device may have been removed. Please re-login."};await (0,$.Xx)({tailscaleEnabled:!0,tailscaleUrl:c.tunnelUrl}),console.log(`[Tailscale] funnel up: ${c.tunnelUrl}`);let h=new URL(c.tunnelUrl).hostname;await aS(h);let i=!1;try{await aV(c.tunnelUrl,b),i=!0}catch(a){if(!a.message.startsWith("Health check timeout"))throw a;console.warn("[Tailscale] health check timed out, will retry via watchdog")}return console.log(`[Tailscale] enable success (reachable=${i})`),{success:!0,tunnelUrl:c.tunnelUrl}}catch(a){throw console.error(`[Tailscale] enable error: ${a.message}`),a}finally{aX.spawnInProgress=!1}}async function a_(){return console.log("[Tailscale] disable"),aX.cancelToken.cancelled=!0,aT(),await (0,$.Xx)({tailscaleEnabled:!1,tailscaleUrl:""}),{success:!0}}async function a0(){let a=await (0,$.mt)(),b=!0===a.tailscaleEnabled,c=a.tailscaleUrl||"",d=!!b&&aD(),e=!!d&&aE();return{enabled:b&&e,settingsEnabled:b,tunnelUrl:c,running:e,loggedIn:d}}var a1=c(91645),a2=c.n(a1);function a3(){return new Promise(a=>{let b=new(a2()).Socket,c=!1,d=d=>{if(!c){c=!0;try{b.destroy()}catch{}a(d)}};b.setTimeout(3e3),b.once("connect",()=>d(!0)),b.once("timeout",()=>d(!1)),b.once("error",()=>d(!1));try{b.connect(443,"1.1.1.1")}catch{d(!1)}})}let a4=12e4,a5=2500,a6=6e4,a7=5e3,a8=/^(utun|awdl|llw|anpi|bridge|gif|stf|ipsec|ap|tun|tap|vmnet|veth|docker)/i}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=8590,exports.ids=[8590],exports.modules={8590:(a,b,c)=>{c.d(b,{$B:()=>B,I9:()=>r,Og:()=>o,Ql:()=>x,Sc:()=>C,jR:()=>A,jT:()=>n,oD:()=>i,pb:()=>E,qZ:()=>F});var d=c(35024),e=c(75924),f=c(39609);let g=null;async function h(a,b){return a?m("xai",a,async()=>{try{g||(g=new(await Promise.all([c.e(5470),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await g.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let i=3e5,j=new Map;function k(){let a=Error("Request aborted");return a.name="AbortError",a}function l(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(k())),c(d))},g=()=>f(d,k());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function m(a,b,c,d,e=null){let f,g;if(e?.aborted)throw k();if(!b)return c();let h=`${a}:${b}`,i=j.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(k()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,k());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw k();if(i.controller.signal.aborted&&f?.name==="AbortError")return m(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),l(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;j.delete(h)}let n={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return j.set(h,n),(async()=>{try{let a=await c(n.controller.signal),b={result:a,expiresAt:Date.now()+1e4};j.set(h,b);let d=setTimeout(()=>{j.get(h)===b&&j.delete(h)},1e4);d.unref?.(),n.settled=!0,f(a)}catch(a){j.get(h)===n&&j.delete(h),n.settled=!0,g(a)}})(),l(n,e)}function n(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function o(a){return e.Wu[a]||i}async function p(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?m(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:c.status,error:b}),null}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function q(a,b){return a?m("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function r(a,b,c,d){return a?m(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function s(a,b){return a?m("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function t(a,b,c="codebuddy"){return a?m(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,h=e.domain||"www.codebuddy.ai",i=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"CLI/2.63.2 CodeBuddy/2.63.2","X-Requested-With":"XMLHttpRequest","X-Domain":h,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!i.ok)return b?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${c}`,{status:i.status,error:await i.text().catch(()=>"")}),null;let j=await i.json(),k=j?.data||j,l=k?.accessToken||k?.access_token;if(!l)return null;return{accessToken:l,refreshToken:k?.refreshToken||k?.refresh_token||a,expiresIn:k?.expiresIn||k?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function u(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3);return{status:b,code:f,permanent:j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k)}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function v(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function w(a,b){return a?m("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function x(a,b,c,e=null,g=null){return a?m("kiro",a,async g=>{let h=b?.authMethod,i=b?.clientId,j=b?.clientSecret,k=b?.region;if(i&&j){let b="idc"===h&&k?`https://oidc.${k}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:i,clientSecret:j,refreshToken:a,grantType:"refresh_token"}),signal:g},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return u(d,a,c,"AWS")}let l=await d.json();return l?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn}):v(c,"AWS")}let l=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:g},{...e,singleTransportAttempt:!0});if(!l.ok){let a=await l.text();return u(l,a,c,"social")}let m=await l.json();return m?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn}):v(c,"social")},c,g):null}async function y(a,b){return a?m("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function z(a,b){return a?m("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function A(a,b){return a?m("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function B(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return r(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return q(b.refreshToken,c);case"codex":return w(b.refreshToken,c);case"qwen":return s(b.refreshToken,c);case"codebuddy":return t(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return t(b.refreshToken,c,"codebuddy-cn");case"iflow":return y(b.refreshToken,c);case"github":return z(b.refreshToken,c);case"kiro":return x(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return h(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=C(b.apiKey);if(!a)return null;return E(a,c)}default:return p(a,b.refreshToken,b,c)}}function C(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let D=new Map;async function E(a,b){let d=a.client_email,e=D.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return D.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function F(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}}};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=877,exports.ids=[877],exports.modules={644:(a,b,c)=>{function d(a,b=null){if(null==a)return b;if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}function e(a){return JSON.stringify(a??null)}c.d(b,{q:()=>d,s:()=>e})},1129:(a,b,c)=>{c.r(b),c.d(b,{createProviderNode:()=>k,deleteProviderNode:()=>m,getProviderNodeById:()=>j,getProviderNodes:()=>i,updateProviderNode:()=>l});var d=c(47293),e=c(36366),f=c(644);function g(a){return a?{...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function h(a,b){let c=function(a){let{id:b,type:c,name:d,createdAt:e,updatedAt:g,...h}=a;return{id:b,type:c??null,name:d??null,data:(0,f.s)(h),createdAt:e,updatedAt:g}}(b);a.run(`INSERT INTO providerNodes(id, type, name, data, createdAt, updatedAt)
|
|
2
|
-
VALUES(?, ?, ?, ?, ?, ?)
|
|
3
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
4
|
-
type=excluded.type, name=excluded.name, data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.type,c.name,c.data,c.createdAt,c.updatedAt])}async function i(a={}){let b=await (0,e.cK)(),c=[],d=[];a.type&&(c.push("type = ?"),d.push(a.type));let f=`SELECT * FROM providerNodes${c.length?` WHERE ${c.join(" AND ")}`:""}`;return b.all(f,d).map(g)}async function j(a){return g((await (0,e.cK)()).get("SELECT * FROM providerNodes WHERE id = ?",[a]))}async function k(a){let b=await (0,e.cK)(),c=new Date().toISOString(),f={id:a.id||(0,d.A)(),type:a.type,name:a.name,prefix:a.prefix,apiType:a.apiType,baseUrl:a.baseUrl,createdAt:c,updatedAt:c};return h(b,f),f}async function l(a,b){let c=await (0,e.cK)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM providerNodes WHERE id = ?",[a]);if(!e)return;let f={...g(e),...b,updatedAt:new Date().toISOString()};h(c,f),d=f}),d}async function m(a){let b=await (0,e.cK)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM providerNodes WHERE id = ?",[a]);d&&(c=g(d),b.run("DELETE FROM providerNodes WHERE id = ?",[a]))}),c}},5781:(a,b,c)=>{c.r(b),c.d(b,{cleanupProviderConnections:()=>s,createProviderConnection:()=>m,deleteProviderConnection:()=>p,deleteProviderConnectionsByProvider:()=>q,getProviderConnectionById:()=>k,getProviderConnections:()=>j,mutateProviderConnection:()=>o,reorderProviderConnections:()=>r,updateProviderConnection:()=>n});var d=c(47293),e=c(36366),f=c(644);let g=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","errorCode","consecutiveUseCount"];function h(a){return a?{...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function i(a,b){let c=function(a){let{id:b,provider:c,authType:d,name:e,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=a;return{id:b,provider:c,authType:d,name:e??null,email:g??null,priority:h??null,isActive:+(!1!==i),data:(0,f.s)(l),createdAt:j,updatedAt:k}}(b);a.run(`INSERT INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt)
|
|
5
|
-
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
6
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
7
|
-
provider=excluded.provider, authType=excluded.authType, name=excluded.name,
|
|
8
|
-
email=excluded.email, priority=excluded.priority, isActive=excluded.isActive,
|
|
9
|
-
data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.provider,c.authType,c.name,c.email,c.priority,c.isActive,c.data,c.createdAt,c.updatedAt])}async function j(a={}){let b=await (0,e.cK)(),c=[],d=[];a.provider&&(c.push("provider = ?"),d.push(a.provider)),void 0!==a.isActive&&(c.push("isActive = ?"),d.push(+!!a.isActive));let f=`SELECT * FROM providerConnections${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,d).map(h);return g.sort((a,b)=>(a.priority||999)-(b.priority||999)),g}async function k(a){return h((await (0,e.cK)()).get("SELECT * FROM providerConnections WHERE id = ?",[a]))}function l(a,b,c=null){let d=a.all("SELECT * FROM providerConnections WHERE provider = ?",[b]).map(h);if(d.sort((a,b)=>{let c=(a.priority||0)-(b.priority||0);return 0!==c?c:a.id.localeCompare(b.id)}),c){let a=d.findIndex(a=>a.id===c);if(-1!==a){let[b]=d.splice(a,1),c=Number(b.priority),e=Math.max(0,Math.min(Number.isFinite(c)?Math.ceil(c)-1:d.length,d.length));d.splice(e,0,b)}}d.forEach((b,c)=>{a.run("UPDATE providerConnections SET priority = ? WHERE id = ?",[c+1,b.id])})}async function m(a){let b,c=await (0,e.cK)(),f=new Date().toISOString();return c.transaction(()=>{let e=c.all("SELECT * FROM providerConnections WHERE provider = ?",[a.provider]).map(h),j=null;if("oauth"===a.authType&&a.email){let b=a.providerSpecificData?.chatgptAccountId;j=e.find(c=>{if("oauth"!==c.authType||c.email!==a.email)return!1;let d=c.providerSpecificData?.chatgptAccountId;return!b||!d||b===d})}else"apikey"===a.authType&&a.name&&(j=e.find(b=>"apikey"===b.authType&&b.name===a.name));if(j){let d={...j,...a,updatedAt:f};i(c,d),void 0!==a.priority?(l(c,j.provider,j.id),b=h(c.get("SELECT * FROM providerConnections WHERE id = ?",[j.id]))):b=d;return}let k=a.name||null;k||"oauth"!==a.authType&&"access_token"!==a.authType||(k=a.email||`Account ${e.length+1}`);let m=a.priority;m||(m=e.reduce((a,b)=>Math.max(a,b.priority||0),0)+1);let n={id:(0,d.A)(),provider:a.provider,authType:a.authType||"oauth",name:k,priority:m,isActive:void 0===a.isActive||a.isActive,createdAt:f,updatedAt:f};for(let b of g)void 0!==a[b]&&null!==a[b]&&(n[b]=a[b]);a.providerSpecificData&&Object.keys(a.providerSpecificData).length>0&&(n.providerSpecificData=a.providerSpecificData),void 0!==a.email&&(n.email=a.email),i(c,n),l(c,a.provider,n.id),b=h(c.get("SELECT * FROM providerConnections WHERE id = ?",[n.id]))}),b}async function n(a,b){let c,d=await (0,e.cK)();return d.transaction(()=>{let e=d.get("SELECT * FROM providerConnections WHERE id = ?",[a]);if(!e){c=null;return}let f=h(e),g={...f,...b,updatedAt:new Date().toISOString()};i(d,g),void 0!==b.priority?(l(d,f.provider,a),c=h(d.get("SELECT * FROM providerConnections WHERE id = ?",[a]))):c=g}),c}async function o(a,b){if("function"!=typeof b)throw TypeError("mutator must be a function");let c=await (0,e.cK)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM providerConnections WHERE id = ?",[a]);if(!e)return;let f=h(e),g=b(f);if(g&&"function"==typeof g.then)throw TypeError("connection mutator must be synchronous");if(!g||"object"!=typeof g||Array.isArray(g))return;let j={...f,...g,updatedAt:new Date().toISOString()};i(c,j),void 0!==g.priority&&l(c,f.provider,a),d=void 0!==g.priority?h(c.get("SELECT * FROM providerConnections WHERE id = ?",[a])):j}),d}async function p(a){let b=await (0,e.cK)(),c=!1;return b.transaction(()=>{let d=b.get("SELECT provider FROM providerConnections WHERE id = ?",[a]);d&&(b.run("DELETE FROM providerConnections WHERE id = ?",[a]),l(b,d.provider),c=!0)}),c}async function q(a){let b=await (0,e.cK)(),c=b.get("SELECT COUNT(*) AS n FROM providerConnections WHERE provider = ?",[a]);return b.run("DELETE FROM providerConnections WHERE provider = ?",[a]),c?.n||0}async function r(a){let b=await (0,e.cK)();b.transaction(()=>l(b,a))}async function s(){let a=await (0,e.cK)(),b=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","consecutiveUseCount"],c=0;return a.transaction(()=>{for(let d of a.all("SELECT * FROM providerConnections")){let e=h(d),f=!1;for(let a of b)(null===e[a]||void 0===e[a])&&a in e&&(delete e[a],c++,f=!0);e.providerSpecificData&&0===Object.keys(e.providerSpecificData).length&&(delete e.providerSpecificData,c++,f=!0),f&&i(a,e)}}),c}},9460:(a,b,c)=>{c.d(b,{L9:()=>r,OM:()=>j,S8:()=>o,fv:()=>l,getMitmAlias:()=>q,o5:()=>k,uL:()=>p,uv:()=>n});var d=c(36366),e=c(644),f=c(22846);let g=(0,f.U)("modelAliases"),h=(0,f.U)("customModels"),i=(0,f.U)("mitmAlias");async function j(){return await g.getAll()}async function k(a,b){await g.set(a,b)}async function l(a){await g.remove(a)}function m(a,b,c){return`${a}|${b}|${c}`}async function n(){return Object.values(await h.getAll())}async function o({providerAlias:a,id:b,type:c="llm",name:f}){let g=m(a,b,c),h=await (0,d.cK)(),i=!1;return h.transaction(()=>{if(h.get("SELECT 1 FROM kv WHERE scope = 'customModels' AND key = ?",[g]))return;let d=(0,e.s)({providerAlias:a,id:b,type:c,name:f||b});h.run("INSERT INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[g,d]),i=!0}),i}async function p({providerAlias:a,id:b,type:c="llm"}){await h.remove(m(a,b,c))}async function q(a){return a?await i.get(a)||{}:await i.getAll()}async function r(a,b){await i.set(a,b||{})}},18943:(a,b,c)=>{c.d(b,{SL:()=>p,cj:()=>q,ox:()=>o});var d=c(36366),e=c(644);let f=null,g=0;async function h(){if(f&&Date.now()-g<5e3)return f;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a(),d="false"!==process.env.OBSERVABILITY_ENABLED;f={enabled:"boolean"==typeof b.enableObservability?b.enableObservability:d,maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{f={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return g=Date.now(),f}let i=[],j=null,k=!1,l=!1;function m(a){return Math.min(1e3,Math.max(100,4*a))}async function n(){if(k)return!1;if(0===i.length)return!0;k=!0;let a=null,b=[],c=!1;try{a=await h(),b=i.splice(0,Math.max(1,a.batchSize));let f=await (0,d.cK)();f.transaction(()=>{for(let a of b)f.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,e.s)(a)]);let c=f.get("SELECT COUNT(*) as c FROM requestDetails");c&&c.c>a.maxRecords&&f.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[c.c-a.maxRecords])}),c=!0}catch(c){if(b.length>0){i=[...b,...i];let c=m(a?.batchSize||20);i.length>c&&(i.splice(0,i.length-c),l||(l=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`)))}console.error("[requestDetailsRepo] Batch write failed:",c)}finally{k=!1,0===i.length?l=!1:j||(j=setTimeout(()=>{j=null,n().catch(()=>{})},c?0:Math.max(250,Math.min(a?.flushIntervalMs||5e3,5e3))),j.unref?.())}return c}async function o(a){let b=await h();if(b.enabled){let c;c=m(b.batchSize),i.length>=c&&(i.splice(0,i.length-c+1),l||(l=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`))),i.push(function(a,b=5120){var c,d;let e,f,g,h=(c=a?.provider,Math.max(1024,Math.min(Number.isFinite(b)?b:5120,"kiro"===c?16384:65536))),i=a=>{try{let b,c=(b=new WeakSet,JSON.stringify(a??{},(a,c)=>{if("bigint"==typeof c)return c.toString();if(c&&"object"==typeof c){if(b.has(c))return"[Circular]";b.add(c)}return c}));if(c.length>h)return{_truncated:!0,_originalSize:c.length,_preview:c.substring(0,200)};return JSON.parse(c)}catch(a){return{_truncated:!0,_serializationError:a.message}}},j=a?.request&&"object"==typeof a.request?{...a.request,headers:function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(a.request.headers)}:a?.request;return{id:a?.id||(d=a?.model,e=new Date().toISOString(),f=Math.random().toString(36).substring(2,8),g=d?d.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown",`${e}-${f}-${g}`),provider:a?.provider||null,model:a?.model||null,connectionId:a?.connectionId||null,timestamp:a?.timestamp||new Date().toISOString(),status:a?.status||null,latency:i(a?.latency),tokens:i(a?.tokens),request:i(j),providerRequest:i(a?.providerRequest),providerResponse:i(a?.providerResponse),response:i(a?.response)}}(a,b.maxJsonSize)),i.length>=b.batchSize?(j&&(clearTimeout(j),j=null),n().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):j||(j=setTimeout(()=>{j=null,n().catch(()=>{})},b.flushIntervalMs))}}async function p(a={}){let b=await (0,d.cK)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.status&&(c.push("status = ?"),f.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,f),i=h?h.c:0,j=Number.isFinite(Number(a.page))?Math.max(1,Math.trunc(Number(a.page))):1,k=Number.isFinite(Number(a.pageSize))?Math.max(1,Math.trunc(Number(a.pageSize))):50,l=Math.max(1,Math.ceil(i/k)),m=Math.min(j,l);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,k,(m-1)*k]).map(a=>(0,e.q)(a.data,{})),pagination:{page:m,pageSize:k,totalItems:i,totalPages:l,hasNext:m<l,hasPrev:m>1}}}async function q(){for(j&&(clearTimeout(j),j=null);k;)await new Promise(a=>setTimeout(a,10));for(;i.length>0;){if(!await n())throw j&&(clearTimeout(j),j=null),Error("Failed to flush request details to the database");for(;k;)await new Promise(a=>setTimeout(a,10))}}},22846:(a,b,c)=>{c.d(b,{U:()=>f});var d=c(36366),e=c(644);function f(a){return{async get(b,c=null){let f=(await (0,d.cK)()).get("SELECT value FROM kv WHERE scope = ? AND key = ?",[a,b]);return f?(0,e.q)(f.value,c):c},async getAll(){let b=(await (0,d.cK)()).all("SELECT key, value FROM kv WHERE scope = ?",[a]),c={};for(let a of b)c[a.key]=(0,e.q)(a.value);return c},async set(b,c){(await (0,d.cK)()).run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,b,(0,e.s)(c)])},async setMany(b){let c=await (0,d.cK)();c.transaction(()=>{for(let[d,f]of Object.entries(b))c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,d,(0,e.s)(f)])})},async remove(b){(await (0,d.cK)()).run("DELETE FROM kv WHERE scope = ? AND key = ?",[a,b])},async clear(){(await (0,d.cK)()).run("DELETE FROM kv WHERE scope = ?",[a])}}}},26556:(a,b,c)=>{c.d(b,{KK:()=>f,LF:()=>h,tV:()=>i});var d=c(36366),e=c(644);async function f(a,b,c){if(!a)return;let f=await (0,d.cK)(),g=new Date().toISOString();f.run(`INSERT INTO quotaCache(connectionId, provider, data, fetchedAt) VALUES(?, ?, ?, ?)
|
|
10
|
-
ON CONFLICT(connectionId) DO UPDATE SET provider = excluded.provider, data = excluded.data, fetchedAt = excluded.fetchedAt`,[a,b||"",(0,e.s)(c||{}),g])}function g(a){return a?{connectionId:a.connectionId,provider:a.provider,fetchedAt:a.fetchedAt,usage:(0,e.q)(a.data,{})}:null}async function h(a){return a?g((await (0,d.cK)()).get("SELECT connectionId, provider, data, fetchedAt FROM quotaCache WHERE connectionId = ?",[a])):null}async function i(a=null){let b=await (0,d.cK)();return(a?b.all("SELECT connectionId, provider, data, fetchedAt FROM quotaCache WHERE provider = ?",[a]):b.all("SELECT connectionId, provider, data, fetchedAt FROM quotaCache")).map(g)}},31763:(a,b,c)=>{c.d(b,{KQ:()=>o,AL:()=>n,HG:()=>m,Or:()=>p,Jh:()=>q});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(49120),i=c(48161),j=c.n(i);let k=String.fromCharCode(57,114,111,117,116,101,114),l=".migrated-from-legacy",m=e().join(h.DATA_DIR,"db"),n=e().join(m,"data.sqlite"),o=e().join(m,"backups"),p={main:e().join(h.DATA_DIR,"db.json"),usage:e().join(h.DATA_DIR,"usage.json"),disabled:e().join(h.DATA_DIR,"disabledModels.json"),details:e().join(h.DATA_DIR,"request-details.json")};function q(){for(let a of(!function(a){if(!a||process.env.DATA_DIR)return;let b=e().join(a,l);if(g().existsSync(b))return;let c="win32"===process.platform?e().join(process.env.APPDATA||e().join(j().homedir(),"AppData","Roaming"),k):e().join(j().homedir(),`.${k}`);if(g().existsSync(c))try{if(g().existsSync(a)){if(g().readdirSync(a).filter(a=>a!==l).length>0)return void g().writeFileSync(b,new Date().toISOString())}else g().mkdirSync(a,{recursive:!0});g().cpSync(c,a,{recursive:!0,force:!1,errorOnExist:!1}),g().writeFileSync(b,new Date().toISOString()),console.log(`[dataDir] Migrated legacy data from ${c} → ${a}`)}catch(a){console.warn(`[dataDir] Legacy migration skipped: ${a?.message||a}`)}}(h.DATA_DIR),[h.DATA_DIR,m,o]))g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},36366:(a,b,c)=>{c.d(b,{cK:()=>k,y5:()=>l});var d=c(31763);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,closePromise:null,logged:!1});let e=global._dbAdapter;async function f(){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(4739).then(c.bind(c,24739));return await a(d.AL)}catch(a){return console.warn(`[DB] bun:sqlite unavailable: ${a.message}`),null}}async function g(){if(process.versions.bun)return null;try{let{createBetterSqliteAdapter:a}=await c.e(5258).then(c.bind(c,25258));return a(d.AL)}catch(a){return console.warn(`[DB] better-sqlite3 unavailable: ${a.message}`),null}}async function h(){if(process.versions.bun)return null;let[a,b]=process.versions.node.split(".").map(Number);if(a<22||22===a&&b<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(8520).then(c.bind(c,88520));return await a(d.AL)}catch(a){return console.warn(`[DB] node:sqlite unavailable: ${a.message}`),null}}async function i(){try{let{createSqlJsAdapter:a}=await c.e(3593).then(c.bind(c,53593));return await a(d.AL)}catch(a){return console.warn(`[DB] sql.js unavailable: ${a.message}`),null}}async function j(){(0,d.Jh)();let a=await f();if(a||(a=await h()),a||(a=await g()),a||(a=await i()),!a)throw Error("[DB] No SQLite driver available (bun/node/better/sql.js all failed)");e.logged||(console.log(`[DB] Driver: ${a.driver} | file: ${d.AL}`),e.logged=!0);try{let{runMigrationOnce:b}=await c.e(5217).then(c.bind(c,45217));await b(a);let{runStartupMaintenanceOnce:d}=await c.e(4229).then(c.bind(c,14229));return d(a),a}catch(b){try{await a.close?.()}catch(a){console.warn(`[DB] failed to close partially initialized adapter: ${a.message}`)}throw b}}async function k(){if(e.instance)return e.instance;if(!e.initPromise){let a=j().then(a=>(e.instance=a,a)).catch(b=>{throw e.initPromise===a&&(e.initPromise=null),b});e.initPromise=a}return e.initPromise}async function l(){return e.closePromise||(e.closePromise=(async()=>{try{let{stopStartupMaintenance:a}=await c.e(4229).then(c.bind(c,14229));a();let b=e.instance||(e.initPromise?await e.initPromise:null);await b?.close?.()}finally{e.instance=null,e.initPromise=null,e.closePromise=null}})()),e.closePromise}"closePromise"in e||(e.closePromise=null)},42655:(a,b,c)=>{c.d(b,{Xx:()=>j,exportSettings:()=>k,getSettings:()=>i});var d=c(36366),e=c(644);let f={cloudEnabled:!1,tunnelEnabled:!1,tunnelUrl:"",tunnelProvider:"cloudflare",tailscaleEnabled:!1,tailscaleUrl:"",stickyRoundRobinLimit:3,providerStrategies:{},comboStrategy:"fallback",comboStickyRoundRobinLimit:1,comboStrategies:{},responseCacheEnabled:!1,requireLogin:!0,tunnelDashboardAccess:!0,authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcClientSecret:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC",enableObservability:!0,observabilityMaxRecords:1e3,observabilityBatchSize:20,observabilityFlushIntervalMs:5e3,observabilityMaxJsonSize:5,outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",mitmRouterBaseUrl:"http://localhost:1997",dnsToolEnabled:{},rtkEnabled:!0,headroomEnabled:!1,headroomUrl:"http://localhost:8787",headroomCompressUserMessages:!1,headroomCodeAware:!1,headroomKompress:!0,cavemanEnabled:!1,cavemanLevel:"full",ponytailEnabled:!1,ponytailLevel:"full",pxpipeEnabled:!1,pxpipeAutoInstall:!0,pxpipeMinChars:25e3,pxpipeTimeoutMs:15e3,contextInjectionEnabled:!1,fiveSimApiKey:""};async function g(){let a=(await (0,d.cK)()).get("SELECT data FROM settings WHERE id = 1");return a?(0,e.q)(a.data,{}):{}}function h(a){let b={...f,...a||{}};for(let[a,c]of Object.entries(f))void 0===b[a]&&("outboundProxyEnabled"===a&&"string"==typeof b.outboundProxyUrl&&b.outboundProxyUrl.trim()?b[a]=!0:b[a]=c);return b}async function i(){return h(await g())}async function j(a){let b,c=await (0,d.cK)();return c.transaction(()=>{let d=c.get("SELECT data FROM settings WHERE id = 1");b={...d?(0,e.q)(d.data,{}):{},...a},c.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(b)])}),h(b)}async function k(){return await g()}},49120:(a,b,c)=>{c.r(b),c.d(b,{DATA_DIR:()=>m,getDataDir:()=>l});var d=c(73024),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="zevai";function k(){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),j):g().join(i().homedir(),`.${j}`)}function l(){let a=process.env.DATA_DIR;if(!a)return k();try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable → fallback ~/.${j}`),k();throw b}}let m=l()},62674:(a,b,c)=>{function d(a,b,c=null){let e=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return e?e.value:c}function e(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c.d(b,{dy:()=>d,np:()=>e}),c(36366)},63775:(a,b,c)=>{c.d(b,{CG:()=>e,oG:()=>d,zE:()=>f});let d=`
|
|
11
|
-
PRAGMA journal_mode = WAL;
|
|
12
|
-
PRAGMA synchronous = NORMAL;
|
|
13
|
-
PRAGMA temp_store = MEMORY;
|
|
14
|
-
PRAGMA mmap_size = 30000000;
|
|
15
|
-
PRAGMA cache_size = -64000;
|
|
16
|
-
PRAGMA foreign_keys = ON;
|
|
17
|
-
PRAGMA busy_timeout = 5000;
|
|
18
|
-
`,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL",budgetDaily:"REAL DEFAULT 0",budgetMonthly:"REAL DEFAULT 0",requestsPerMinute:"INTEGER DEFAULT 0",allowedModels:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]},quotaCache:{columns:{connectionId:"TEXT PRIMARY KEY",provider:"TEXT",data:"TEXT NOT NULL",fetchedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_qc_provider ON quotaCache(provider)"]},contextFiles:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",content:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cf_enabled ON contextFiles(enabled, priority)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},70877:(a,b,c)=>{c.d(b,{S8:()=>L.S8,admitApiKeyRequest:()=>D.admitApiKeyRequest,E5:()=>R.E5,checkApiKeyBudget:()=>D.checkApiKeyBudget,bI:()=>h.cleanupProviderConnections,Iq:()=>D.createApiKey,jd:()=>I,QI:()=>z,p3:()=>C,iE:()=>h.createProviderConnection,i0:()=>i.createProviderNode,ZO:()=>o,Lh:()=>D.deleteApiKey,CG:()=>K,NR:()=>B,uL:()=>L.uL,fv:()=>L.fv,fK:()=>h.deleteProviderConnection,op:()=>h.deleteProviderConnectionsByProvider,Pc:()=>i.deleteProviderNode,Yd:()=>q,tm:()=>P,oF:()=>Q,zP:()=>V,rg:()=>R.rg,tV:()=>r.tV,yg:()=>D.getApiKeyById,PX:()=>D.getApiKeys,j$:()=>R.j$,L:()=>G,Dj:()=>H,Uv:()=>F,yW:()=>y,uv:()=>L.uv,vF:()=>O,qd:()=>x,getLatencyStats:()=>R._3,c:()=>L.getMitmAlias,OM:()=>L.OM,r4:()=>M.r4,Mc:()=>h.getProviderConnectionById,P:()=>h.getProviderConnections,Qu:()=>i.getProviderNodeById,Fh:()=>i.getProviderNodes,hr:()=>n,ui:()=>m,LF:()=>r.LF,Zx:()=>R.Zx,SL:()=>S.SL,mt:()=>g.getSettings,BY:()=>R.BY,K1:()=>W,zY:()=>w,Op:()=>h.mutateProviderConnection,VT:()=>M.VT,yF:()=>M.yF,Pb:()=>D.rotateApiKey,KK:()=>r.KK,ox:()=>S.ox,sZ:()=>R.sZ,L9:()=>L.L9,o5:()=>L.o5,_V:()=>R._V,uw:()=>R.uw,XW:()=>D.updateApiKey,oG:()=>J,dK:()=>A,KJ:()=>M.KJ,rj:()=>h.updateProviderConnection,ho:()=>i.updateProviderNode,Q_:()=>p,Xx:()=>g.Xx,ek:()=>D.validateApiKey});var d=c(36366),e=c(63775),f=c(644),g=c(42655),h=c(5781),i=c(1129),j=c(47293);function k(a){return a?{...(0,f.q)(a.data,{}),id:a.id,isActive:1===a.isActive||!0===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function l(a,b){let c=function(a){let{id:b,isActive:c,testStatus:d,createdAt:e,updatedAt:g,...h}=a;return{id:b,isActive:+(!1!==c),testStatus:d??null,data:(0,f.s)(h),createdAt:e,updatedAt:g}}(b);a.run(`INSERT INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt)
|
|
19
|
-
VALUES(?, ?, ?, ?, ?, ?)
|
|
20
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
21
|
-
isActive=excluded.isActive, testStatus=excluded.testStatus,
|
|
22
|
-
data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.isActive,c.testStatus,c.data,c.createdAt,c.updatedAt])}async function m(a={}){let b=await (0,d.cK)(),c=[],e=[];void 0!==a.isActive&&(c.push("isActive = ?"),e.push(+!!a.isActive)),a.testStatus&&(c.push("testStatus = ?"),e.push(a.testStatus));let f=`SELECT * FROM proxyPools${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,e).map(k);return g.sort((a,b)=>new Date(b.updatedAt||0)-new Date(a.updatedAt||0)),g}async function n(a){return k((await (0,d.cK)()).get("SELECT * FROM proxyPools WHERE id = ?",[a]))}async function o(a){let b=await (0,d.cK)(),c=new Date().toISOString(),e={id:a.id||(0,j.A)(),name:a.name,proxyUrl:a.proxyUrl,noProxy:a.noProxy||"",type:a.type||"http",isActive:void 0===a.isActive||a.isActive,strictProxy:!0===a.strictProxy,testStatus:a.testStatus||"unknown",lastTestedAt:a.lastTestedAt||null,lastError:a.lastError||null,createdAt:c,updatedAt:c};return l(b,e),e}async function p(a,b){let c=await (0,d.cK)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM proxyPools WHERE id = ?",[a]);if(!d)return;let f={...k(d),...b,updatedAt:new Date().toISOString()};l(c,f),e=f}),e}async function q(a){let b=await (0,d.cK)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM proxyPools WHERE id = ?",[a]);d&&(c=k(d),b.run("DELETE FROM proxyPools WHERE id = ?",[a]))}),c}var r=c(26556);let s=null,t=0;function u(){s=null,t=0}function v(a){return a?{id:a.id,name:a.name,content:a.content,enabled:1===a.enabled||!0===a.enabled,priority:Number(a.priority)||0,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function w(){return(await (0,d.cK)()).all("SELECT * FROM contextFiles ORDER BY priority ASC, createdAt ASC").map(v)}async function x(){let a=Date.now();return s&&a-t<5e3||(s=(await (0,d.cK)()).all("SELECT * FROM contextFiles WHERE enabled = 1 ORDER BY priority ASC, createdAt ASC").map(v),t=a),s}async function y(a){return v((await (0,d.cK)()).get("SELECT * FROM contextFiles WHERE id = ?",[a]))}async function z({name:a,content:b="",enabled:c=!0,priority:e=0}){let f=await (0,d.cK)(),g=(0,j.A)(),h=new Date().toISOString();return f.run(`INSERT INTO contextFiles(id, name, content, enabled, priority, createdAt, updatedAt)
|
|
23
|
-
VALUES(?, ?, ?, ?, ?, ?, ?)`,[g,String(a||"untitled"),String(b||""),+!!c,Number(e)||0,h,h]),u(),y(g)}async function A(a,b={}){let c=await y(a);if(!c)return null;let e=await (0,d.cK)(),f={name:void 0!==b.name?String(b.name):c.name,content:void 0!==b.content?String(b.content):c.content,enabled:void 0!==b.enabled?+!!b.enabled:+!!c.enabled,priority:void 0!==b.priority?Number(b.priority)||0:c.priority};return e.run("UPDATE contextFiles SET name = ?, content = ?, enabled = ?, priority = ?, updatedAt = ? WHERE id = ?",[f.name,f.content,f.enabled,f.priority,new Date().toISOString(),a]),u(),y(a)}async function B(a){return(await (0,d.cK)()).run("DELETE FROM contextFiles WHERE id = ?",[a]),u(),!0}async function C(a=[]){if(!Array.isArray(a)||0===a.length)return[];let b=await (0,d.cK)(),c=b.get("SELECT COALESCE(MAX(priority), -1) AS maxp FROM contextFiles"),e=(Number(c?.maxp)||-1)+1,f=[];return b.transaction(()=>{for(let c of a){let a=String(c?.name||"untitled").trim()||"untitled",d=String(c?.content||""),g=(0,j.A)(),h=new Date().toISOString();b.run(`INSERT INTO contextFiles(id, name, content, enabled, priority, createdAt, updatedAt)
|
|
24
|
-
VALUES(?, ?, ?, 0, ?, ?, ?)`,[g,a,d,e,h,h]),f.push({id:g,name:a}),e+=1}}),u(),f}var D=c(74452);function E(a){return a?{id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function F(){return(await (0,d.cK)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(E)}async function G(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function H(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function I(a){let b=await (0,d.cK)(),c=new Date().toISOString(),e={id:(0,j.A)(),name:a.name,kind:a.kind||null,models:a.models||[],createdAt:c,updatedAt:c};return b.run("INSERT INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[e.id,e.name,e.kind,(0,f.s)(e.models),e.createdAt,e.updatedAt]),e}async function J(a,b){let c=await (0,d.cK)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g={...E(d),...b,updatedAt:new Date().toISOString()};c.run("UPDATE combos SET name = ?, kind = ?, models = ?, updatedAt = ? WHERE id = ?",[g.name,g.kind,(0,f.s)(g.models||[]),g.updatedAt,a]),e=g}),e}async function K(a){let b=(await (0,d.cK)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}var L=c(9460),M=c(97914);let N="disabledModels";async function O(){let a=(await (0,d.cK)()).all("SELECT key, value FROM kv WHERE scope = ?",[N]),b={};for(let c of a)b[c.key]=(0,f.q)(c.value,[]);return b}async function P(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.cK)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=[...new Set([...d&&(0,f.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(e)])})}async function Q(a,b){if(!a)return;let c=await (0,d.cK)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=d&&(0,f.q)(d.value,[])||[],g=new Set(b),h=e.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(h)])})}var R=c(99703),S=c(18943);let T=new Set(["usageHistory","requestDetails","quotaCache"]),U=new Set(["_meta"]);async function V(){let a=await (0,d.cK)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),g=Object.keys(e.CG).filter(a=>!T.has(a)),h={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,f.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,createdAt:a.createdAt})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{},tables:Object.fromEntries(g.map(b=>[b,a.all(`SELECT * FROM "${b}"`)])),excludedTables:[...T]};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))h.modelAliases[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))h.customModels.push((0,f.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))h.mitmAlias[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))h.pricing[b.key]=(0,f.q)(b.value);return h}async function W(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.cK)();return b.transaction(()=>{if(a.tables&&"object"==typeof a.tables&&!Array.isArray(a.tables)){for(let a of Object.keys(e.CG).reverse())!T.has(a)&&(U.has(a)||b.run(`DELETE FROM "${a}"`));for(let[c,d]of Object.entries(a.tables))if(e.CG[c]&&Array.isArray(d)&&!U.has(c))for(let a of d){let d=Object.keys(a).filter(a=>e.CG[c].columns[a]);0!==d.length&&b.run(`INSERT INTO "${c}" (${d.map(a=>`"${a}"`).join(", ")}) VALUES (${d.map(()=>"?").join(", ")})`,d.map(b=>a[b]))}return}for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,f.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:e,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,e||"oauth",g||null,h||null,i||null,+(!1!==j),(0,f.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,e||null,(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),e||"unknown",(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.createdAt||new Date().toISOString()]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,f.s)(c.models||[]),c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,f.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,f.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,f.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,f.s)(d||{})])}),await V()}},74452:(a,b,c)=>{c.r(b),c.d(b,{admitApiKeyRequest:()=>p,checkApiKeyBudget:()=>s,createApiKey:()=>m,deleteApiKey:()=>q,getApiKeyById:()=>l,getApiKeys:()=>k,maskApiKey:()=>i,rotateApiKey:()=>o,updateApiKey:()=>n,validateApiKey:()=>r});var d=c(47293),e=c(36366);let f=new Map,g=new Map;function h(a){if(Array.isArray(a))return a;if(!a)return[];try{return JSON.parse(a)}catch{return[]}}function i(a){return a?a.length<=12?`${a.slice(0,4)}…`:`${a.slice(0,8)}…${a.slice(-4)}`:null}function j(a,b=!1){return a?{id:a.id,key:b?a.key:void 0,maskedKey:i(a.key),name:a.name,machineId:a.machineId,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt,budgetDaily:a.budgetDaily||0,budgetMonthly:a.budgetMonthly||0,requestsPerMinute:a.requestsPerMinute||0,allowedModels:h(a.allowedModels)}:null}async function k(a=!1){return(await (0,e.cK)()).all("SELECT * FROM apiKeys ORDER BY createdAt ASC").map(b=>j(b,a))}async function l(a,b=!1){return j((await (0,e.cK)()).get("SELECT * FROM apiKeys WHERE id = ?",[a]),b)}async function m(a,b){if(!b)throw Error("machineId is required");let f=await (0,e.cK)(),{generateApiKeyWithMachine:g}=await c.e(6844).then(c.bind(c,86844)),h=g(b),i={id:(0,d.A)(),name:a,key:h.key,machineId:b,isActive:!0,createdAt:new Date().toISOString()};return f.run("INSERT INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[i.id,i.key,i.name,i.machineId,1,i.createdAt]),i}async function n(a,b){let c=await (0,e.cK)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM apiKeys WHERE id = ?",[a]);if(!e)return;let f={...j(e,!0),...b};c.run("UPDATE apiKeys SET key = ?, name = ?, machineId = ?, isActive = ?, budgetDaily = ?, budgetMonthly = ?, requestsPerMinute = ?, allowedModels = ? WHERE id = ?",[f.key,f.name,f.machineId,+!!f.isActive,Number(f.budgetDaily)||0,Number(f.budgetMonthly)||0,Number(f.requestsPerMinute)||0,JSON.stringify(f.allowedModels||[]),a]),d=f}),d}async function o(a){let b=await (0,e.cK)(),d=b.get("SELECT * FROM apiKeys WHERE id = ?",[a]);if(!d)return null;let{generateApiKeyWithMachine:f}=await c.e(6844).then(c.bind(c,86844)),g=f(d.machineId).key;return b.run("UPDATE apiKeys SET key = ? WHERE id = ?",[g,a]),{...j({...d,key:g}),key:g}}async function p(a,b){let c=(await (0,e.cK)()).get("SELECT budgetDaily, budgetMonthly, requestsPerMinute, allowedModels FROM apiKeys WHERE key = ?",[a]);if(!c)return{allowed:!0,touch(){},release(){}};let d=h(c.allowedModels);if(d.length>0&&!d.includes(b))return{allowed:!1,status:403,reason:`Model ${b} is not allowed for this API key`};let i=Number(c.requestsPerMinute)||0;if(i>0){let b=Date.now(),c=(g.get(a)||[]).filter(a=>b-a<6e4);if(c.length>=i){let d=Math.max(1,Math.ceil((6e4-(b-c[0]))/1e3));return g.set(a,c),{allowed:!1,status:429,retryAfter:d,reason:"API key rate limit exceeded"}}c.push(b),!g.has(a)&&g.size>=1e4&&function(a){for(let[b,c]of g)(0===c.length||a-c[c.length-1]>=6e4)&&g.delete(b)}(b),g.set(a,c)}if(!(Number(c.budgetDaily)>0||Number(c.budgetMonthly)>0))return{allowed:!0,touch(){},release(){}};let j=Date.now(),k=f.get(a);if(k&&j-k.activeAt<6e4)return{allowed:!1,status:429,retryAfter:1,reason:"A budgeted request is already in progress"};let l={token:Symbol("budget-slot"),activeAt:j};return f.set(a,l),{allowed:!0,touch:()=>{let b=f.get(a);b?.token===l.token&&(b.activeAt=Date.now())},release:()=>{f.get(a)?.token===l.token&&f.delete(a)}}}async function q(a){let b=(await (0,e.cK)()).run("DELETE FROM apiKeys WHERE id = ?",[a]);return(b?.changes??0)>0}async function r(a){let b=(await (0,e.cK)()).get("SELECT isActive FROM apiKeys WHERE key = ?",[a]);return!!b&&(1===b.isActive||!0===b.isActive)}async function s(a){let b=await (0,e.cK)(),c=b.get("SELECT budgetDaily, budgetMonthly FROM apiKeys WHERE key = ?",[a]);if(!c)return{allowed:!0};let d=c.budgetDaily||0,f=c.budgetMonthly||0;if(d<=0&&f<=0)return{allowed:!0,budgetDaily:d,budgetMonthly:f};let g=0,h=0;try{if(d>0){let c=new Date;c.setHours(0,0,0,0);let d=b.get("SELECT COALESCE(SUM(cost), 0) AS total FROM usageHistory WHERE apiKey = ? AND timestamp >= ?",[a,c.toISOString()]);g=d?.total||0}if(f>0){let c=new Date;c.setDate(1),c.setHours(0,0,0,0);let d=b.get("SELECT COALESCE(SUM(cost), 0) AS total FROM usageHistory WHERE apiKey = ? AND timestamp >= ?",[a,c.toISOString()]);h=d?.total||0}}catch(a){return{allowed:!1,error:!0,reason:"Budget accounting unavailable"}}return d>0&&g>=d?{allowed:!1,reason:`Daily budget exceeded ($${g.toFixed(4)} / $${d})`,spentDaily:g,spentMonthly:h,budgetDaily:d,budgetMonthly:f}:f>0&&h>=f?{allowed:!1,reason:`Monthly budget exceeded ($${h.toFixed(4)} / $${f})`,spentDaily:g,spentMonthly:h,budgetDaily:d,budgetMonthly:f}:{allowed:!0,spentDaily:g,spentMonthly:h,budgetDaily:d,budgetMonthly:f}}},97914:(a,b,c)=>{c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(7341).then(c.bind(c,57341)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(7341).then(c.bind(c,57341));return e(a,b)}async function l(a){let b=await (0,d.cK)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.cK)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}},99703:(a,b,c)=>{c.d(b,{BY:()=>G,E5:()=>J,Zx:()=>K,_3:()=>I,_V:()=>n,d_:()=>E,j$:()=>H,rg:()=>B,sZ:()=>D,uw:()=>A});var d=c(94735),e=c(77598),f=c(36366),g=c(644);c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new d.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._usageWritesInFlight||(global._usageWritesInFlight=new Set);let h=global._pendingRequests,i=global._lastErrorProvider,j=global._pendingTimers,k=global._recentRing,l=global._connectionMapCache,m=global._usageWritesInFlight,n=global._statsEmitter;function o(a){let b=a?new Date(a):new Date;return`${b.getFullYear()}-${String(b.getMonth()+1).padStart(2,"0")}-${String(b.getDate()).padStart(2,"0")}`}function p(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cachedTokens=(a[b].cachedTokens||0)+(c.cachedTokens||0),a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}function q(a){return a&&"object"==typeof a&&(a.cached_tokens||a.prompt_tokens_details?.cached_tokens||a.cache_read_input_tokens)||0}function r(a,b,c){return`${a}|${b||"unknown"}|${c||"unknown"}`}function s(a,b,c){return`${a||"local-no-key"}|${b||"unknown"}|${c||"unknown"}`}function t(a){return(0,e.createHash)("sha256").update(String(a)).digest("hex").slice(0,20)}function u(a,b){return a?b?.name||`External Key ${t(a).slice(0,8)}`:"Local (No API Key)"}async function v(){if(Date.now()-l.ts<3e4)return l.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;l.map=d,l.ts=Date.now()}catch{}return l.map}async function w(){if(!k.initialized){k.initialized=!0;try{k.items=(await (0,f.cK)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,g.q)(a.tokens,{})}))}catch{}}}async function x(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let g=0,h=d.prompt_tokens||d.input_tokens||0,i=q(d),j=void 0!==d.cached_tokens||d.prompt_tokens_details?.cached_tokens!==void 0?Math.max(0,h-i):h;if(g+=j*(f.input/1e6),i>0){let a=f.cached||f.input;g+=a/1e6*i}let k=d.completion_tokens||d.output_tokens||0;g+=k*(f.output/1e6);let l=d.reasoning_tokens||0;if(l>0){let a=f.reasoning||f.output;g+=a/1e6*l}let m=d.cache_creation_input_tokens||0;if(m>0){let a=f.cache_creation||f.input;g+=a/1e6*m}return g}catch(a){return console.error("Error calculating cost:",a),0}}function y(a,b=20){let c=new Set;return a.filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=JSON.stringify([a.timestamp,a.model,a.provider,a.promptTokens,a.completionTokens]);return!c.has(b)&&(c.add(b),!0)}).slice(0,b)}function z(a,b,c){h.byModel[a]||(h.byModel[a]=0),h.byModel[a]=Math.max(0,h.byModel[a]+c),0===h.byModel[a]&&delete h.byModel[a],b&&(h.byAccount[b]||(h.byAccount[b]={}),h.byAccount[b][a]||(h.byAccount[b][a]=0),h.byAccount[b][a]=Math.max(0,h.byAccount[b][a]+c),0===h.byAccount[b][a]&&(delete h.byAccount[b][a],0===Object.keys(h.byAccount[b]).length&&delete h.byAccount[b]))}function A(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;if(z(f,c,d?1:-1),d){let a=function(a,b,c){let d=j[a];if(Array.isArray(d))return d;d&&(clearTimeout(d),z(b,c,-1));let e=[];return j[a]=e,e}(g,f,c),b=setTimeout(()=>{let a=j[g];if(Array.isArray(a)){let c=a.indexOf(b);c>=0&&a.splice(c,1),0===a.length&&delete j[g]}z(f,c,-1),n.emit("pending")},6e4);b.unref?.(),a.push(b)}else{let a=j[g];if(Array.isArray(a)){let b=a.shift();b&&clearTimeout(b),0===a.length&&delete j[g]}else a&&(clearTimeout(a),delete j[g])}!d&&e&&b&&(i.provider=b.toLowerCase(),i.ts=Date.now());let h=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});console.log(`[${h}] [PENDING] ${d?"START":"END"}${e?" (ERROR)":""} | provider=${b} | model=${a}`),n.emit("pending")}async function B(){let a=[],b=await v();for(let[c,d]of Object.entries(h.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}return await w(),{activeRequests:a,recentRequests:y([...k.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(a=>{let b=a.tokens||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-i.ts<1e4?i.provider:""}}async function C(a){try{let b=await (0,f.cK)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await x(a.provider,a.model,a.tokens);let c=a.tokens||{},d=c.prompt_tokens||c.input_tokens||0,e=c.completion_tokens||c.output_tokens||0;b.transaction(()=>{b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,d,e,a.cost||0,a.status||"ok",(0,g.s)(c),(0,g.s)(a.latency&&"object"==typeof a.latency?{latency:{ttft:a.latency.ttft||0,total:a.latency.total||0}}:{})]);let f=o(a.timestamp),h=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[f]),i=h?(0,g.q)(h.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};!function(a,b){let c=b.tokens?.prompt_tokens||b.tokens?.input_tokens||0,d=b.tokens?.completion_tokens||b.tokens?.output_tokens||0,e=q(b.tokens),f=b.cost||0,g={promptTokens:c,completionTokens:d,cachedTokens:e,cost:f};a.requests=(a.requests||0)+1,a.promptTokens=(a.promptTokens||0)+c,a.completionTokens=(a.completionTokens||0)+d,a.cachedTokens=(a.cachedTokens||0)+e,a.cost=(a.cost||0)+f,a.byProvider||={},a.byModel||={},a.byAccount||={},a.byApiKey||={},a.byEndpoint||={},b.provider&&p(a.byProvider,b.provider,g);let h=b.provider?`${b.model}|${b.provider}`:b.model;if(p(a.byModel,h,{...g,meta:{rawModel:b.model,provider:b.provider}}),b.connectionId){let c=r(b.connectionId,b.model,b.provider);p(a.byAccount,c,{...g,meta:{connectionId:b.connectionId,rawModel:b.model,provider:b.provider}})}let i=s(b.apiKey&&"string"==typeof b.apiKey?b.apiKey:null,b.model,b.provider);p(a.byApiKey,i,{...g,meta:{rawModel:b.model,provider:b.provider,apiKey:b.apiKey||null}});let j=b.endpoint||"Unknown",k=`${j}|${b.model}|${b.provider||"unknown"}`;p(a.byEndpoint,k,{...g,meta:{endpoint:j,rawModel:b.model,provider:b.provider}})}(i,a),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[f,(0,g.s)(i)]);let j=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),k=(j?parseInt(j.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(k)])}),k.items.push(a),k.items.length>50&&(k.items=k.items.slice(-50)),n.emit("update")}catch(a){console.error("Failed to save usage stats:",a)}}function D(a){let b=C(a);return m.add(b),b.finally(()=>m.delete(b)),b}async function E(){for(;m.size>0;)await Promise.allSettled([...m])}function F(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function G(a="all"){let b=await (0,f.cK)(),[{getProviderConnections:d},{getApiKeys:e},{getProviderNodes:j}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),k=[];try{k=await d()}catch{}let l={};for(let a of k)l[a.id]=a.name||a.email||a.id;let m={};try{for(let a of(await j()))a.id&&a.name&&(m[a.id]=a.name)}catch{}let n=[];try{n=await e(!0)}catch{}let v={};for(let a of n)v[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let w={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCachedTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:h,activeRequests:[],recentRequests:y(b.all("SELECT timestamp, provider, model, tokens, status FROM usageHistory ORDER BY id DESC LIMIT 100").map(a=>{let b=(0,g.q)(a.tokens,{})||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-i.ts<1e4?i.provider:""};for(let[a,b]of Object.entries(h.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=l[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);w.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let x=new Date,z=new Date(6e4*Math.floor(x.getTime()/6e4)),A=new Date(z.getTime()-54e4),B={};for(let a=0;a<10;a++){let b=z.getTime()-(9-a)*6e4;B[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},w.last10Minutes.push(B[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[A.toISOString(),x.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);B[b]&&(B[b].requests++,B[b].promptTokens+=a.promptTokens||0,B[b].completionTokens+=a.completionTokens||0,B[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60}[a]||null,d=F(b,c),e=c?Date.now()-864e5*c:0,f=b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[new Date(e).toISOString()]),h={};for(let a of f){let b=o(a.timestamp);(h[b]||=[]).push(a)}for(let a of d){let b=a.dateKey,c=(0,g.q)(a.data,{});for(let[a,b]of(w.totalPromptTokens+=c.promptTokens||0,w.totalCompletionTokens+=c.completionTokens||0,w.totalCachedTokens+=c.cachedTokens||0,w.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))w.byProvider[a]||(w.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),w.byProvider[a].requests+=b.requests||0,w.byProvider[a].promptTokens+=b.promptTokens||0,w.byProvider[a].completionTokens+=b.completionTokens||0,w.byProvider[a].cachedTokens=(w.byProvider[a].cachedTokens||0)+(b.cachedTokens||0),w.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=m[e]||e;w.byModel[f]||(w.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),w.byModel[f].requests+=d.requests||0,w.byModel[f].promptTokens+=d.promptTokens||0,w.byModel[f].completionTokens+=d.completionTokens||0,w.byModel[f].cachedTokens+=d.cachedTokens||0,w.byModel[f].cost+=d.cost||0,b>(w.byModel[f].lastUsed||"")&&(w.byModel[f].lastUsed=b)}let d=c.byAccount||{},e=Object.values(d).some(a=>!a?.connectionId),f=h[b]||[];for(let[a,h]of(e&&f.length===(c.requests||0)&&(d=function(a){let b={};for(let c of a){if(!c.connectionId)continue;let a=(0,g.q)(c.tokens,{})||{},d=c.promptTokens||a.prompt_tokens||a.input_tokens||0,e=c.completionTokens||a.completion_tokens||a.output_tokens||0;p(b,r(c.connectionId,c.model,c.provider),{requests:1,promptTokens:d,completionTokens:e,cachedTokens:q(a),cost:c.cost||0,meta:{connectionId:c.connectionId,rawModel:c.model||"",provider:c.provider||""}})}return b}(f)),Object.entries(d))){let c=h.connectionId||a,d=l[c]||`Account ${c.slice(0,8)}...`,e=h.rawModel||"",f=h.provider||"",g=m[f]||f,i=r(c,e,f);w.byAccount[i]||(w.byAccount[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:e,provider:g,providerId:f,connectionId:c,accountName:d,lastUsed:b}),w.byAccount[i].requests+=h.requests||0,w.byAccount[i].promptTokens+=h.promptTokens||0,w.byAccount[i].completionTokens+=h.completionTokens||0,w.byAccount[i].cachedTokens+=h.cachedTokens||0,w.byAccount[i].cost+=h.cost||0,b>(w.byAccount[i].lastUsed||"")&&(w.byAccount[i].lastUsed=b)}for(let[a,d]of Object.entries(c.byApiKey||{})){let c=d.rawModel||"",e=d.provider||"",f=m[e]||e,g=d.apiKey,h=g?v[g]:null,i=u(g,h),j=g||"local-no-key";w.byApiKey[a]||(w.byApiKey[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:f,apiKey:g,keyName:i,apiKeyKey:j,lastUsed:b}),w.byApiKey[a].requests+=d.requests||0,w.byApiKey[a].promptTokens+=d.promptTokens||0,w.byApiKey[a].completionTokens+=d.completionTokens||0,w.byApiKey[a].cachedTokens+=d.cachedTokens||0,w.byApiKey[a].cost+=d.cost||0,b>(w.byApiKey[a].lastUsed||"")&&(w.byApiKey[a].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=m[f]||f;w.byEndpoint[a]||(w.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),w.byEndpoint[a].requests+=d.requests||0,w.byEndpoint[a].promptTokens+=d.promptTokens||0,w.byEndpoint[a].completionTokens+=d.completionTokens||0,w.byEndpoint[a].cachedTokens+=d.cachedTokens||0,w.byEndpoint[a].cost+=d.cost||0,b>(w.byEndpoint[a].lastUsed||"")&&(w.byEndpoint[a].lastUsed=b)}}for(let a of f){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(w.byModel[c]&&new Date(b)>new Date(w.byModel[c].lastUsed)&&(w.byModel[c].lastUsed=b),a.connectionId){let c=r(a.connectionId,a.model,a.provider);w.byAccount[c]&&new Date(b)>new Date(w.byAccount[c].lastUsed)&&(w.byAccount[c].lastUsed=b)}let d=s(a.apiKey&&"string"==typeof a.apiKey?a.apiKey:null,a.model,a.provider);w.byApiKey[d]&&new Date(b)>new Date(w.byApiKey[d].lastUsed)&&(w.byApiKey[d].lastUsed=b);let e=a.endpoint||"Unknown",f=`${e}|${a.model}|${a.provider||"unknown"}`;w.byEndpoint[f]&&new Date(b)>new Date(w.byEndpoint[f].lastUsed)&&(w.byEndpoint[f].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,g.q)(a.tokens,{})||{},c=b.prompt_tokens||b.input_tokens||0,d=b.completion_tokens||b.output_tokens||0,e=q(b),f=a.cost||0,h=m[a.provider]||a.provider;w.totalPromptTokens+=c,w.totalCompletionTokens+=d,w.totalCachedTokens+=e,w.totalCost+=f,w.byProvider[a.provider]||(w.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),w.byProvider[a.provider].requests++,w.byProvider[a.provider].promptTokens+=c,w.byProvider[a.provider].completionTokens+=d,w.byProvider[a.provider].cachedTokens=(w.byProvider[a.provider].cachedTokens||0)+e,w.byProvider[a.provider].cost+=f;let i=a.provider?`${a.model} (${a.provider})`:a.model;if(w.byModel[i]||(w.byModel[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,lastUsed:a.timestamp}),w.byModel[i].requests++,w.byModel[i].promptTokens+=c,w.byModel[i].completionTokens+=d,w.byModel[i].cachedTokens+=e,w.byModel[i].cost+=f,new Date(a.timestamp)>new Date(w.byModel[i].lastUsed)&&(w.byModel[i].lastUsed=a.timestamp),a.connectionId){let b=l[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,g=r(a.connectionId,a.model,a.provider);w.byAccount[g]||(w.byAccount[g]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,providerId:a.provider,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),w.byAccount[g].requests++,w.byAccount[g].promptTokens+=c,w.byAccount[g].completionTokens+=d,w.byAccount[g].cachedTokens+=e,w.byAccount[g].cost+=f,new Date(a.timestamp)>new Date(w.byAccount[g].lastUsed)&&(w.byAccount[g].lastUsed=a.timestamp)}if(a.apiKey&&"string"==typeof a.apiKey){let b=v[a.apiKey],g=u(a.apiKey,b),i=s(a.apiKey,a.model,a.provider);w.byApiKey[i]||(w.byApiKey[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:a.apiKey,keyName:g,apiKeyKey:a.apiKey,lastUsed:a.timestamp});let j=w.byApiKey[i];j.requests++,j.promptTokens+=c,j.completionTokens+=d,j.cachedTokens+=e,j.cost+=f,new Date(a.timestamp)>new Date(j.lastUsed)&&(j.lastUsed=a.timestamp)}else{let b=s(null,a.model,a.provider);w.byApiKey[b]||(w.byApiKey[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:null,keyName:"Local (No API Key)",apiKeyKey:"local-no-key",lastUsed:a.timestamp});let g=w.byApiKey[b];g.requests++,g.promptTokens+=c,g.completionTokens+=d,g.cachedTokens+=e,g.cost+=f,new Date(a.timestamp)>new Date(g.lastUsed)&&(g.lastUsed=a.timestamp)}let j=a.endpoint||"Unknown",k=`${j}|${a.model}|${a.provider||"unknown"}`;w.byEndpoint[k]||(w.byEndpoint[k]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:j,rawModel:a.model,provider:h,lastUsed:a.timestamp});let n=w.byEndpoint[k];n.requests++,n.promptTokens+=c,n.completionTokens+=d,n.cachedTokens+=e,n.cost+=f,new Date(a.timestamp)>new Date(n.lastUsed)&&(n.lastUsed=a.timestamp)}}return w.totalRequests=Object.values(w.byProvider).reduce((a,b)=>a+(b.requests||0),0),w.byApiKey=function(a,b){let c={};for(let[d,e]of Object.entries(a||{})){let a="string"==typeof e.apiKey&&e.apiKey?e.apiKey:null,f=a?b[a]:null,g=a?f?.id||`external-${t(a)}`:"local-no-key",h={...e,apiKeyKey:g};delete h.apiKey,c[`bucket-${t(d)}`]=h}return c}(w.byApiKey,v),w}async function H(a="7d"){let b=await (0,f.cK)(),c=Date.now();if("today"===a){let a=new Date;a.setHours(0,0,0,0);let c=a.getTime(),d=c+864e5,e=Array.from({length:24},(a,b)=>({label:new Date(c+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(c).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<c||b>=d)continue;let f=Math.floor((b-c)/36e5);f>=0&&f<24&&(e[f].tokens+=(a.promptTokens||0)+(a.completionTokens||0),e[f].cost+=a.cost||0)}return e}if("24h"===a){let a=c-864e5,d=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let e of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let b=new Date(e.timestamp).getTime();if(b<a||b>c)continue;let f=Math.min(Math.floor((b-a)/36e5),23);d[f].tokens+=(e.promptTokens||0)+(e.completionTokens||0),d[f].cost+=e.cost||0}return d}let d="7d"===a?7:"30d"===a?30:60,e=new Date,h=F(b,d),i={};for(let a of h)i[a.dateKey]=(0,g.q)(a.data,{});return Array.from({length:d},(a,b)=>{let c=new Date(e);c.setDate(c.getDate()-(d-1-b));let f=i[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),tokens:f?(f.promptTokens||0)+(f.completionTokens||0):0,cost:f&&f.cost||0}})}async function I(a=3e5,b=2){let c=new Map;try{let d=await (0,f.cK)(),e=new Date(Date.now()-a).toISOString(),h=d.all("SELECT provider, connectionId, meta FROM usageHistory WHERE timestamp >= ? AND status = 'ok'",[e]),i=new Map;for(let a of h){if(!a.provider||!a.connectionId)continue;let b=(0,g.q)(a.meta,{}),c=b?.latency?.total;if("number"!=typeof c||c<=0)continue;let d=`${a.provider}|${a.connectionId}`,e=i.get(d)||{total:0,count:0};e.total+=c,e.count+=1,i.set(d,e)}for(let[a,d]of i.entries())d.count>=b&&c.set(a,{avgMs:Math.round(d.total/d.count),samples:d.count})}catch(a){console.error("[usageRepo] getLatencyStats failed:",a.message)}return c}async function J(){}async function K(a=200){try{let b=(await (0,f.cK)()).all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let d={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))d[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",e=a.model||"-",f=d[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),h=a.tokens?(0,g.q)(a.tokens,{}):{},i=a.promptTokens??h.prompt_tokens??"-",j=a.completionTokens??h.completion_tokens??"-";return`${b} | ${e} | ${c} | ${f} | ${i} | ${j} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=9071,exports.ids=[9071],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a){let b;try{b=a()}catch(a){return}return{getItem:a=>{var c;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(c=b.getItem(a))?c:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,c)=>b.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>b.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(e(),void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},2116:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={default:function(){return p},useLinkStatus:function(){return r}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(24814),g=c(48249),h=f._(c(67484)),i=c(79925),j=c(30836),k=c(57272),l=c(30167),m=c(75729);c(95478),c(52204);let n=c(78756);c(52836);let o=c(10881);function p(a){var b,c;let d,e,f,[p,r]=(0,h.useOptimistic)(n.IDLE_LINK_STATUS),s=(0,h.useRef)(null),{href:t,as:u,children:v,prefetch:w=null,passHref:x,replace:y,shallow:z,scroll:A,onClick:B,onMouseEnter:C,onTouchStart:D,legacyBehavior:E=!1,onNavigate:F,transitionTypes:G,ref:H,unstable_dynamicOnHover:I,...J}=a;d=v,E&&("string"==typeof d||"number"==typeof d)&&(d=(0,g.jsx)("a",{children:d}));let K=h.default.useContext(j.AppRouterContext),L=!1!==w,M=!1!==w?null===(c=w)||"auto"===c?o.FetchStrategy.PPR:o.FetchStrategy.Full:o.FetchStrategy.PPR,N="string"==typeof(b=u||t)?b:(0,i.formatUrl)(b);if(E){if(d?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});e=h.default.Children.only(d)}let O=E?e&&"object"==typeof e&&e.ref:H,P=h.default.useCallback(a=>(null!==K&&(s.current=(0,n.mountLinkInstance)(a,N,K,M,L,r)),()=>{s.current&&((0,n.unmountLinkForCurrentNavigation)(s.current),s.current=null),(0,n.unmountPrefetchableInstance)(a)}),[L,N,K,M,r]),Q={ref:(0,k.useMergedRef)(P,O),onClick(a){E||"function"!=typeof B||B(a),E&&e.props&&"function"==typeof e.props.onClick&&e.props.onClick(a),K&&a.defaultPrevented},onMouseEnter(a){E||"function"!=typeof C||C(a),E&&e.props&&"function"==typeof e.props.onMouseEnter&&e.props.onMouseEnter(a),K&&L&&(0,n.onNavigationIntent)(a.currentTarget,!0===I)},onTouchStart:function(a){E||"function"!=typeof D||D(a),E&&e.props&&"function"==typeof e.props.onTouchStart&&e.props.onTouchStart(a),K&&L&&(0,n.onNavigationIntent)(a.currentTarget,!0===I)}};return(0,l.isAbsoluteUrl)(N)?Q.href=N:E&&!x&&("a"!==e.type||"href"in e.props)||(Q.href=(0,m.addBasePath)(N)),f=E?h.default.cloneElement(e,Q):(0,g.jsx)("a",{...J,...Q,children:d}),(0,g.jsx)(q.Provider,{value:p,children:f})}c(13366);let q=(0,h.createContext)(n.IDLE_LINK_STATUS),r=()=>(0,h.useContext)(q);("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},10571:(a,b)=>{"use strict";function c(a){let b=a.indexOf("#"),c=a.indexOf("?"),d=c>-1&&(b<0||c<b);return d||b>-1?{pathname:a.substring(0,d?c:b),query:d?a.substring(c,b>-1?b:void 0):"",hash:b>-1?a.slice(b):""}:{pathname:a,query:"",hash:""}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parsePath",{enumerable:!0,get:function(){return c}})},13366:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"errorOnce",{enumerable:!0,get:function(){return c}});let c=a=>{}},14953:(a,b,c)=>{"use strict";var d=c(68662);function e(){}function f(){}f.resetWarningCache=e,a.exports=function(){function a(a,b,c,e,f,g){if(g!==d){var h=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function b(){return a}a.isRequired=a;var c={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:b,element:a,elementType:a,instanceOf:b,node:a,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:f,resetWarningCache:e};return c.PropTypes=c,c}},19099:(a,b,c)=>{"use strict";var d=c(54839);c.o(d,"notFound")&&c.d(b,{notFound:function(){return d.notFound}}),c.o(d,"useParams")&&c.d(b,{useParams:function(){return d.useParams}}),c.o(d,"usePathname")&&c.d(b,{usePathname:function(){return d.usePathname}}),c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},34956:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return f}});let d=c(62043),e=c(10571),f=a=>{if(!a.startsWith("/"))return a;let{pathname:b,query:c,hash:f}=(0,e.parsePath)(a);return`${(0,d.removeTrailingSlash)(b)}${c}${f}`};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},49885:(a,b,c)=>{a.exports=c(14953)()},52836:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isLocalURL",{enumerable:!0,get:function(){return f}});let d=c(30167),e=c(71742);function f(a){if(!(0,d.isAbsoluteUrl)(a))return!0;try{let b=(0,d.getLocationOrigin)(),c=new URL(a,b);return c.origin===b&&(0,e.hasBasePath)(c.pathname)}catch(a){return!1}}},55091:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(5735),e=c(22675);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},55729:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(10571);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},57272:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=c(67484);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},62043:(a,b)=>{"use strict";function c(a){return a.replace(/\/$/,"")||"/"}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeTrailingSlash",{enumerable:!0,get:function(){return c}})},68662:a=>{"use strict";a.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},71e3:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathPrefix",{enumerable:!0,get:function(){return e}});let d=c(10571);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return`${b}${c}${e}${f}`}},71742:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"hasBasePath",{enumerable:!0,get:function(){return e}});let d=c(55729);function e(a){return(0,d.pathHasPrefix)(a,"")}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},75329:a=>{a.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},75729:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addBasePath",{enumerable:!0,get:function(){return f}});let d=c(71e3),e=c(34956);function f(a,b){return(0,e.normalizePathTrailingSlash)((0,d.addPathPrefix)(a,""))}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},79925:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={formatUrl:function(){return h},formatWithValidation:function(){return j},urlObjectKeys:function(){return i}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(24814)._(c(90485)),g=/https?|ftp|gopher|file/;function h(a){let{auth:b,hostname:c}=a,d=a.protocol||"",e=a.pathname||"",h=a.hash||"",i=a.query||"",j=!1;b=b?encodeURIComponent(b).replace(/%3A/i,":")+"@":"",a.host?j=b+a.host:c&&(j=b+(~c.indexOf(":")?`[${c}]`:c),a.port&&(j+=":"+a.port)),i&&"object"==typeof i&&(i=String(f.urlQueryToSearchParams(i)));let k=a.search||i&&`?${i}`||"";return d&&!d.endsWith(":")&&(d+=":"),a.slashes||(!d||g.test(d))&&!1!==j?(j="//"+(j||""),e&&"/"!==e[0]&&(e="/"+e)):j||(j=""),h&&"#"!==h[0]&&(h="#"+h),k&&"?"!==k[0]&&(k="?"+k),e=e.replace(/[?#]/g,encodeURIComponent),k=k.replace("#","%23"),`${d}${j}${e}${k}${h}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function j(a){return h(a)}}};
|