cuelo 0.9.6 → 0.9.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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +12 -11
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +2 -2
- package/.next/required-server-files.json +2 -2
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/account/route.js +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/attachment-settings/route.js +1 -1
- package/.next/server/app/api/attachments/[id]/transcription/route.js +2 -2
- package/.next/server/app/api/attachments/draft/route.js +1 -1
- package/.next/server/app/api/attachments/route.js +3 -3
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/display-settings/route.js +1 -1
- package/.next/server/app/api/document-text/route.js +2 -2
- package/.next/server/app/api/experiments/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/github/projects/route.js +1 -0
- package/.next/server/app/api/github/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/github/projects/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/gpt6/handles/route.js +1 -1
- package/.next/server/app/api/gpt6/reply/route.js +1 -1
- package/.next/server/app/api/gpt6/token/route.js +1 -1
- package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/live/call/[callId]/route.js +1 -1
- package/.next/server/app/api/live/character-voice/route.js +1 -1
- package/.next/server/app/api/live/events/route.js +2 -2
- package/.next/server/app/api/live/offer/route.js +1 -1
- package/.next/server/app/api/live/voices/route.js +1 -1
- package/.next/server/app/api/lounge/events/route.js +2 -2
- package/.next/server/app/api/lounge/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +3 -3
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/office-avatars/[id]/route.js +1 -1
- package/.next/server/app/api/office-avatars/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/runs/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/theme/route.js +1 -1
- package/.next/server/app/api/tool-image/route.js +1 -1
- package/.next/server/app/api/update-maintenance/route.js +2 -2
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/api/web-access/recovery/route.js +1 -1
- package/.next/server/app/api/web-access/route.js +1 -1
- package/.next/server/app/api/web6/consults/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/office/page.js +2 -2
- package/.next/server/app/office/page_client-reference-manifest.js +1 -1
- package/.next/server/app/office-preview/page.js +2 -2
- package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/office-preview.html +1 -1
- package/.next/server/app/office-preview.rsc +2 -2
- package/.next/server/app/office-preview.segments/_full.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/_index.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
- package/.next/server/app/office.html +1 -1
- package/.next/server/app/office.rsc +5 -5
- package/.next/server/app/office.segments/_full.segment.rsc +5 -5
- package/.next/server/app/office.segments/_head.segment.rsc +1 -1
- package/.next/server/app/office.segments/_index.segment.rsc +2 -2
- package/.next/server/app/office.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/office.segments/office.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover/page.js +2 -2
- package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover.html +1 -1
- package/.next/server/app/recover.rsc +2 -2
- package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +12 -11
- package/.next/server/chunks/1008.js +2 -2
- package/.next/server/chunks/2651.js +1 -1
- package/.next/server/chunks/3379.js +1 -1
- package/.next/server/chunks/5489.js +12 -12
- package/.next/server/chunks/6429.js +2 -2
- package/.next/server/chunks/7362.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +2 -2
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/6110-9f1e951aafcdd72e.js +1 -0
- package/.next/static/chunks/9575-fe25836fd76b4655.js +22 -0
- package/.next/static/chunks/app/{api/agent/[id]/bash-output/route-6b1496af498bb4fd.js → _global-error/page-318ea6a550b5034e.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/{events/route-6b1496af498bb4fd.js → account/route-318ea6a550b5034e.js} +1 -1
- package/.next/static/chunks/app/{_global-error/page-6b1496af498bb4fd.js → api/agent/[id]/bash-output/route-318ea6a550b5034e.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/{account/route-6b1496af498bb4fd.js → events/route-318ea6a550b5034e.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/attachment-settings/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/attachments/[id]/transcription/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/attachments/draft/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/attachments/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/display-settings/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/document-text/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/experiments/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/github/projects/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/gpt6/handles/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/gpt6/reply/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/gpt6/token/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/gpt6/web6-session/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/home/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/live/call/[callId]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/live/character-voice/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/live/events/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/live/offer/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/live/voices/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/lounge/events/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/lounge/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/model-roles/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/models/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/office-avatars/[id]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/office-avatars/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/projects/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/runs/[runId]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/runs/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/settings/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/skills/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/theme/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/tool-image/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/update-maintenance/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/updates/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/web-access/recovery/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/web-access/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/web6/consults/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/{layout-15c56b62f49b1c1d.js → layout-2bf5721b24426873.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/app/office/page-8dc604f9b5e6f220.js +1 -0
- package/.next/static/chunks/app/page-952b1ef4df5ac896.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-318ea6a550b5034e.js +1 -0
- package/.next/static/chunks/{webpack-fe8f1f81562a2b61.js → webpack-68986b211ad38cf1.js} +1 -1
- package/.next/static/css/4fae42750604bc1a.css +1 -0
- package/.next/static/vrwvD7kuXEjDJZtO0Q3iO/_buildManifest.js +1 -0
- package/.next/trace +108 -108
- package/.next/trace-build +1 -1
- package/.next/types/app/api/github/projects/route.ts +351 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/README.md +6 -3
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +3 -3
- package/Tools/OMP_Global_Config/agent/RULES.md +1 -0
- package/Tools/OMP_Global_Config/agent/TITLE_SYSTEM.md +17 -0
- package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +11 -4
- package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +2 -1
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/finalizer.ps1 +68 -31
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +8 -6
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +1119 -129
- package/bin/docker-entrypoint.mjs +19 -0
- package/install.mjs +11 -7
- package/package.json +8 -7
- package/.next/static/chunks/6110-004be57c825af4d9.js +0 -1
- package/.next/static/chunks/9575-4a84cf066c2f1257.js +0 -22
- package/.next/static/chunks/app/api/agent/[id]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/attachment-settings/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/attachments/[id]/transcription/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/attachments/draft/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/attachments/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/display-settings/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/document-text/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/experiments/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/handles/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/reply/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/token/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/web6-session/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/home/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/live/call/[callId]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/live/character-voice/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/live/events/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/live/offer/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/live/voices/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/lounge/events/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/lounge/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/model-roles/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/models/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/office-avatars/[id]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/office-avatars/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/projects/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/runs/[runId]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/runs/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/settings/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/skills/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/theme/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/tool-image/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/update-maintenance/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/updates/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/web-access/recovery/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/web-access/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/web6/consults/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/app/office/page-424e244f1c7fcdc6.js +0 -1
- package/.next/static/chunks/app/page-b43b2b8679ed66e2.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-6b1496af498bb4fd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6b1496af498bb4fd.js +0 -1
- package/.next/static/css/00f20b26266e86ed.css +0 -1
- package/.next/static/kRJ4zgHxJf680foSBrfpf/_buildManifest.js +0 -1
- /package/.next/static/{kRJ4zgHxJf680foSBrfpf → vrwvD7kuXEjDJZtO0Q3iO}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=3032,a.ids=[3032],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")},8207:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>k,dynamic:()=>m,runtime:()=>l});var e=c(34069),f=c(23211),g=c(75751),h=c(2979),i=c(99724),j=a([e,h]);[e,h]=j.then?(await j)():j;let l="nodejs",m="force-dynamic";async function k(a){let b=(0,g.r)(a,"/api/attachments");if(b)return await a.body?.cancel().catch(()=>{}),b;try{return await (0,i.L)(a,{store:(0,h.RT)(),settings:await (0,h.dk)((0,e.getAgentDir)())})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33383:function(a){function b(a){let b;for(;;)switch(a){case"utf-8":case"utf8":return c.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return c.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return c.utf16le;case"base64":return c.base64;default:if(void 0===b){b=!0,a=a.toLowerCase();continue}return c.other.bind(a)}}let c={utf8:(a,b)=>{if(0===a.length)return"";if("string"==typeof a){if(b<2)return a;a=Buffer.from(a,"latin1")}return a.utf8Slice(0,a.length)},latin1:(a,b)=>0===a.length?"":"string"==typeof a?a:a.latin1Slice(0,a.length),utf16le:(a,b)=>0===a.length?"":("string"==typeof a&&(a=Buffer.from(a,"latin1")),a.ucs2Slice(0,a.length)),base64:(a,b)=>0===a.length?"":("string"==typeof a&&(a=Buffer.from(a,"latin1")),a.base64Slice(0,a.length)),other:(a,b)=>{if(0===a.length)return"";"string"==typeof a&&(a=Buffer.from(a,"latin1"));try{return new TextDecoder(this).decode(a)}catch{}}};function d(a,c,d){let e=b(c);if(e)return e(a,d)}let e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];a.exports={basename:function(a){if("string"!=typeof a)return"";for(let b=a.length-1;b>=0;--b)switch(a.charCodeAt(b)){case 47:case 92:return".."===(a=a.slice(b+1))||"."===a?"":a}return".."===a||"."===a?"":a},convertToUTF8:d,getDecoder:b,parseContentType:function(a){if(0===a.length)return;let b=Object.create(null),c=0;for(;c<a.length;++c){let b=a.charCodeAt(c);if(1!==e[b]){if(47!==b||0===c)return;break}}if(c===a.length)return;let d=a.slice(0,c).toLowerCase(),g=++c;for(;c<a.length;++c)if(1!==e[a.charCodeAt(c)]){if(c===g||void 0===function(a,b,c){for(;b<a.length;){let d,g;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)break;if(59!==a.charCodeAt(b++))return;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)return;let h=b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==e[c]){if(61!==c)return;break}}if(b===a.length||(d=a.slice(h,b),++b===a.length))return;let i="";if(34===a.charCodeAt(b)){g=++b;let c=!1;for(;b<a.length;++b){let d=a.charCodeAt(b);if(92===d){c?(g=b,c=!1):(i+=a.slice(g,b),c=!0);continue}if(34===d){if(c){g=b,c=!1;continue}i+=a.slice(g,b);break}if(c&&(g=b-1,c=!1),1!==f[d])return}if(b===a.length)return;++b}else{for(g=b;b<a.length;++b)if(1!==e[a.charCodeAt(b)]){if(b===g)return;break}i=a.slice(g,b)}void 0===c[d=d.toLowerCase()]&&(c[d]=i)}return c}(a,c,b))return;break}if(c!==g)return{type:d,subtype:a.slice(g,c).toLowerCase(),params:b}},parseDisposition:function(a,b){if(0===a.length)return;let c=Object.create(null),j=0;for(;j<a.length;++j)if(1!==e[a.charCodeAt(j)]){if(void 0===function(a,b,c,j){for(;b<a.length;){let k,l,m;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)break;if(59!==a.charCodeAt(b++))return;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)return;let n=b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==e[c]){if(61===c)break;return}}if(b===a.length)return;let o="";if(42===(k=a.slice(n,b)).charCodeAt(k.length-1)){let c=++b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==g[c]){if(39!==c)return;break}}if(b===a.length)return;for(m=a.slice(c,b),++b;b<a.length&&39!==a.charCodeAt(b);++b);if(b===a.length||++b===a.length)return;l=b;let e=0;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==h[c]){if(37===c){let c,d;if(b+2<a.length&&-1!==(c=i[a.charCodeAt(b+1)])&&-1!==(d=i[a.charCodeAt(b+2)])){let f=(c<<4)+d;o+=a.slice(l,b),o+=String.fromCharCode(f),b+=2,l=b+1,f>=128?e=2:0===e&&(e=1);continue}return}break}}if(o+=a.slice(l,b),void 0===(o=d(o,m,e)))return}else{if(++b===a.length)return;if(34===a.charCodeAt(b)){l=++b;let c=!1;for(;b<a.length;++b){let d=a.charCodeAt(b);if(92===d){c?(l=b,c=!1):(o+=a.slice(l,b),c=!0);continue}if(34===d){if(c){l=b,c=!1;continue}o+=a.slice(l,b);break}if(c&&(l=b-1,c=!1),1!==f[d])return}if(b===a.length)return;++b}else{for(l=b;b<a.length;++b)if(1!==e[a.charCodeAt(b)]){if(b===l)return;break}o=a.slice(l,b)}if(void 0===(o=j(o,2)))return}void 0===c[k=k.toLowerCase()]&&(c[k]=o)}return c}(a,j,c,b))return;break}return{type:a.slice(0,j).toLowerCase(),params:c}}}},33873:a=>{a.exports=require("path")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{a.exports=require("node:fs/promises")},55484:(a,b,c)=>{c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},55511:a=>{a.exports=require("crypto")},57075:a=>{a.exports=require("node:stream")},62408:(a,b,c)=>{let{Readable:d,Writable:e}=c(27910),f=c(71272),{basename:g,convertToUTF8:h,getDecoder:i,parseContentType:j,parseDisposition:k}=c(33383),l=Buffer.from("\r\n"),m=Buffer.from("\r"),n=Buffer.from("-");function o(){}class p{constructor(a){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0,this.cb=a}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0}push(a,b,c){let d=b;for(;b<c;)switch(this.state){case 0:{let e=!1;for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(1!==w[c]){if(58!==c||(this.name+=a.latin1Slice(d,b),0===this.name.length))return -1;++b,e=!0,this.state=1;break}}if(!e){this.name+=a.latin1Slice(d,b);break}}case 1:{let e=!1;for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(32!==c&&9!==c){d=b,e=!0,this.state=2;break}}if(!e)break}case 2:switch(this.crlf){case 0:for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(1!==x[c]){if(13!==c)return -1;++this.crlf;break}}this.value+=a.latin1Slice(d,b++);break;case 1:if(16384===this.byteCount||(++this.byteCount,10!==a[b++]))return -1;++this.crlf;break;case 2:{if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];32===c||9===c?(d=b,this.crlf=0):(++this.pairCount<2e3&&(this.name=this.name.toLowerCase(),void 0===this.header[this.name]?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),13===c?(++this.crlf,++b):(d=b,this.crlf=0,this.state=0,this.name="",this.value=""));break}case 3:{if(16384===this.byteCount||(++this.byteCount,10!==a[b++]))return -1;let c=this.header;return this.reset(),this.cb(c),b}}}return b}}class q extends d{constructor(a,b){super(a),this.truncated=!1,this._readcb=null,this.once("end",()=>{if(this._read(),0==--b._fileEndsLeft&&b._finalcb){let a=b._finalcb;b._finalcb=null,process.nextTick(a)}})}_read(a){let b=this._readcb;b&&(this._readcb=null,b())}}let r={push:(a,b)=>{},destroy:()=>{}};function s(a,b){return a}class t extends e{constructor(a){let b,c,d,e,t;if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.highWaterMark?a.highWaterMark:void 0}),!a.conType.params||"string"!=typeof a.conType.params.boundary)throw Error("Multipart: Boundary not found");const u=a.conType.params.boundary,v="string"==typeof a.defParamCharset&&a.defParamCharset?i(a.defParamCharset):s,w=a.defCharset||"utf8",x=a.preservePath,y={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.fileHwm?a.fileHwm:void 0},z=a.limits,A=z&&"number"==typeof z.fieldSize?z.fieldSize:1048576,B=z&&"number"==typeof z.fileSize?z.fileSize:1/0,C=z&&"number"==typeof z.files?z.files:1/0,D=z&&"number"==typeof z.fields?z.fields:1/0,E=z&&"number"==typeof z.parts?z.parts:1/0;let F=-1,G=0,H=0,I=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let J=0,K=0,L=!1,M=!1,N=!1;this._hparser=null;const O=new p(a=>{let f;if(this._hparser=null,I=!1,e="text/plain",c=w,d="7bit",t=void 0,L=!1,!a["content-disposition"]){I=!0;return}let h=k(a["content-disposition"][0],v);if(!h||"form-data"!==h.type){I=!0;return}if(h.params&&(h.params.name&&(t=h.params.name),h.params["filename*"]?f=h.params["filename*"]:h.params.filename&&(f=h.params.filename),void 0===f||x||(f=g(f))),a["content-type"]){let b=j(a["content-type"][0]);b&&(e=`${b.type}/${b.subtype}`,b.params&&"string"==typeof b.params.charset&&(c=b.params.charset.toLowerCase()))}if(a["content-transfer-encoding"]&&(d=a["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===e||void 0!==f){if(H===C){M||(M=!0,this.emit("filesLimit")),I=!0;return}if(++H,0===this.listenerCount("file")){I=!0;return}J=0,this._fileStream=new q(y,this),++this._fileEndsLeft,this.emit("file",t,this._fileStream,{filename:f,encoding:d,mimeType:e})}else{if(G===D){N||(N=!0,this.emit("fieldsLimit")),I=!0;return}if(++G,0===this.listenerCount("field")){I=!0;return}b=[],K=0}});let P=0;const Q=(a,f,g,i,j)=>{for(;f;){if(null!==this._hparser){let a=this._hparser.push(f,g,i);if(-1===a){this._hparser=null,O.reset(),this.emit("error",Error("Malformed part header"));break}g=a}if(g===i)break;if(0!==P){if(1===P){switch(f[g]){case 45:P=2,++g;break;case 13:P=3,++g;break;default:P=0}if(g===i)return}if(2===P){if(P=0,45===f[g]){this._complete=!0,this._bparser=r;return}let a=this._writecb;this._writecb=o,Q(!1,n,0,1,!1),this._writecb=a}else if(3===P){if(P=0,10===f[g]){if(++g,F>=E||(this._hparser=O,g===i))break;continue}{let a=this._writecb;this._writecb=o,Q(!1,m,0,1,!1),this._writecb=a}}}if(!I){if(this._fileStream){let a,b=Math.min(i-g,B-J);j?a=f.slice(g,g+b):(a=Buffer.allocUnsafe(b),f.copy(a,0,g,g+b)),(J+=a.length)===B?(a.length>0&&this._fileStream.push(a),this._fileStream.emit("limit"),this._fileStream.truncated=!0,I=!0):this._fileStream.push(a)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==b){let a,c=Math.min(i-g,A-K);j?a=f.slice(g,g+c):(a=Buffer.allocUnsafe(c),f.copy(a,0,g,g+c)),K+=c,b.push(a),K===A&&(I=!0,L=!0)}}break}if(a){if(P=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==b){let a;switch(b.length){case 0:a="";break;case 1:a=h(b[0],c,0);break;default:a=h(Buffer.concat(b,K),c,0)}b=void 0,K=0,this.emit("field",t,a,{nameTruncated:!1,valueTruncated:L,encoding:d,mimeType:e})}++F===E&&this.emit("partsLimit")}};this._bparser=new f(`\r
|
|
2
|
-
--${u}`,Q),this._writecb=null,this._finalcb=null,this.write(l)}static detect(a){return"multipart"===a.type&&"form-data"===a.subtype}_write(a,b,c){let d;this._writecb=c,this._bparser.push(a,0),this._writecb&&(d=this._writecb,this._writecb=null,d&&d())}_destroy(a,b){this._hparser=null,this._bparser=r,a||(a=v(this));let c=this._fileStream;c&&(this._fileStream=null,c.destroy(a)),b(a)}_final(a){if(this._bparser.destroy(),!this._complete)return a(Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=u.bind(null,this,a):u(this,a)}}function u(a,b,c){if(c)return b(c);b(c=v(a))}function v(a){if(a._hparser)return Error("Malformed part header");let b=a._fileStream;if(b&&(a._fileStream=null,b.destroy(Error("Unexpected end of file"))),!a._complete)return Error("Unexpected end of form")}let w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];a.exports=t},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64638:(a,b,c)=>{let{parseContentType:d}=c(33383),e=[c(62408),c(95275)].filter(function(a){return"function"==typeof a.detect});a.exports=a=>{if(("object"!=typeof a||null===a)&&(a={}),"object"!=typeof a.headers||null===a.headers||"string"!=typeof a.headers["content-type"])throw Error("Missing Content-Type");var b=a;let c=b.headers,f=d(c["content-type"]);if(!f)throw Error("Malformed content type");for(let a of e){if(!a.detect(f))continue;let d={limits:b.limits,headers:c,conType:f,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return b.highWaterMark&&(d.highWaterMark=b.highWaterMark),b.fileHwm&&(d.fileHwm=b.fileHwm),d.defCharset=b.defCharset,d.defParamCharset=b.defParamCharset,d.preservePath=b.preservePath,new a(d)}throw Error(`Unsupported content type: ${c["content-type"]}`)}},67485:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},71272:a=>{function b(a,b,c,d,e){for(let f=0;f<e;++f)if(a[b+f]!==c[d+f])return!1;return!0}class c{constructor(a,b){if("function"!=typeof b)throw Error("Missing match callback");if("string"==typeof a)a=Buffer.from(a);else if(!Buffer.isBuffer(a))throw Error(`Expected Buffer for needle, got ${typeof a}`);const c=a.length;if(this.maxMatches=1/0,this.matches=0,this._cb=b,this._lookbehindSize=0,this._needle=a,this._bufPos=0,this._lookbehind=Buffer.allocUnsafe(c),this._occ=[c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c],c>1)for(let b=0;b<c-1;++b)this._occ[a[b]]=c-1-b}reset(){this.matches=0,this._lookbehindSize=0,this._bufPos=0}push(a,c){let e;Buffer.isBuffer(a)||(a=Buffer.from(a,"latin1"));let f=a.length;for(this._bufPos=c||0;e!==f&&this.matches<this.maxMatches;)e=function(a,c){let e=c.length,f=a._needle,g=f.length,h=-a._lookbehindSize,i=g-1,j=f[i],k=e-g,l=a._occ,m=a._lookbehind;if(h<0){for(;h<0&&h<=k;){let b=h+i,e=b<0?m[a._lookbehindSize+b]:c[b];if(e===j&&d(a,c,h,i))return a._lookbehindSize=0,++a.matches,h>-a._lookbehindSize?a._cb(!0,m,0,a._lookbehindSize+h,!1):a._cb(!0,void 0,0,0,!0),a._bufPos=h+g;h+=l[e]}for(;h<0&&!d(a,c,h,e-h);)++h;if(h<0){let b=a._lookbehindSize+h;return b>0&&a._cb(!1,m,0,b,!1),a._lookbehindSize-=b,m.copy(m,0,b,a._lookbehindSize),m.set(c,a._lookbehindSize),a._lookbehindSize+=e,a._bufPos=e,e}a._cb(!1,m,0,a._lookbehindSize,!1),a._lookbehindSize=0}h+=a._bufPos;let n=f[0];for(;h<=k;){let d=c[h+i];if(d===j&&c[h]===n&&b(f,0,c,h,i))return++a.matches,h>0?a._cb(!0,c,a._bufPos,h,!0):a._cb(!0,void 0,0,0,!0),a._bufPos=h+g;h+=l[d]}for(;h<e;){if(c[h]!==n||!b(c,h,f,0,e-h)){++h;continue}c.copy(m,0,h,e),a._lookbehindSize=e-h;break}return h>0&&a._cb(!1,c,a._bufPos,h<e?h:e,!0),a._bufPos=e,e}(this,a);return e}destroy(){let a=this._lookbehindSize;a&&this._cb(!1,this._lookbehind,0,a,!1),this.reset()}}function d(a,b,c,d){let e=a._lookbehind,f=a._lookbehindSize,g=a._needle;for(let a=0;a<d;++a,++c)if((c<0?e[f+c]:b[c])!==g[a])return!1;return!0}a.exports=c},73024:a=>{a.exports=require("node:fs")},75751:(a,b,c)=>{c.d(b,{r:()=>k});var d=c(23211),e=c(66544),f=c(77598),g=c(13229);function h(a){return(0,f.createHash)("sha256").update(a,"utf8").digest()}let i="/recover",j={"Cache-Control":"no-store","WWW-Authenticate":'Basic realm="cuelo", charset="UTF-8"'};function k(a,b,c){let k="/api"===b||b.startsWith("/api/");if(!(k?(0,e.EN)(a):(0,e.e9)(a)))return k?d.NextResponse.json({error:"Untrusted API request"},{status:403}):new d.NextResponse("Untrusted request",{status:403});if(b===i||"/api/web-access/recovery"===b)return null;let l=function(a,b={}){var c;let d=(0,g.resolveWebAuthPolicy)(b);if("open"===d.mode)return"allow";if("unavailable"===d.mode)return"unavailable";let e=function(a){let b;if(!a)return null;let c=/^Basic\s+(\S+)$/i.exec(a);if(!c)return null;try{let a=Buffer.from(c[1],"base64");if(a.toString("base64")!==c[1])return null;b=new TextDecoder("utf-8",{fatal:!0}).decode(a)}catch{return null}let d=b.indexOf(":");return -1===d?null:{username:b.slice(0,d),password:b.slice(d+1)}}(a);return e&&(c=e.username,(0,f.timingSafeEqual)(h(c),h("omp")))&&(0,g.verifyWebPassword)(e.password,{...b,policy:d})?"allow":"unauthorized"}(a.headers.get("authorization"),c);if("unavailable"===l){let a="Password access is enabled but the CUELO credential file could not be read. Run `cuelo --reset-password` on the server to set a new password.";return k?d.NextResponse.json({error:a},{status:503,headers:{"Cache-Control":"no-store"}}):new d.NextResponse(a,{status:503,headers:{"Cache-Control":"no-store"}})}return"unauthorized"===l?k?d.NextResponse.json({error:"Authentication required",recoveryPath:i},{status:401,headers:j}):new d.NextResponse(`<!doctype html>
|
|
1
|
+
"use strict";(()=>{var a={};a.id=3032,a.ids=[3032],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")},8207:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>k,dynamic:()=>m,runtime:()=>l});var e=c(34069),f=c(23211),g=c(75751),h=c(2979),i=c(99724),j=a([e,h]);[e,h]=j.then?(await j)():j;let l="nodejs",m="force-dynamic";async function k(a){let b=(0,g.r)(a,"/api/attachments");if(b)return await a.body?.cancel().catch(()=>{}),b;try{return await (0,i.L)(a,{store:(0,h.RT)(),settings:await (0,h.dk)((0,e.getAgentDir)())})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33383:function(a){function b(a){let b;for(;;)switch(a){case"utf-8":case"utf8":return c.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return c.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return c.utf16le;case"base64":return c.base64;default:if(void 0===b){b=!0,a=a.toLowerCase();continue}return c.other.bind(a)}}let c={utf8:(a,b)=>{if(0===a.length)return"";if("string"==typeof a){if(b<2)return a;a=Buffer.from(a,"latin1")}return a.utf8Slice(0,a.length)},latin1:(a,b)=>0===a.length?"":"string"==typeof a?a:a.latin1Slice(0,a.length),utf16le:(a,b)=>0===a.length?"":("string"==typeof a&&(a=Buffer.from(a,"latin1")),a.ucs2Slice(0,a.length)),base64:(a,b)=>0===a.length?"":("string"==typeof a&&(a=Buffer.from(a,"latin1")),a.base64Slice(0,a.length)),other:(a,b)=>{if(0===a.length)return"";"string"==typeof a&&(a=Buffer.from(a,"latin1"));try{return new TextDecoder(this).decode(a)}catch{}}};function d(a,c,d){let e=b(c);if(e)return e(a,d)}let e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];a.exports={basename:function(a){if("string"!=typeof a)return"";for(let b=a.length-1;b>=0;--b)switch(a.charCodeAt(b)){case 47:case 92:return".."===(a=a.slice(b+1))||"."===a?"":a}return".."===a||"."===a?"":a},convertToUTF8:d,getDecoder:b,parseContentType:function(a){if(0===a.length)return;let b=Object.create(null),c=0;for(;c<a.length;++c){let b=a.charCodeAt(c);if(1!==e[b]){if(47!==b||0===c)return;break}}if(c===a.length)return;let d=a.slice(0,c).toLowerCase(),g=++c;for(;c<a.length;++c)if(1!==e[a.charCodeAt(c)]){if(c===g||void 0===function(a,b,c){for(;b<a.length;){let d,g;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)break;if(59!==a.charCodeAt(b++))return;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)return;let h=b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==e[c]){if(61!==c)return;break}}if(b===a.length||(d=a.slice(h,b),++b===a.length))return;let i="";if(34===a.charCodeAt(b)){g=++b;let c=!1;for(;b<a.length;++b){let d=a.charCodeAt(b);if(92===d){c?(g=b,c=!1):(i+=a.slice(g,b),c=!0);continue}if(34===d){if(c){g=b,c=!1;continue}i+=a.slice(g,b);break}if(c&&(g=b-1,c=!1),1!==f[d])return}if(b===a.length)return;++b}else{for(g=b;b<a.length;++b)if(1!==e[a.charCodeAt(b)]){if(b===g)return;break}i=a.slice(g,b)}void 0===c[d=d.toLowerCase()]&&(c[d]=i)}return c}(a,c,b))return;break}if(c!==g)return{type:d,subtype:a.slice(g,c).toLowerCase(),params:b}},parseDisposition:function(a,b){if(0===a.length)return;let c=Object.create(null),j=0;for(;j<a.length;++j)if(1!==e[a.charCodeAt(j)]){if(void 0===function(a,b,c,j){for(;b<a.length;){let k,l,m;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)break;if(59!==a.charCodeAt(b++))return;for(;b<a.length;++b){let c=a.charCodeAt(b);if(32!==c&&9!==c)break}if(b===a.length)return;let n=b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==e[c]){if(61===c)break;return}}if(b===a.length)return;let o="";if(42===(k=a.slice(n,b)).charCodeAt(k.length-1)){let c=++b;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==g[c]){if(39!==c)return;break}}if(b===a.length)return;for(m=a.slice(c,b),++b;b<a.length&&39!==a.charCodeAt(b);++b);if(b===a.length||++b===a.length)return;l=b;let e=0;for(;b<a.length;++b){let c=a.charCodeAt(b);if(1!==h[c]){if(37===c){let c,d;if(b+2<a.length&&-1!==(c=i[a.charCodeAt(b+1)])&&-1!==(d=i[a.charCodeAt(b+2)])){let f=(c<<4)+d;o+=a.slice(l,b),o+=String.fromCharCode(f),b+=2,l=b+1,f>=128?e=2:0===e&&(e=1);continue}return}break}}if(o+=a.slice(l,b),void 0===(o=d(o,m,e)))return}else{if(++b===a.length)return;if(34===a.charCodeAt(b)){l=++b;let c=!1;for(;b<a.length;++b){let d=a.charCodeAt(b);if(92===d){c?(l=b,c=!1):(o+=a.slice(l,b),c=!0);continue}if(34===d){if(c){l=b,c=!1;continue}o+=a.slice(l,b);break}if(c&&(l=b-1,c=!1),1!==f[d])return}if(b===a.length)return;++b}else{for(l=b;b<a.length;++b)if(1!==e[a.charCodeAt(b)]){if(b===l)return;break}o=a.slice(l,b)}if(void 0===(o=j(o,2)))return}void 0===c[k=k.toLowerCase()]&&(c[k]=o)}return c}(a,j,c,b))return;break}return{type:a.slice(0,j).toLowerCase(),params:c}}}},33873:a=>{a.exports=require("path")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},39747:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{a.exports=require("node:fs/promises")},55484:(a,b,c)=>{c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},55511:a=>{a.exports=require("crypto")},57075:a=>{a.exports=require("node:stream")},62408:(a,b,c)=>{let{Readable:d,Writable:e}=c(27910),f=c(71272),{basename:g,convertToUTF8:h,getDecoder:i,parseContentType:j,parseDisposition:k}=c(33383),l=Buffer.from("\r\n"),m=Buffer.from("\r"),n=Buffer.from("-");function o(){}class p{constructor(a){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0,this.cb=a}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0}push(a,b,c){let d=b;for(;b<c;)switch(this.state){case 0:{let e=!1;for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(1!==w[c]){if(58!==c||(this.name+=a.latin1Slice(d,b),0===this.name.length))return -1;++b,e=!0,this.state=1;break}}if(!e){this.name+=a.latin1Slice(d,b);break}}case 1:{let e=!1;for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(32!==c&&9!==c){d=b,e=!0,this.state=2;break}}if(!e)break}case 2:switch(this.crlf){case 0:for(;b<c;++b){if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];if(1!==x[c]){if(13!==c)return -1;++this.crlf;break}}this.value+=a.latin1Slice(d,b++);break;case 1:if(16384===this.byteCount||(++this.byteCount,10!==a[b++]))return -1;++this.crlf;break;case 2:{if(16384===this.byteCount)return -1;++this.byteCount;let c=a[b];32===c||9===c?(d=b,this.crlf=0):(++this.pairCount<2e3&&(this.name=this.name.toLowerCase(),void 0===this.header[this.name]?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),13===c?(++this.crlf,++b):(d=b,this.crlf=0,this.state=0,this.name="",this.value=""));break}case 3:{if(16384===this.byteCount||(++this.byteCount,10!==a[b++]))return -1;let c=this.header;return this.reset(),this.cb(c),b}}}return b}}class q extends d{constructor(a,b){super(a),this.truncated=!1,this._readcb=null,this.once("end",()=>{if(this._read(),0==--b._fileEndsLeft&&b._finalcb){let a=b._finalcb;b._finalcb=null,process.nextTick(a)}})}_read(a){let b=this._readcb;b&&(this._readcb=null,b())}}let r={push:(a,b)=>{},destroy:()=>{}};function s(a,b){return a}class t extends e{constructor(a){let b,c,d,e,t;if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.highWaterMark?a.highWaterMark:void 0}),!a.conType.params||"string"!=typeof a.conType.params.boundary)throw Error("Multipart: Boundary not found");const u=a.conType.params.boundary,v="string"==typeof a.defParamCharset&&a.defParamCharset?i(a.defParamCharset):s,w=a.defCharset||"utf8",x=a.preservePath,y={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.fileHwm?a.fileHwm:void 0},z=a.limits,A=z&&"number"==typeof z.fieldSize?z.fieldSize:1048576,B=z&&"number"==typeof z.fileSize?z.fileSize:1/0,C=z&&"number"==typeof z.files?z.files:1/0,D=z&&"number"==typeof z.fields?z.fields:1/0,E=z&&"number"==typeof z.parts?z.parts:1/0;let F=-1,G=0,H=0,I=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let J=0,K=0,L=!1,M=!1,N=!1;this._hparser=null;const O=new p(a=>{let f;if(this._hparser=null,I=!1,e="text/plain",c=w,d="7bit",t=void 0,L=!1,!a["content-disposition"]){I=!0;return}let h=k(a["content-disposition"][0],v);if(!h||"form-data"!==h.type){I=!0;return}if(h.params&&(h.params.name&&(t=h.params.name),h.params["filename*"]?f=h.params["filename*"]:h.params.filename&&(f=h.params.filename),void 0===f||x||(f=g(f))),a["content-type"]){let b=j(a["content-type"][0]);b&&(e=`${b.type}/${b.subtype}`,b.params&&"string"==typeof b.params.charset&&(c=b.params.charset.toLowerCase()))}if(a["content-transfer-encoding"]&&(d=a["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===e||void 0!==f){if(H===C){M||(M=!0,this.emit("filesLimit")),I=!0;return}if(++H,0===this.listenerCount("file")){I=!0;return}J=0,this._fileStream=new q(y,this),++this._fileEndsLeft,this.emit("file",t,this._fileStream,{filename:f,encoding:d,mimeType:e})}else{if(G===D){N||(N=!0,this.emit("fieldsLimit")),I=!0;return}if(++G,0===this.listenerCount("field")){I=!0;return}b=[],K=0}});let P=0;const Q=(a,f,g,i,j)=>{for(;f;){if(null!==this._hparser){let a=this._hparser.push(f,g,i);if(-1===a){this._hparser=null,O.reset(),this.emit("error",Error("Malformed part header"));break}g=a}if(g===i)break;if(0!==P){if(1===P){switch(f[g]){case 45:P=2,++g;break;case 13:P=3,++g;break;default:P=0}if(g===i)return}if(2===P){if(P=0,45===f[g]){this._complete=!0,this._bparser=r;return}let a=this._writecb;this._writecb=o,Q(!1,n,0,1,!1),this._writecb=a}else if(3===P){if(P=0,10===f[g]){if(++g,F>=E||(this._hparser=O,g===i))break;continue}{let a=this._writecb;this._writecb=o,Q(!1,m,0,1,!1),this._writecb=a}}}if(!I){if(this._fileStream){let a,b=Math.min(i-g,B-J);j?a=f.slice(g,g+b):(a=Buffer.allocUnsafe(b),f.copy(a,0,g,g+b)),(J+=a.length)===B?(a.length>0&&this._fileStream.push(a),this._fileStream.emit("limit"),this._fileStream.truncated=!0,I=!0):this._fileStream.push(a)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==b){let a,c=Math.min(i-g,A-K);j?a=f.slice(g,g+c):(a=Buffer.allocUnsafe(c),f.copy(a,0,g,g+c)),K+=c,b.push(a),K===A&&(I=!0,L=!0)}}break}if(a){if(P=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==b){let a;switch(b.length){case 0:a="";break;case 1:a=h(b[0],c,0);break;default:a=h(Buffer.concat(b,K),c,0)}b=void 0,K=0,this.emit("field",t,a,{nameTruncated:!1,valueTruncated:L,encoding:d,mimeType:e})}++F===E&&this.emit("partsLimit")}};this._bparser=new f(`\r
|
|
2
|
+
--${u}`,Q),this._writecb=null,this._finalcb=null,this.write(l)}static detect(a){return"multipart"===a.type&&"form-data"===a.subtype}_write(a,b,c){let d;this._writecb=c,this._bparser.push(a,0),this._writecb&&(d=this._writecb,this._writecb=null,d&&d())}_destroy(a,b){this._hparser=null,this._bparser=r,a||(a=v(this));let c=this._fileStream;c&&(this._fileStream=null,c.destroy(a)),b(a)}_final(a){if(this._bparser.destroy(),!this._complete)return a(Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=u.bind(null,this,a):u(this,a)}}function u(a,b,c){if(c)return b(c);b(c=v(a))}function v(a){if(a._hparser)return Error("Malformed part header");let b=a._fileStream;if(b&&(a._fileStream=null,b.destroy(Error("Unexpected end of file"))),!a._complete)return Error("Unexpected end of form")}let w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];a.exports=t},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64638:(a,b,c)=>{let{parseContentType:d}=c(33383),e=[c(62408),c(95275)].filter(function(a){return"function"==typeof a.detect});a.exports=a=>{if(("object"!=typeof a||null===a)&&(a={}),"object"!=typeof a.headers||null===a.headers||"string"!=typeof a.headers["content-type"])throw Error("Missing Content-Type");var b=a;let c=b.headers,f=d(c["content-type"]);if(!f)throw Error("Malformed content type");for(let a of e){if(!a.detect(f))continue;let d={limits:b.limits,headers:c,conType:f,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return b.highWaterMark&&(d.highWaterMark=b.highWaterMark),b.fileHwm&&(d.fileHwm=b.fileHwm),d.defCharset=b.defCharset,d.defParamCharset=b.defParamCharset,d.preservePath=b.preservePath,new a(d)}throw Error(`Unsupported content type: ${c["content-type"]}`)}},71272:a=>{function b(a,b,c,d,e){for(let f=0;f<e;++f)if(a[b+f]!==c[d+f])return!1;return!0}class c{constructor(a,b){if("function"!=typeof b)throw Error("Missing match callback");if("string"==typeof a)a=Buffer.from(a);else if(!Buffer.isBuffer(a))throw Error(`Expected Buffer for needle, got ${typeof a}`);const c=a.length;if(this.maxMatches=1/0,this.matches=0,this._cb=b,this._lookbehindSize=0,this._needle=a,this._bufPos=0,this._lookbehind=Buffer.allocUnsafe(c),this._occ=[c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c],c>1)for(let b=0;b<c-1;++b)this._occ[a[b]]=c-1-b}reset(){this.matches=0,this._lookbehindSize=0,this._bufPos=0}push(a,c){let e;Buffer.isBuffer(a)||(a=Buffer.from(a,"latin1"));let f=a.length;for(this._bufPos=c||0;e!==f&&this.matches<this.maxMatches;)e=function(a,c){let e=c.length,f=a._needle,g=f.length,h=-a._lookbehindSize,i=g-1,j=f[i],k=e-g,l=a._occ,m=a._lookbehind;if(h<0){for(;h<0&&h<=k;){let b=h+i,e=b<0?m[a._lookbehindSize+b]:c[b];if(e===j&&d(a,c,h,i))return a._lookbehindSize=0,++a.matches,h>-a._lookbehindSize?a._cb(!0,m,0,a._lookbehindSize+h,!1):a._cb(!0,void 0,0,0,!0),a._bufPos=h+g;h+=l[e]}for(;h<0&&!d(a,c,h,e-h);)++h;if(h<0){let b=a._lookbehindSize+h;return b>0&&a._cb(!1,m,0,b,!1),a._lookbehindSize-=b,m.copy(m,0,b,a._lookbehindSize),m.set(c,a._lookbehindSize),a._lookbehindSize+=e,a._bufPos=e,e}a._cb(!1,m,0,a._lookbehindSize,!1),a._lookbehindSize=0}h+=a._bufPos;let n=f[0];for(;h<=k;){let d=c[h+i];if(d===j&&c[h]===n&&b(f,0,c,h,i))return++a.matches,h>0?a._cb(!0,c,a._bufPos,h,!0):a._cb(!0,void 0,0,0,!0),a._bufPos=h+g;h+=l[d]}for(;h<e;){if(c[h]!==n||!b(c,h,f,0,e-h)){++h;continue}c.copy(m,0,h,e),a._lookbehindSize=e-h;break}return h>0&&a._cb(!1,c,a._bufPos,h<e?h:e,!0),a._bufPos=e,e}(this,a);return e}destroy(){let a=this._lookbehindSize;a&&this._cb(!1,this._lookbehind,0,a,!1),this.reset()}}function d(a,b,c,d){let e=a._lookbehind,f=a._lookbehindSize,g=a._needle;for(let a=0;a<d;++a,++c)if((c<0?e[f+c]:b[c])!==g[a])return!1;return!0}a.exports=c},73024:a=>{a.exports=require("node:fs")},75751:(a,b,c)=>{c.d(b,{r:()=>k});var d=c(23211),e=c(66544),f=c(77598),g=c(13229);function h(a){return(0,f.createHash)("sha256").update(a,"utf8").digest()}let i="/recover",j={"Cache-Control":"no-store","WWW-Authenticate":'Basic realm="cuelo", charset="UTF-8"'};function k(a,b,c){let k="/api"===b||b.startsWith("/api/");if(!(k?(0,e.EN)(a):(0,e.e9)(a)))return k?d.NextResponse.json({error:"Untrusted API request"},{status:403}):new d.NextResponse("Untrusted request",{status:403});if(b===i||"/api/web-access/recovery"===b)return null;let l=function(a,b={}){var c;let d=(0,g.resolveWebAuthPolicy)(b);if("open"===d.mode)return"allow";if("unavailable"===d.mode)return"unavailable";let e=function(a){let b;if(!a)return null;let c=/^Basic\s+(\S+)$/i.exec(a);if(!c)return null;try{let a=Buffer.from(c[1],"base64");if(a.toString("base64")!==c[1])return null;b=new TextDecoder("utf-8",{fatal:!0}).decode(a)}catch{return null}let d=b.indexOf(":");return -1===d?null:{username:b.slice(0,d),password:b.slice(d+1)}}(a);return e&&(c=e.username,(0,f.timingSafeEqual)(h(c),h("omp")))&&(0,g.verifyWebPassword)(e.password,{...b,policy:d})?"allow":"unauthorized"}(a.headers.get("authorization"),c);if("unavailable"===l){let a="Password access is enabled but the CUELO credential file could not be read. Run `cuelo --reset-password` on the server to set a new password.";return k?d.NextResponse.json({error:a},{status:503,headers:{"Cache-Control":"no-store"}}):new d.NextResponse(a,{status:503,headers:{"Cache-Control":"no-store"}})}return"unauthorized"===l?k?d.NextResponse.json({error:"Authentication required",recoveryPath:i},{status:401,headers:j}):new d.NextResponse(`<!doctype html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
</main>
|
|
26
26
|
</body>
|
|
27
27
|
</html>
|
|
28
|
-
`,{status:401,headers:{...j,"Content-Type":"text/html; charset=utf-8"}}):null}},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},95275:(a,b,c)=>{let{Writable:d}=c(27910),{getDecoder:e}=c(33383);class f extends d{constructor(a){super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.highWaterMark?a.highWaterMark:void 0});let b=a.defCharset||"utf8";a.conType.params&&"string"==typeof a.conType.params.charset&&(b=a.conType.params.charset),this.charset=b;const c=a.limits;this.fieldSizeLimit=c&&"number"==typeof c.fieldSize?c.fieldSize:1048576,this.fieldsLimit=c&&"number"==typeof c.fields?c.fields:1/0,this.fieldNameSizeLimit=c&&"number"==typeof c.fieldNameSize?c.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=e(b)}static detect(a){return"application"===a.type&&"x-www-form-urlencoded"===a.subtype}_write(a,b,c){if(this._fields>=this.fieldsLimit)return c();let d=0,e=a.length;if(this._lastPos=0,-2!==this._byte){if(-1===(d=g(this,a,d,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();this._inKey?++this._bytesKey:++this._bytesVal}a:for(;d<e;)if(this._inKey){for(d=h(this,a,d,e);d<e;){switch(a[d]){case 61:this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._key=this._decoder(this._key,this._encode),this._encode=0,this._inKey=!1;continue a;case 38:if(this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._key=this._decoder(this._key,this._encode),this._encode=0,this._bytesKey>0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),c();continue;case 43:this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._key+=" ",this._lastPos=d+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=d+1,this._byte=-1,-1===(d=g(this,a,d+1,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();++this._bytesKey,d=h(this,a,d,e);continue}++d,++this._bytesKey,d=h(this,a,d,e)}this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d))}else{for(d=i(this,a,d,e);d<e;){switch(a[d]){case 38:if(this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._inKey=!0,this._val=this._decoder(this._val,this._encode),this._encode=0,(this._bytesKey>0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),c();continue a;case 43:this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._val+=" ",this._lastPos=d+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._lastPos=d+1,this._byte=-1,-1===(d=g(this,a,d+1,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();++this._bytesVal,d=i(this,a,d,e);continue}++d,++this._bytesVal,d=i(this,a,d,e)}this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d))}c()}_final(a){if(-2!==this._byte)return a(Error("Malformed urlencoded form"));(!this._inKey||this._bytesKey>0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),a()}}function g(a,b,c,d){if(c>=d)return d;if(-1===a._byte){let e=j[b[c++]];if(-1===e)return -1;if(e>=8&&(a._encode=2),c<d){let d=j[b[c++]];if(-1===d)return -1;a._inKey?a._key+=String.fromCharCode((e<<4)+d):a._val+=String.fromCharCode((e<<4)+d),a._byte=-2,a._lastPos=c}else a._byte=e}else{let d=j[b[c++]];if(-1===d)return -1;a._inKey?a._key+=String.fromCharCode((a._byte<<4)+d):a._val+=String.fromCharCode((a._byte<<4)+d),a._byte=-2,a._lastPos=c}return c}function h(a,b,c,d){if(a._bytesKey>a.fieldNameSizeLimit){for(!a._keyTrunc&&a._lastPos<c&&(a._key+=b.latin1Slice(a._lastPos,c-1)),a._keyTrunc=!0;c<d;++c){let d=b[c];if(61===d||38===d)break;++a._bytesKey}a._lastPos=c}return c}function i(a,b,c,d){if(a._bytesVal>a.fieldSizeLimit){for(!a._valTrunc&&a._lastPos<c&&(a._val+=b.latin1Slice(a._lastPos,c-1)),a._valTrunc=!0;c<d&&38!==b[c];++c)++a._bytesVal;a._lastPos=c}return c}let j=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];a.exports=f},99724:(a,b,c)=>{c.d(b,{L:()=>t});var d=c(77598),e=c(69689),f=c(64638),g=c.n(f),h=c(73024),i=c(51455),j=c(57075);let k=require("node:stream/promises");class l extends Error{}class m extends Error{constructor(a){super(`Upload exceeds ${a} bytes`),this.limitBytes=a}}async function n(a,{stagingPath:b,maxFileBytes:c,fileField:d="file"}){let e;if(!a.body)throw new l("Request has no body");try{e=g()({headers:{"content-type":a.headers.get("content-type")??""},defParamCharset:"utf8",preservePath:!0,limits:{files:1,fileSize:c+1,fields:8,fieldSize:4096,parts:16}})}catch(a){throw new l(a instanceof Error?a.message:String(a))}let f=j.Readable.fromWeb(a.body),o=new Map,p=null,q=null,r=null,s=Promise.withResolvers(),t=a=>{r||(r=a,f.unpipe(e),f.destroy(),e.destroy(a),s.reject(a))};e.on("field",(a,b,c)=>{c.nameTruncated||c.valueTruncated?t(new l(`Field ${a} is too long`)):o.set(a,b)}),e.on("file",(a,e,f)=>{if(a!==d||q){e.on("error",()=>{}),e.resume(),t(new l(`Unexpected file part ${a}`));return}e.on("limit",()=>t(new m(c)));let g=(0,h.createWriteStream)(b,{flags:"wx",mode:384});(q=(0,k.pipeline)(e,g).then(()=>{e.truncated||(p={fileName:f.filename??"",contentType:f.mimeType,size:g.bytesWritten})})).catch(a=>t(a instanceof Error?a:Error(String(a))))}),e.on("filesLimit",()=>t(new l("Only one file part is allowed"))),e.on("fieldsLimit",()=>t(new l("Too many fields"))),e.on("partsLimit",()=>t(new l("Too many parts"))),e.on("error",a=>t(r?a:new l(a.message))),e.on("finish",()=>s.resolve()),f.on("error",a=>t(a)),f.pipe(e);try{if(await s.promise,await q?.catch(()=>{}),r)throw r;return{fields:o,file:p}}catch(a){throw await q?.catch(()=>{}),q&&await (0,i.unlink)(b).catch(()=>{}),a}}var o=c(36208),p=c(55484),q=c(49180);function r(a,b,c,d={}){return Response.json({code:b,error:c,...d},{status:a})}function s(a){return r(413,"file_too_large",`Attachments must be ${a/1024/1024}MB or smaller`,{limitBytes:a})}async function t(a,{store:b,settings:c}){if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return r(415,"unsupported","multipart/form-data body required");let f=(0,e.NB)(c),g=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==g&&g>f+65536)return await a.body?.cancel().catch(()=>{}),s(f);let h=await b.beginUpload(),i=!1;try{let c;try{c=await n(a,{stagingPath:h.stagingPath,maxFileBytes:f})}catch(b){if(b instanceof m)return s(f);if(b instanceof l)return r(400,"invalid_form","Malformed multipart body");if(a.signal.aborted)return r(400,"aborted","Upload aborted");throw b}let{file:e,fields:g}=c;if(!e)return r(400,"missing_file","file is required");let j=(0,p.SI)([e.fileName]);if(j)return r(400,"invalid_name",j);let k=g.get("sessionId")||null;if(null!==k&&!(0,q.ah)(k))return r(400,"invalid_session","Invalid session id");let t=g.get("draftId");if(t&&!(0,o.Ly)(t))return r(400,"invalid_draft","Invalid draft id");let u=(t||(0,d.randomUUID)()).toLowerCase(),v=await b.commitUpload({id:h.id,stagingPath:h.stagingPath,sessionId:k,draftId:u,fileName:e.fileName,size:e.size,mimeType:(0,o.Lg)({name:e.fileName,type:e.contentType})??(e.contentType||"application/octet-stream")});i=!0;let w={id:v.id,draftId:u,path:v.path,size:v.size,mimeType:v.mimeType};return Response.json(w)}finally{i||await b.discardStagedUpload(h.stagingPath),await h.release()}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3229,5270],()=>b(b.s=
|
|
28
|
+
`,{status:401,headers:{...j,"Content-Type":"text/html; charset=utf-8"}}):null}},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},95275:(a,b,c)=>{let{Writable:d}=c(27910),{getDecoder:e}=c(33383);class f extends d{constructor(a){super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof a.highWaterMark?a.highWaterMark:void 0});let b=a.defCharset||"utf8";a.conType.params&&"string"==typeof a.conType.params.charset&&(b=a.conType.params.charset),this.charset=b;const c=a.limits;this.fieldSizeLimit=c&&"number"==typeof c.fieldSize?c.fieldSize:1048576,this.fieldsLimit=c&&"number"==typeof c.fields?c.fields:1/0,this.fieldNameSizeLimit=c&&"number"==typeof c.fieldNameSize?c.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=e(b)}static detect(a){return"application"===a.type&&"x-www-form-urlencoded"===a.subtype}_write(a,b,c){if(this._fields>=this.fieldsLimit)return c();let d=0,e=a.length;if(this._lastPos=0,-2!==this._byte){if(-1===(d=g(this,a,d,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();this._inKey?++this._bytesKey:++this._bytesVal}a:for(;d<e;)if(this._inKey){for(d=h(this,a,d,e);d<e;){switch(a[d]){case 61:this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._key=this._decoder(this._key,this._encode),this._encode=0,this._inKey=!1;continue a;case 38:if(this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._key=this._decoder(this._key,this._encode),this._encode=0,this._bytesKey>0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),c();continue;case 43:this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._key+=" ",this._lastPos=d+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d)),this._lastPos=d+1,this._byte=-1,-1===(d=g(this,a,d+1,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();++this._bytesKey,d=h(this,a,d,e);continue}++d,++this._bytesKey,d=h(this,a,d,e)}this._lastPos<d&&(this._key+=a.latin1Slice(this._lastPos,d))}else{for(d=i(this,a,d,e);d<e;){switch(a[d]){case 38:if(this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._lastPos=++d,this._inKey=!0,this._val=this._decoder(this._val,this._encode),this._encode=0,(this._bytesKey>0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),c();continue a;case 43:this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._val+=" ",this._lastPos=d+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d)),this._lastPos=d+1,this._byte=-1,-1===(d=g(this,a,d+1,e)))return c(Error("Malformed urlencoded form"));if(d>=e)return c();++this._bytesVal,d=i(this,a,d,e);continue}++d,++this._bytesVal,d=i(this,a,d,e)}this._lastPos<d&&(this._val+=a.latin1Slice(this._lastPos,d))}c()}_final(a){if(-2!==this._byte)return a(Error("Malformed urlencoded form"));(!this._inKey||this._bytesKey>0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),a()}}function g(a,b,c,d){if(c>=d)return d;if(-1===a._byte){let e=j[b[c++]];if(-1===e)return -1;if(e>=8&&(a._encode=2),c<d){let d=j[b[c++]];if(-1===d)return -1;a._inKey?a._key+=String.fromCharCode((e<<4)+d):a._val+=String.fromCharCode((e<<4)+d),a._byte=-2,a._lastPos=c}else a._byte=e}else{let d=j[b[c++]];if(-1===d)return -1;a._inKey?a._key+=String.fromCharCode((a._byte<<4)+d):a._val+=String.fromCharCode((a._byte<<4)+d),a._byte=-2,a._lastPos=c}return c}function h(a,b,c,d){if(a._bytesKey>a.fieldNameSizeLimit){for(!a._keyTrunc&&a._lastPos<c&&(a._key+=b.latin1Slice(a._lastPos,c-1)),a._keyTrunc=!0;c<d;++c){let d=b[c];if(61===d||38===d)break;++a._bytesKey}a._lastPos=c}return c}function i(a,b,c,d){if(a._bytesVal>a.fieldSizeLimit){for(!a._valTrunc&&a._lastPos<c&&(a._val+=b.latin1Slice(a._lastPos,c-1)),a._valTrunc=!0;c<d&&38!==b[c];++c)++a._bytesVal;a._lastPos=c}return c}let j=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];a.exports=f},99724:(a,b,c)=>{c.d(b,{L:()=>t});var d=c(77598),e=c(69689),f=c(64638),g=c.n(f),h=c(73024),i=c(51455),j=c(57075);let k=require("node:stream/promises");class l extends Error{}class m extends Error{constructor(a){super(`Upload exceeds ${a} bytes`),this.limitBytes=a}}async function n(a,{stagingPath:b,maxFileBytes:c,fileField:d="file"}){let e;if(!a.body)throw new l("Request has no body");try{e=g()({headers:{"content-type":a.headers.get("content-type")??""},defParamCharset:"utf8",preservePath:!0,limits:{files:1,fileSize:c+1,fields:8,fieldSize:4096,parts:16}})}catch(a){throw new l(a instanceof Error?a.message:String(a))}let f=j.Readable.fromWeb(a.body),o=new Map,p=null,q=null,r=null,s=Promise.withResolvers(),t=a=>{r||(r=a,f.unpipe(e),f.destroy(),e.destroy(a),s.reject(a))};e.on("field",(a,b,c)=>{c.nameTruncated||c.valueTruncated?t(new l(`Field ${a} is too long`)):o.set(a,b)}),e.on("file",(a,e,f)=>{if(a!==d||q){e.on("error",()=>{}),e.resume(),t(new l(`Unexpected file part ${a}`));return}e.on("limit",()=>t(new m(c)));let g=(0,h.createWriteStream)(b,{flags:"wx",mode:384});(q=(0,k.pipeline)(e,g).then(()=>{e.truncated||(p={fileName:f.filename??"",contentType:f.mimeType,size:g.bytesWritten})})).catch(a=>t(a instanceof Error?a:Error(String(a))))}),e.on("filesLimit",()=>t(new l("Only one file part is allowed"))),e.on("fieldsLimit",()=>t(new l("Too many fields"))),e.on("partsLimit",()=>t(new l("Too many parts"))),e.on("error",a=>t(r?a:new l(a.message))),e.on("finish",()=>s.resolve()),f.on("error",a=>t(a)),f.pipe(e);try{if(await s.promise,await q?.catch(()=>{}),r)throw r;return{fields:o,file:p}}catch(a){throw await q?.catch(()=>{}),q&&await (0,i.unlink)(b).catch(()=>{}),a}}var o=c(36208),p=c(55484),q=c(49180);function r(a,b,c,d={}){return Response.json({code:b,error:c,...d},{status:a})}function s(a){return r(413,"file_too_large",`Attachments must be ${a/1024/1024}MB or smaller`,{limitBytes:a})}async function t(a,{store:b,settings:c}){if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return r(415,"unsupported","multipart/form-data body required");let f=(0,e.NB)(c),g=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==g&&g>f+65536)return await a.body?.cancel().catch(()=>{}),s(f);let h=await b.beginUpload(),i=!1;try{let c;try{c=await n(a,{stagingPath:h.stagingPath,maxFileBytes:f})}catch(b){if(b instanceof m)return s(f);if(b instanceof l)return r(400,"invalid_form","Malformed multipart body");if(a.signal.aborted)return r(400,"aborted","Upload aborted");throw b}let{file:e,fields:g}=c;if(!e)return r(400,"missing_file","file is required");let j=(0,p.SI)([e.fileName]);if(j)return r(400,"invalid_name",j);let k=g.get("sessionId")||null;if(null!==k&&!(0,q.ah)(k))return r(400,"invalid_session","Invalid session id");let t=g.get("draftId");if(t&&!(0,o.Ly)(t))return r(400,"invalid_draft","Invalid draft id");let u=(t||(0,d.randomUUID)()).toLowerCase(),v=await b.commitUpload({id:h.id,stagingPath:h.stagingPath,sessionId:k,draftId:u,fileName:e.fileName,size:e.size,mimeType:(0,o.Lg)({name:e.fileName,type:e.contentType})??(e.contentType||"application/octet-stream")});i=!0;let w={id:v.id,draftId:u,path:v.path,size:v.size,mimeType:v.mimeType};return Response.json(w)}finally{i||await b.discardStagedUpload(h.stagingPath),await h.release()}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3229,5270],()=>b(b.s=39747));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13760:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.z)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13760:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.z)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},40835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(13760),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/all-providers/route",pathname:"/api/auth/all-providers",filename:"route",bundlePath:"app/api/auth/all-providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\all-providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/all-providers/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=40835));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8743,a.ids=[8741,8743],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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},37057:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/api-key/[provider]/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=37057));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=8743,a.ids=[8741,8743],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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44423:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/api-key/[provider]/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},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")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=44423));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1004,a.ids=[1004,8741],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>j,dynamic:()=>l});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let l="force-dynamic";function i(){return globalThis.__ompLoginCallbacks||(globalThis.__ompLoginCallbacks=new Map),globalThis.__ompLoginCallbacks}async function j(a,{params:b}){let{provider:c}=await b,{token:d,code:e}=await a.json();if(!d||!e)return Response.json({error:"token and code required"},{status:400});let f=i(),g=f.get(d);return
|
|
1
|
+
(()=>{var a={};a.id=1004,a.ids=[1004,8741],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>j,dynamic:()=>l});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let l="force-dynamic";function i(){return globalThis.__ompLoginCallbacks||(globalThis.__ompLoginCallbacks=new Map),globalThis.__ompLoginCallbacks}async function j(a,{params:b}){let{provider:c}=await b,{token:d,code:e}=await a.json();if(!d||!e)return Response.json({error:"token and code required"},{status:400});let f=i(),g=f.get(d);if(!g)return Response.json({error:"No pending login for token"},{status:404});if(!d.startsWith(`${c}-`))return Response.json({error:"Token does not match provider"},{status:400});let h=g.nextStep();g.resolve(e),f.delete(d);let k=await Promise.race([h,new Promise(a=>setTimeout(()=>a({state:"pending"}),9e4))]);return"error"===k.state?Response.json({error:k.message,state:k.state},{status:400}):Response.json({ok:!0,provider:c,state:k.state})}async function k(a,{params:b}){let c,{provider:d}=await b,h=new TextEncoder,j=(a,b)=>{try{a.enqueue(h.encode(`data: ${JSON.stringify(b)}
|
|
2
2
|
|
|
3
|
-
`))},
|
|
3
|
+
`))}catch{}},l=new AbortController,m=()=>{void 0!==c||l.signal.aborted||(c=setTimeout(()=>l.abort(),6e5))};a.signal.addEventListener("abort",m);let n=new ReadableStream({async start(a){let b,h=(0,g.G)(d);if(!h){j(a,{type:"error",message:`Unknown provider: ${d}`}),a.close();return}let{authStorage:k}=await (0,f.getOmpRuntime)(),m=i(),n=new Set,o=[],p=a=>{let b=o;for(let c of(o=[],b))c(a)},q=()=>new Promise(a=>o.push(a)),r=()=>{p({state:"input"});let a=`${d}-${Date.now()}-${Math.random().toString(36).slice(2)}`;n.add(a);let b=new Promise((b,c)=>{m.set(a,{resolve:c=>{n.delete(a),m.delete(a),b(c)},reject:b=>{n.delete(a),m.delete(a),c(b)},nextStep:q})});return{token:a,promise:b}},s=()=>(b||(b=r()).promise.finally(()=>{b=void 0}).catch(()=>{}),b),t=()=>{for(let a of n)m.get(a)?.reject(Error("Login cancelled")),m.delete(a);n.clear()};l.signal.addEventListener("abort",t);try{await k.oauth.login(h,{onPrompt:async b=>{let c=r();return j(a,{type:"prompt_request",message:b.message,placeholder:b.placeholder??null,token:c.token}),c.promise},onManualCodeInput:()=>s().promise,onAuth:b=>{let c=s();j(a,{type:"auth",url:b.url,instructions:b.instructions??null,token:c.token})},onProgress:b=>{j(a,{type:"progress",message:b})},signal:l.signal}),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),p({state:"success"}),j(a,{type:"success"})}catch(c){let b=c instanceof Error?c.message:String(c);p({state:"error",message:b}),"Login cancelled"!==b?j(a,{type:"error",message:b}):j(a,{type:"cancelled"})}finally{void 0!==c&&clearTimeout(c),t();try{a.close()}catch{}}},cancel(){m()}});return new Response(n,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70943:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(46879),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/[provider]/route",pathname:"/api/auth/login/[provider]",filename:"route",bundlePath:"app/api/auth/login/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\login\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/login/[provider]/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=70943));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8933,a.ids=[8741,8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},6833:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(86152),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\logout\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/[provider]/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},78335:()=>{},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b;if(!(0,g.G)(c))return Response.json({error:`Unknown provider: ${c}`},{status:400});let{authStorage:d}=await (0,f.getOmpRuntime)(),h=d.credentials.list(c);return h.length>0&&!h.some(a=>"oauth"===a.credential.type)?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):(await d.credentials.remove(c),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=6833));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=8933,a.ids=[8741,8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},61303:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(86152),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\logout\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/[provider]/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b;if(!(0,g.G)(c))return Response.json({error:`Unknown provider: ${c}`},{status:400});let{authStorage:d}=await (0,f.getOmpRuntime)(),h=d.credentials.list(c);return h.length>0&&!h.some(a=>"oauth"===a.credential.type)?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):(await d.credentials.remove(c),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=61303));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3423:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>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(69226),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(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/providers/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=F,L="/index"===L?"/":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}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.l)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=3423));module.exports=c})();
|