ktrouter 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +4 -3
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/routes-manifest.json +6 -0
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js +3 -3
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/health/route.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/locale/route.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/custom/route.js +1 -1
- package/app/.next/server/app/api/models/disabled/route.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
- package/app/.next/server/app/api/oauth/codex/import/route.js +1 -0
- package/app/.next/server/app/api/oauth/codex/import/route.js.nft.json +1 -0
- package/app/.next/server/app/api/oauth/codex/import/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/browser-login/route.js +2 -2
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/export/route.js +1 -1
- package/app/.next/server/app/api/providers/import/route.js +1 -1
- package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next/server/app/api/settings/database/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/update/check/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +2 -2
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1/search/route.js +1 -1
- package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.html +1 -1
- package/app/.next/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/quota.html +2 -2
- package/app/.next/server/app/dashboard/quota.rsc +7 -7
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/skills.html +1 -1
- package/app/.next/server/app/dashboard/skills.rsc +6 -6
- package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +6 -6
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/favicon.ico/route.js +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +4 -3
- package/app/.next/server/chunks/2549.js +1 -1
- package/app/.next/server/chunks/2722.js +1 -1
- package/app/.next/server/chunks/3110.js +1 -1
- package/app/.next/server/chunks/412.js +2 -2
- package/app/.next/server/chunks/4315.js +1 -1
- package/app/.next/server/chunks/4632.js +1 -1
- package/app/.next/server/chunks/4746.js +1 -1
- package/app/.next/server/chunks/4884.js +2 -2
- package/app/.next/server/chunks/5718.js +4 -4
- package/app/.next/server/chunks/7153.js +1 -1
- package/app/.next/server/chunks/7482.js +2 -2
- package/app/.next/server/chunks/8895.js +1 -1
- package/app/.next/server/chunks/8918.js +1 -0
- package/app/.next/server/chunks/9142.js +1 -1
- package/app/.next/server/chunks/9609.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/static/4vJswhx16aiNl7bDC9l2Y/_buildManifest.js +1 -0
- package/app/{.next-cli-build/static/chunks/1321-692c424aab14b711.js → .next/static/chunks/1321-4b5a6b5dc2e27bb8.js} +1 -1
- package/app/{.next-cli-build/static/chunks/5497-4c26400a80ef0b62.js → .next/static/chunks/5497-8943eacfa24c9e92.js} +2 -2
- package/app/.next/static/chunks/{6069-ea583294622123ad.js → 6069-04005e2b3cb91558.js} +5 -5
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-cccaf25e5d3dd911.js → page-a1d11237eec06feb.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-fd3343e5e62687cc.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/layout-480b56a846edc452.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/auth/status/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/health/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/custom/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/disabled/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/codex/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/browser-login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/export/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/update/check/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/info/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/search/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/manifest.webmanifest/route-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/app/page-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-382f2e6aec095e3e.js +1 -0
- package/app/.next/static/css/4c73f96ea113dfc4.css +1 -0
- package/app/.next-cli-build/static/4vJswhx16aiNl7bDC9l2Y/_buildManifest.js +1 -0
- package/app/{.next/static/chunks/1321-692c424aab14b711.js → .next-cli-build/static/chunks/1321-4b5a6b5dc2e27bb8.js} +1 -1
- package/app/{.next/static/chunks/5497-4c26400a80ef0b62.js → .next-cli-build/static/chunks/5497-8943eacfa24c9e92.js} +2 -2
- package/app/.next-cli-build/static/chunks/{6069-ea583294622123ad.js → 6069-04005e2b3cb91558.js} +5 -5
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-cccaf25e5d3dd911.js → page-a1d11237eec06feb.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-fd3343e5e62687cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-480b56a846edc452.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cloud/auth/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cloud/credentials/update/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cloud/model/resolve/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cloud/models/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/browser-login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/export/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/import/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/update/check/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-382f2e6aec095e3e.js +1 -0
- package/app/.next-cli-build/static/css/4c73f96ea113dfc4.css +1 -0
- package/app/package.json +1 -1
- package/app/src/mitm/server.js +6 -6
- package/package.json +1 -1
- package/app/.next/server/chunks/5236.js +0 -1
- package/app/.next/static/cTrKdjFen8_Jgs_D0NzQj/_buildManifest.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-7ef54d2cf4eee7d0.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/layout-03b6cac1c6e1f41c.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/auth/status/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/health/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/custom/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/disabled/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/browser-login/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/export/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/update/check/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/info/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/search/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/app/page-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-96eac4861f242fd9.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-96eac4861f242fd9.js +0 -1
- package/app/.next/static/css/712c443ed43dbfcd.css +0 -1
- package/app/.next-cli-build/static/cTrKdjFen8_Jgs_D0NzQj/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7ef54d2cf4eee7d0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-03b6cac1c6e1f41c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cloud/auth/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cloud/credentials/update/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cloud/model/resolve/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cloud/models/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/browser-login/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/export/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/import/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/update/check/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-96eac4861f242fd9.js +0 -1
- package/app/.next-cli-build/static/css/712c443ed43dbfcd.css +0 -1
- /package/app/.next/static/{cTrKdjFen8_Jgs_D0NzQj → 4vJswhx16aiNl7bDC9l2Y}/_ssgManifest.js +0 -0
- /package/app/.next-cli-build/static/{cTrKdjFen8_Jgs_D0NzQj → 4vJswhx16aiNl7bDC9l2Y}/_ssgManifest.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[21110,["3862","static/chunks/1a258343-5938f676ed376386.js","2194","static/chunks/2194-0ae5c1abf92e1815.js","698","static/chunks/698-57b11f0d345c21be.js","1321","static/chunks/1321-
|
|
3
|
-
3:I[94635,["1321","static/chunks/1321-
|
|
2
|
+
2:I[21110,["3862","static/chunks/1a258343-5938f676ed376386.js","2194","static/chunks/2194-0ae5c1abf92e1815.js","698","static/chunks/698-57b11f0d345c21be.js","1321","static/chunks/1321-4b5a6b5dc2e27bb8.js","5497","static/chunks/5497-8943eacfa24c9e92.js","9305","static/chunks/app/(dashboard)/layout-480b56a846edc452.js"],"ThemeProvider"]
|
|
3
|
+
3:I[94635,["1321","static/chunks/1321-4b5a6b5dc2e27bb8.js","7177","static/chunks/app/layout-ed446c17642f5aeb.js"],"RuntimeI18nProvider"]
|
|
4
4
|
4:I[57121,[],""]
|
|
5
5
|
5:I[74581,[],""]
|
|
6
6
|
:HL["/_next/static/css/454db3b478540e33.css","style"]
|
|
7
|
-
:HL["/_next/static/css/
|
|
8
|
-
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/454db3b478540e33.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/
|
|
7
|
+
:HL["/_next/static/css/4c73f96ea113dfc4.css","style"]
|
|
8
|
+
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/454db3b478540e33.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/4c73f96ea113dfc4.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"if(document.fonts&&document.fonts.ready){document.fonts.ready.then(function(){document.documentElement.classList.add('fonts-loaded')})}else{document.documentElement.classList.add('fonts-loaded')}"}}]}],["$","body",null,{"className":"__variable_f367f3 font-sans antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}]}]}]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"4vJswhx16aiNl7bDC9l2Y"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[90484,[],"OutletBoundary"]
|
|
3
3
|
3:"$Sreact.suspense"
|
|
4
|
-
0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
4
|
+
0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"4vJswhx16aiNl7bDC9l2Y"}
|
|
5
5
|
4:null
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
2:I[57121,[],""]
|
|
3
3
|
3:I[74581,[],""]
|
|
4
4
|
4:[]
|
|
5
|
-
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"
|
|
5
|
+
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"4vJswhx16aiNl7bDC9l2Y"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
:HL["/_next/static/css/454db3b478540e33.css","style"]
|
|
2
|
-
:HL["/_next/static/css/
|
|
3
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"
|
|
2
|
+
:HL["/_next/static/css/4c73f96ea113dfc4.css","style"]
|
|
3
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"4vJswhx16aiNl7bDC9l2Y"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7758,a.ids=[7758],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2648:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{POST:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(89718),x=c(34013),y=c(65573),z=c(33792),A=c(77309);async function B(a){try{let{password:b}=await a.json(),c=await (0,w.mt)(),d=c.password;if("oidc"===c.authMode&&(0,A.EJ)(c))return v.NextResponse.json({error:"Password login is disabled. Use OIDC sign in."},{status:403});let e=!1;if(d)e=await x.Ay.compare(b,d);else{let a=process.env.INITIAL_PASSWORD||"123456";e=b===a}if(e){let b=await (0,y.UL)();return await (0,z.tm)(b,a),v.NextResponse.json({success:!0})}return v.NextResponse.json({error:"Invalid password"},{status:401})}catch(a){return v.NextResponse.json({error:a.message},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\login\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/route";"/index"===d&&(d="/");let e=await C.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||C.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===C.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await C.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>C.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>C.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),b}},k=await C.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4013,4884],()=>b(b.s=2648));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7758,a.ids=[7758],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},25175:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{POST:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(89718),x=c(34013),y=c(65573),z=c(33792),A=c(77309);async function B(a){try{let{password:b}=await a.json(),c=await (0,w.mt)(),d=c.password;if("oidc"===c.authMode&&(0,A.EJ)(c))return v.NextResponse.json({error:"Password login is disabled. Use OIDC sign in."},{status:403});let e=!1;if(d)e=await x.Ay.compare(b,d);else{let a=process.env.INITIAL_PASSWORD||"123456";e=b===a}if(e){let b=await (0,y.UL)();return await (0,z.tm)(b,a),v.NextResponse.json({success:!0})}return v.NextResponse.json({error:"Invalid password"},{status:401})}catch(a){return v.NextResponse.json({error:a.message},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\login\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/route";"/index"===d&&(d="/");let e=await C.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||C.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===C.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await C.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>C.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>C.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),b}},k=await C.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4013,4884],()=>b(b.s=25175));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8489,a.ids=[8489],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{"use strict";c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},36308:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{POST:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(33792);async function y(){let a=await (0,w.UL)();return(0,x.OZ)(a),a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier"),v.NextResponse.json({success:!0})}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\logout\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69614:(a,b,c)=>{"use strict";c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935],()=>b(b.s=36308));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=8489,a.ids=[8489],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{"use strict";c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69614:(a,b,c)=>{"use strict";c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},78335:()=>{},80994:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{POST:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(33792);async function y(){let a=await (0,w.UL)();return(0,x.OZ)(a),a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier"),v.NextResponse.json({success:!0})}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\logout\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935],()=>b(b.s=80994));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=4674,a.ids=[4674],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16860:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(77309),y=c(33792);function z(a){a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier")}async function A(a){let b=new URL(a.url),c=b.searchParams.get("error");if(c)return v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(c)}`,(0,x.iw)(a)));let d=b.searchParams.get("code"),e=b.searchParams.get("state");if(!d||!e)return v.NextResponse.redirect(new URL("/login?error=oidc_missing_code",(0,x.iw)(a)));let f=await (0,w.UL)(),g=f.get("oidc_state")?.value,h=f.get("oidc_nonce")?.value,i=f.get("oidc_code_verifier")?.value;if(!g||!h||!i||g!==e)return z(f),v.NextResponse.redirect(new URL("/login?error=oidc_invalid_state",(0,x.iw)(a)));try{let b=await (0,x.Mj)();if(!b)return z(f),v.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,x.iw)(a)));let c=await (0,x.Ir)(b.issuerUrl),e=c.issuer||b.issuerUrl,g=`${(0,x.iw)(a)}/api/auth/oidc/callback`,j=await (0,x.sP)({tokenEndpoint:c.token_endpoint,clientId:b.clientId,clientSecret:b.clientSecret,code:d,redirectUri:g,codeVerifier:i});if(!j.id_token)throw Error("OIDC provider did not return an id_token");let k=await (0,x.x8)({idToken:j.id_token,issuer:e,audience:b.clientId,jwksUri:c.jwks_uri,nonce:h});return z(f),await (0,y.tm)(f,a,{oidc:!0,oidcSub:k.sub||null,oidcEmail:(0,x.Rj)(k)||null,oidcName:(0,x.Ui)(k)}),v.NextResponse.redirect(new URL("/dashboard",(0,x.iw)(a)))}catch(b){return z(f),v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_callback_failed")}`,(0,x.iw)(a)))}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/callback/route",pathname:"/api/auth/oidc/callback",filename:"route",bundlePath:"app/api/auth/oidc/callback/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\callback\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/callback/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||B.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===B.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await B.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=16860));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=4674,a.ids=[4674],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},47097:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(77309),y=c(33792);function z(a){a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier")}async function A(a){let b=new URL(a.url),c=b.searchParams.get("error");if(c)return v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(c)}`,(0,x.iw)(a)));let d=b.searchParams.get("code"),e=b.searchParams.get("state");if(!d||!e)return v.NextResponse.redirect(new URL("/login?error=oidc_missing_code",(0,x.iw)(a)));let f=await (0,w.UL)(),g=f.get("oidc_state")?.value,h=f.get("oidc_nonce")?.value,i=f.get("oidc_code_verifier")?.value;if(!g||!h||!i||g!==e)return z(f),v.NextResponse.redirect(new URL("/login?error=oidc_invalid_state",(0,x.iw)(a)));try{let b=await (0,x.Mj)();if(!b)return z(f),v.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,x.iw)(a)));let c=await (0,x.Ir)(b.issuerUrl),e=c.issuer||b.issuerUrl,g=`${(0,x.iw)(a)}/api/auth/oidc/callback`,j=await (0,x.sP)({tokenEndpoint:c.token_endpoint,clientId:b.clientId,clientSecret:b.clientSecret,code:d,redirectUri:g,codeVerifier:i});if(!j.id_token)throw Error("OIDC provider did not return an id_token");let k=await (0,x.x8)({idToken:j.id_token,issuer:e,audience:b.clientId,jwksUri:c.jwks_uri,nonce:h});return z(f),await (0,y.tm)(f,a,{oidc:!0,oidcSub:k.sub||null,oidcEmail:(0,x.Rj)(k)||null,oidcName:(0,x.Ui)(k)}),v.NextResponse.redirect(new URL("/dashboard",(0,x.iw)(a)))}catch(b){return z(f),v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_callback_failed")}`,(0,x.iw)(a)))}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/callback/route",pathname:"/api/auth/oidc/callback",filename:"route",bundlePath:"app/api/auth/oidc/callback/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\callback\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/callback/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||B.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===B.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await B.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=47097));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9709,a.ids=[9709],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5966:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(77309),y=c(33792);async function z(a){try{let b=await (0,x.Mj)();if(!b)return v.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,x.iw)(a)));let c=await (0,x.Ir)(b.issuerUrl),d=(0,x.Pf)(),e=(0,x.hT)(),{verifier:f,challenge:g}=(0,x.GY)(),h=`${(0,x.iw)(a)}/api/auth/oidc/callback`,i=(0,x.gR)({authorizationEndpoint:c.authorization_endpoint,clientId:b.clientId,redirectUri:h,scopes:b.scopes,state:d,nonce:e,codeChallenge:g}),j=await (0,w.UL)(),k={httpOnly:!0,secure:(0,y.YK)(a),sameSite:"lax",path:"/",maxAge:600};return j.set("oidc_state",d,k),j.set("oidc_nonce",e,k),j.set("oidc_code_verifier",f,k),v.NextResponse.redirect(i)}catch(b){return v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_start_failed")}`,(0,x.iw)(a)))}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/start/route",pathname:"/api/auth/oidc/start",filename:"route",bundlePath:"app/api/auth/oidc/start/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\start\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/start/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||A.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===A.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await A.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=5966));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9709,a.ids=[9709],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},42155:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(77309),y=c(33792);async function z(a){try{let b=await (0,x.Mj)();if(!b)return v.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,x.iw)(a)));let c=await (0,x.Ir)(b.issuerUrl),d=(0,x.Pf)(),e=(0,x.hT)(),{verifier:f,challenge:g}=(0,x.GY)(),h=`${(0,x.iw)(a)}/api/auth/oidc/callback`,i=(0,x.gR)({authorizationEndpoint:c.authorization_endpoint,clientId:b.clientId,redirectUri:h,scopes:b.scopes,state:d,nonce:e,codeChallenge:g}),j=await (0,w.UL)(),k={httpOnly:!0,secure:(0,y.YK)(a),sameSite:"lax",path:"/",maxAge:600};return j.set("oidc_state",d,k),j.set("oidc_nonce",e,k),j.set("oidc_code_verifier",f,k),v.NextResponse.redirect(i)}catch(b){return v.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_start_failed")}`,(0,x.iw)(a)))}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/start/route",pathname:"/api/auth/oidc/start",filename:"route",bundlePath:"app/api/auth/oidc/start/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\start\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/start/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||A.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===A.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await A.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=42155));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6091,a.ids=[6091],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10607:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{POST:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(89718),y=c(77309),z=c(33792);async function A(){if(!1===(await (0,x.mt)()).requireLogin)return!0;let a=await (0,w.UL)(),b=a.get(z.bR)?.value;return await (0,z.Dc)(b)}async function B(a){try{if(!await A())return v.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json().catch(()=>({})),c=await (0,x.mt)(),d=String(b.issuerUrl||c.oidcIssuerUrl||"").trim(),e=String(b.clientId||c.oidcClientId||"").trim(),f=String(b.scopes||c.oidcScopes||"openid profile email").trim()||"openid profile email",g=String(Object.prototype.hasOwnProperty.call(b,"clientSecret")?b.clientSecret:c.oidcClientSecret||"").trim();if(!d)return v.NextResponse.json({error:"Issuer URL is required"},{status:400});if(!e)return v.NextResponse.json({error:"Client ID is required"},{status:400});let h=await (0,y.Ir)(d),i=`${(0,y.iw)(a)}/api/auth/oidc/callback`,j=await (0,y.HO)({tokenEndpoint:h.token_endpoint,clientId:e,clientSecret:g,redirectUri:i});if(j.tested&&!1===j.valid)return v.NextResponse.json({ok:!1,discoveryOk:!0,clientSecretTested:!0,clientSecretValid:!1,issuerUrl:d,clientId:e,scopes:f,redirectUri:i,authorizationEndpoint:h.authorization_endpoint||"",tokenEndpoint:h.token_endpoint||"",jwksUri:h.jwks_uri||"",error:`Discovery loaded, but the client secret is not valid: ${j.message}`});return v.NextResponse.json({ok:!0,discoveryOk:!0,clientSecretTested:j.tested,clientSecretValid:j.valid,issuerUrl:d,clientId:e,scopes:f,redirectUri:i,authorizationEndpoint:h.authorization_endpoint||"",tokenEndpoint:h.token_endpoint||"",jwksUri:h.jwks_uri||"",message:j.message})}catch(a){return v.NextResponse.json({error:a.message||"OIDC test failed"},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/test/route",pathname:"/api/auth/oidc/test",filename:"route",bundlePath:"app/api/auth/oidc/test/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\test\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/test/route";"/index"===d&&(d="/");let e=await C.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||C.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===C.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await C.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>C.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>C.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),b}},k=await C.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=10607));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6091,a.ids=[6091],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},88729:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{POST:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(89718),y=c(77309),z=c(33792);async function A(){if(!1===(await (0,x.mt)()).requireLogin)return!0;let a=await (0,w.UL)(),b=a.get(z.bR)?.value;return await (0,z.Dc)(b)}async function B(a){try{if(!await A())return v.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json().catch(()=>({})),c=await (0,x.mt)(),d=String(b.issuerUrl||c.oidcIssuerUrl||"").trim(),e=String(b.clientId||c.oidcClientId||"").trim(),f=String(b.scopes||c.oidcScopes||"openid profile email").trim()||"openid profile email",g=String(Object.prototype.hasOwnProperty.call(b,"clientSecret")?b.clientSecret:c.oidcClientSecret||"").trim();if(!d)return v.NextResponse.json({error:"Issuer URL is required"},{status:400});if(!e)return v.NextResponse.json({error:"Client ID is required"},{status:400});let h=await (0,y.Ir)(d),i=`${(0,y.iw)(a)}/api/auth/oidc/callback`,j=await (0,y.HO)({tokenEndpoint:h.token_endpoint,clientId:e,clientSecret:g,redirectUri:i});if(j.tested&&!1===j.valid)return v.NextResponse.json({ok:!1,discoveryOk:!0,clientSecretTested:!0,clientSecretValid:!1,issuerUrl:d,clientId:e,scopes:f,redirectUri:i,authorizationEndpoint:h.authorization_endpoint||"",tokenEndpoint:h.token_endpoint||"",jwksUri:h.jwks_uri||"",error:`Discovery loaded, but the client secret is not valid: ${j.message}`});return v.NextResponse.json({ok:!0,discoveryOk:!0,clientSecretTested:j.tested,clientSecretValid:j.valid,issuerUrl:d,clientId:e,scopes:f,redirectUri:i,authorizationEndpoint:h.authorization_endpoint||"",tokenEndpoint:h.token_endpoint||"",jwksUri:h.jwks_uri||"",message:j.message})}catch(a){return v.NextResponse.json({error:a.message||"OIDC test failed"},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/oidc/test/route",pathname:"/api/auth/oidc/test",filename:"route",bundlePath:"app/api/auth/oidc/test/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\oidc\\test\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/test/route";"/index"===d&&(d="/");let e=await C.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||C.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===C.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await C.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>C.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>C.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),b}},k=await C.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,B),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=88729));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7473,a.ids=[7473],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32432:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(89718),y=c(77309),z=c(33792);async function A(){try{let a=await (0,x.mt)(),b=await (0,w.UL)(),c=await (0,z.dY)(b.get(z.bR)?.value),d=!1!==a.requireLogin,e=a.authMode||"password",f=String(c?.oidcName||"").trim(),g=String(c?.oidcEmail||"").trim(),h=f||g||(c?.oidc?"OIDC user":"Password user"),i=c?.oidc?"OIDC":"Password";return v.NextResponse.json({requireLogin:d,authMode:e,oidcConfigured:(0,y.EJ)(a),oidcLoginLabel:(a.oidcLoginLabel||"Sign in with OIDC").trim()||"Sign in with OIDC",hasPassword:!!a.password,displayName:h,loginMethod:i,oidcName:f||null,oidcEmail:g||null,oidcLogin:!!c?.oidc})}catch{return v.NextResponse.json({requireLogin:!0,authMode:"password",oidcConfigured:!1,oidcLoginLabel:"Sign in with OIDC",hasPassword:!1,displayName:"Password user",loginMethod:"Password",oidcName:null,oidcEmail:null,oidcLogin:!1})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/status/route",pathname:"/api/auth/status",filename:"route",bundlePath:"app/api/auth/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\status\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/status/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||B.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===B.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await B.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=32432));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7473,a.ids=[7473],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6058:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65573),x=c(89718),y=c(77309),z=c(33792);async function A(){try{let a=await (0,x.mt)(),b=await (0,w.UL)(),c=await (0,z.dY)(b.get(z.bR)?.value),d=!1!==a.requireLogin,e=a.authMode||"password",f=String(c?.oidcName||"").trim(),g=String(c?.oidcEmail||"").trim(),h=f||g||(c?.oidc?"OIDC user":"Password user"),i=c?.oidc?"OIDC":"Password";return v.NextResponse.json({requireLogin:d,authMode:e,oidcConfigured:(0,y.EJ)(a),oidcLoginLabel:(a.oidcLoginLabel||"Sign in with OIDC").trim()||"Sign in with OIDC",hasPassword:!!a.password,displayName:h,loginMethod:i,oidcName:f||null,oidcEmail:g||null,oidcLogin:!!c?.oidc})}catch{return v.NextResponse.json({requireLogin:!0,authMode:"password",oidcConfigured:!1,oidcLoginLabel:"Sign in with OIDC",hasPassword:!1,displayName:"Password user",loginMethod:"Password",oidcName:null,oidcEmail:null,oidcLogin:!1})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/status/route",pathname:"/api/auth/status",filename:"route",bundlePath:"app/api/auth/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\QuocTai\\Documents\\9router\\src\\app\\api\\auth\\status\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/status/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||B.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===B.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await B.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>j,OZ:()=>m,YK:()=>h,bR:()=>f,dY:()=>k,tm:()=>l});var d=c(86935),e=c(69614);let f="ktrouter_session";function g(){let a=process.env.JWT_SECRET||globalThis.__cfEnv?.JWT_SECRET||"ktrouter-default-jwt-secret-change-me";return new TextEncoder().encode(a)}function h(a){return"false"!==process.env.AUTH_COOKIE_SECURE&&("https"===(a?.headers?.get?.("x-forwarded-proto")||"")||(a?.url||"").startsWith("https://"))}async function i(a={}){return await new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(g())}async function j(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,g());return b}catch{return null}}async function k(a){let b=await j(a);return b?{authenticated:!0,...b}:null}async function l(a,b,c={}){let d=await i(c);a.set(f,d,{httpOnly:!0,sameSite:"lax",secure:h(b),path:"/",maxAge:604800})}function m(a){a.set(f,"",{path:"/",maxAge:0})}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77309:(a,b,c)=>{c.d(b,{EJ:()=>n,GY:()=>q,HO:()=>v,Ir:()=>p,Mj:()=>o,Pf:()=>r,Rj:()=>y,Ui:()=>x,gR:()=>t,hT:()=>s,iw:()=>m,sP:()=>u,x8:()=>w});var d=c(77598),e=c.n(d),f=c(37221),g=c(69614),h=c(89718);let i="openid profile email",j="Sign in with OIDC";function k(a){return(a||"").trim().replace(/\/+$/,"")}function l(a){return(a||i).trim()||i}function m(a){let b=process.env.BASE_URL||"http://localhost:3008";if(b)return k(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return k(new URL(a.url).origin)}function n(a){return!!(k(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function o(){let a=await (0,h.mt)();return["oidc","both"].includes(a.authMode)&&n(a)?{issuerUrl:k(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:l(a.oidcScopes),loginLabel:(a.oidcLoginLabel||j).trim()||j}:null}async function p(a){let b=`${k(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function q(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function r(){return e().randomBytes(16).toString("base64url")}function s(){return e().randomBytes(16).toString("base64url")}function t({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=i,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",l(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function u({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function v({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function w({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let h=(0,f.RD)(new URL(d)),{payload:i}=await (0,g.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function x(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function y(a={}){return a.email||""}},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5573,6935,42,4884],()=>b(b.s=6058));module.exports=c})();
|