@ai-development-environment/server 0.0.30 → 0.0.32
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/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/app-path-routes-manifest.json +1 -0
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/routes-manifest.json +9 -0
- package/standalone/.next/server/app/[locale]/actions/page.js +2 -1
- package/standalone/.next/server/app/[locale]/actions/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/page.js +2 -1
- package/standalone/.next/server/app/[locale]/agents/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page.js +2 -1
- package/standalone/.next/server/app/[locale]/build-data/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/comments/page.js +2 -1
- package/standalone/.next/server/app/[locale]/comments/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page.js +2 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/settings/page.js +2 -1
- package/standalone/.next/server/app/[locale]/settings/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/tools/page.js +2 -1
- package/standalone/.next/server/app/[locale]/tools/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/usage/page.js +2 -1
- package/standalone/.next/server/app/[locale]/usage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page.js +2 -1
- package/standalone/.next/server/app/[locale]/worktrees/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +1 -1
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/app-paths-manifest.json +3 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/build-manifest.json +9 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/server-reference-manifest.json +4 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js +11 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.map +5 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.nft.json +1 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route_client-reference-manifest.js +3 -0
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js +4 -3
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js +1 -1
- package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.nft.json +1 -1
- package/standalone/.next/server/app-paths-manifest.json +1 -0
- package/standalone/.next/server/chunks/07_e_builds_[buildId]_artifacts_[artifactId]_manifest_plist_route_actions_18mzaf3.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__08mnmfs._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__0906ea6._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__09skp6r._.js → [root-of-the-server]__0cz4ap5._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__0nvcazp._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__1wtng3p._.js → [root-of-the-server]__12807ia._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1csx222._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0zyqmd4._.js → [root-of-the-server]__1ix62p0._.js} +3 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1j-hk6b._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__15aat79._.js → [root-of-the-server]__1j0u03u._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1qmvsu_._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1w59u6o._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0-ypkf7._.js → [root-of-the-server]__1z-3x8k._.js} +1 -1
- package/standalone/.next/server/chunks/_0exkna-._.js +51 -1
- package/standalone/.next/server/chunks/_0jurkow._.js +1 -1
- package/standalone/.next/server/chunks/_0rx5rfm._.js +1 -1
- package/standalone/.next/server/chunks/_0tufgj0._.js +111 -61
- package/standalone/.next/server/chunks/_0w2eghf._.js +51 -1
- package/standalone/.next/server/chunks/_152rnkf._.js +3 -3
- package/standalone/.next/server/chunks/_16x77b_._.js +1 -1
- package/standalone/.next/server/chunks/_1dbqy8c._.js +3 -3
- package/standalone/.next/server/chunks/_1vrixpc._.js +3 -3
- package/standalone/.next/server/chunks/_1yfz-9u._.js +3 -3
- package/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_08x37wy.js +6 -0
- package/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0eghv0a.js +3 -0
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__08bbv6z._.js +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ckj6wg._.js +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qy28ku._.js +3 -0
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1potsqg._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_0a1ligo._.js +1 -1
- package/standalone/.next/server/chunks/ssr/{_1n9rteq._.js → _1f5k6bj._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0i._.js +1 -1
- package/standalone/.next/server/chunks/ssr/node_modules_0obs0k7._.js +5 -0
- package/standalone/.next/server/chunks/ssr/node_modules_next_1ep9xf4._.js +3 -0
- package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +20 -10
- package/standalone/.next/server/functions-config-manifest.json +5 -2
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{1ut0xkaqsykm4.js → 0mq066ue0yufb.js} +1 -1
- package/standalone/.next/static/chunks/{041g9raf1naqv.js → 175269y15-grc.js} +1 -1
- package/standalone/.next/static/chunks/17t4ft9o1tqw3.js +35 -0
- package/standalone/.next/static/chunks/{3q0q6_ntq8aa5.js → 208k3moxxd_53.js} +1 -1
- package/standalone/.next/static/chunks/2zwijj9t6y7gn.js +7 -0
- package/standalone/.next/static/chunks/398uw5_4-ciaz.css +1 -0
- package/standalone/.next/static/chunks/{29zl8lgsa28tb.js → 3l2g83119oyl0.js} +1 -1
- package/standalone/src/services/builds/artifact-cache.test.ts +271 -0
- package/standalone/src/services/builds/artifact-cache.ts +272 -0
- package/standalone/src/services/builds/artifact-transfer.ts +2 -1
- package/standalone/src/services/builds/builds.service.ts +139 -56
- package/standalone/.next/server/chunks/[root-of-the-server]__02vqwey._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__0rwpsai._.js +0 -3
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__10-ftkj._.js +0 -3
- package/standalone/.next/server/chunks/ssr/node_modules_1n5939e._.js +0 -5
- package/standalone/.next/static/chunks/3p7wbgo7qd6_m.css +0 -1
- package/standalone/.next/static/chunks/3vg6y29m047x9.js +0 -31
- /package/standalone/.next/static/{ePu377E66yy0icQx3ykQJ → qUqJkVkzos1XoXFl7PSxx}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{ePu377E66yy0icQx3ykQJ → qUqJkVkzos1XoXFl7PSxx}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{ePu377E66yy0icQx3ykQJ → qUqJkVkzos1XoXFl7PSxx}/_ssgManifest.js +0 -0
|
@@ -16,9 +16,11 @@ import {
|
|
|
16
16
|
IOS_TEST_RESULTS_JOB_KIND,
|
|
17
17
|
IOS_COVERAGE_REPORT_JOB_KIND,
|
|
18
18
|
IOS_RUN_DESTINATIONS_JOB_KIND,
|
|
19
|
+
IOS_SIGNING_INSPECT_JOB_KIND,
|
|
19
20
|
IOS_SOURCE_DISCOVER_JOB_KIND,
|
|
20
21
|
IOS_SOURCE_PARSE_JOB_KIND,
|
|
21
22
|
parseBuildAdvancedSettings,
|
|
23
|
+
parseBuildArtifactSnapshots,
|
|
22
24
|
parseBuildDestination,
|
|
23
25
|
parseBuildExportSettings,
|
|
24
26
|
parseBuildSource,
|
|
@@ -963,6 +965,57 @@ export class BuildsService {
|
|
|
963
965
|
}
|
|
964
966
|
}
|
|
965
967
|
|
|
968
|
+
/**
|
|
969
|
+
* Lists the teams, certificates, and profiles installed on the build's agent,
|
|
970
|
+
* along with the bundles inside the archive that manual signing must map.
|
|
971
|
+
*/
|
|
972
|
+
async signingOptionsForBuild(buildId: string) {
|
|
973
|
+
const prisma = await getPrismaClient();
|
|
974
|
+
const build = await prisma.build.findUnique({
|
|
975
|
+
where: { id: buildId },
|
|
976
|
+
include: { artifacts: true },
|
|
977
|
+
});
|
|
978
|
+
const archive = build?.artifacts.find(
|
|
979
|
+
(artifact) => artifact.kind === "ARCHIVE",
|
|
980
|
+
);
|
|
981
|
+
if (!build || build.status !== "SUCCEEDED" || !build.worktreeId) {
|
|
982
|
+
throw new Error("A successful archive build is required");
|
|
983
|
+
}
|
|
984
|
+
if (!archive) throw new Error("Build does not contain an archive");
|
|
985
|
+
const worktree = await this.requireWorktree(
|
|
986
|
+
build.worktreeId,
|
|
987
|
+
IOS_SIGNING_INSPECT_JOB_KIND,
|
|
988
|
+
);
|
|
989
|
+
const job = await this.agentControl.createJob({
|
|
990
|
+
agentId: worktree.codebase.agentId,
|
|
991
|
+
codebaseId: worktree.codebaseId,
|
|
992
|
+
worktreeId: worktree.id,
|
|
993
|
+
kind: IOS_SIGNING_INSPECT_JOB_KIND,
|
|
994
|
+
payload: {
|
|
995
|
+
buildId: build.id,
|
|
996
|
+
codebaseId: worktree.codebaseId,
|
|
997
|
+
artifactDirectory: build.artifactDirectory,
|
|
998
|
+
archiveRelativePath: archive.relativePath,
|
|
999
|
+
},
|
|
1000
|
+
idempotencyKey: `ios:signing:${build.id}:${archive.id}`,
|
|
1001
|
+
timeoutSeconds: 120,
|
|
1002
|
+
visibility: "SYSTEM",
|
|
1003
|
+
});
|
|
1004
|
+
try {
|
|
1005
|
+
const result = this.result(await this.waitForJob(job.id));
|
|
1006
|
+
return {
|
|
1007
|
+
teams: Array.isArray(result.teams) ? result.teams : [],
|
|
1008
|
+
identities: Array.isArray(result.identities) ? result.identities : [],
|
|
1009
|
+
profiles: Array.isArray(result.profiles) ? result.profiles : [],
|
|
1010
|
+
bundles: Array.isArray(result.bundles) ? result.bundles : [],
|
|
1011
|
+
};
|
|
1012
|
+
} finally {
|
|
1013
|
+
await prisma.agentJob.deleteMany({
|
|
1014
|
+
where: { id: job.id, visibility: "SYSTEM" },
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
966
1019
|
async destinationsForBuild(buildId: string, requestId: string) {
|
|
967
1020
|
const prisma = await getPrismaClient();
|
|
968
1021
|
const build = await prisma.build.findUnique({
|
|
@@ -1793,10 +1846,36 @@ export class BuildsService {
|
|
|
1793
1846
|
return removed.count;
|
|
1794
1847
|
}
|
|
1795
1848
|
|
|
1849
|
+
/**
|
|
1850
|
+
* Artifact metadata for the over-the-air install manifest. Deliberately does
|
|
1851
|
+
* not contact the agent: iOS fetches the manifest before anything else and
|
|
1852
|
+
* gives up quickly, so this must answer from the database alone.
|
|
1853
|
+
*/
|
|
1854
|
+
async artifactForInstall(buildId: string, artifactId: string) {
|
|
1855
|
+
const prisma = await getPrismaClient();
|
|
1856
|
+
const artifact = await prisma.buildArtifact.findFirst({
|
|
1857
|
+
where: { id: artifactId, buildId },
|
|
1858
|
+
});
|
|
1859
|
+
if (!artifact) return null;
|
|
1860
|
+
return {
|
|
1861
|
+
id: artifact.id,
|
|
1862
|
+
kind: artifact.kind,
|
|
1863
|
+
relativePath: artifact.relativePath,
|
|
1864
|
+
sizeBytes: artifact.sizeBytes,
|
|
1865
|
+
checksum: artifact.checksum,
|
|
1866
|
+
createdAt: artifact.createdAt.toISOString(),
|
|
1867
|
+
metadata: objectValue(
|
|
1868
|
+
parseJson(artifact.metadataJson, {}),
|
|
1869
|
+
"build artifact metadata",
|
|
1870
|
+
),
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1796
1874
|
async prepareArtifactDownload(
|
|
1797
1875
|
buildId: string,
|
|
1798
1876
|
artifactId: string,
|
|
1799
1877
|
uploadId: string,
|
|
1878
|
+
timeoutMs = 170_000,
|
|
1800
1879
|
): Promise<void> {
|
|
1801
1880
|
const prisma = await getPrismaClient();
|
|
1802
1881
|
const artifact = await prisma.buildArtifact.findFirst({
|
|
@@ -1830,11 +1909,11 @@ export class BuildsService {
|
|
|
1830
1909
|
codebaseId,
|
|
1831
1910
|
},
|
|
1832
1911
|
idempotencyKey: `ios:artifact:download:${uploadId}`,
|
|
1833
|
-
timeoutSeconds:
|
|
1912
|
+
timeoutSeconds: Math.ceil(timeoutMs / 1_000) + 10,
|
|
1834
1913
|
visibility: "SYSTEM",
|
|
1835
1914
|
});
|
|
1836
1915
|
try {
|
|
1837
|
-
this.result(await this.waitForJob(job.id,
|
|
1916
|
+
this.result(await this.waitForJob(job.id, timeoutMs));
|
|
1838
1917
|
} finally {
|
|
1839
1918
|
await prisma.agentJob.deleteMany({
|
|
1840
1919
|
where: { id: job.id, visibility: "SYSTEM" },
|
|
@@ -2165,6 +2244,42 @@ export class BuildsService {
|
|
|
2165
2244
|
return updated;
|
|
2166
2245
|
}
|
|
2167
2246
|
|
|
2247
|
+
/**
|
|
2248
|
+
* Records artifacts an agent reported in a job result. Size, checksum, and
|
|
2249
|
+
* metadata are refreshed on conflict so that re-running a job against the same
|
|
2250
|
+
* relative path does not leave a stale checksum behind — downstream callers
|
|
2251
|
+
* key their download cache on it.
|
|
2252
|
+
*/
|
|
2253
|
+
private async upsertArtifacts(
|
|
2254
|
+
transaction: Prisma.TransactionClient,
|
|
2255
|
+
buildId: string,
|
|
2256
|
+
raw: unknown,
|
|
2257
|
+
) {
|
|
2258
|
+
for (const artifact of parseBuildArtifactSnapshots(raw)) {
|
|
2259
|
+
const values = {
|
|
2260
|
+
kind: artifact.kind,
|
|
2261
|
+
sizeBytes: artifact.sizeBytes,
|
|
2262
|
+
checksum: artifact.checksum,
|
|
2263
|
+
metadataJson: JSON.stringify(artifact.metadata),
|
|
2264
|
+
};
|
|
2265
|
+
await transaction.buildArtifact.upsert({
|
|
2266
|
+
where: {
|
|
2267
|
+
buildId_relativePath: {
|
|
2268
|
+
buildId,
|
|
2269
|
+
relativePath: artifact.relativePath,
|
|
2270
|
+
},
|
|
2271
|
+
},
|
|
2272
|
+
create: {
|
|
2273
|
+
id: randomUUID(),
|
|
2274
|
+
buildId,
|
|
2275
|
+
relativePath: artifact.relativePath,
|
|
2276
|
+
...values,
|
|
2277
|
+
},
|
|
2278
|
+
update: values,
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2168
2283
|
private async upsertReportProjection(
|
|
2169
2284
|
transaction: Prisma.TransactionClient,
|
|
2170
2285
|
buildId: string,
|
|
@@ -2420,45 +2535,7 @@ export class BuildsService {
|
|
|
2420
2535
|
);
|
|
2421
2536
|
const prisma = await getPrismaClient();
|
|
2422
2537
|
await prisma.$transaction(async (transaction) => {
|
|
2423
|
-
|
|
2424
|
-
for (const raw of result.artifacts) {
|
|
2425
|
-
const artifact = objectValue(raw, "build report artifact");
|
|
2426
|
-
if (
|
|
2427
|
-
typeof artifact.relativePath !== "string" ||
|
|
2428
|
-
typeof artifact.kind !== "string"
|
|
2429
|
-
) {
|
|
2430
|
-
continue;
|
|
2431
|
-
}
|
|
2432
|
-
await transaction.buildArtifact.upsert({
|
|
2433
|
-
where: {
|
|
2434
|
-
buildId_relativePath: {
|
|
2435
|
-
buildId,
|
|
2436
|
-
relativePath: artifact.relativePath,
|
|
2437
|
-
},
|
|
2438
|
-
},
|
|
2439
|
-
create: {
|
|
2440
|
-
id: randomUUID(),
|
|
2441
|
-
buildId,
|
|
2442
|
-
kind: artifact.kind,
|
|
2443
|
-
relativePath: artifact.relativePath,
|
|
2444
|
-
sizeBytes:
|
|
2445
|
-
typeof artifact.sizeBytes === "number"
|
|
2446
|
-
? artifact.sizeBytes
|
|
2447
|
-
: null,
|
|
2448
|
-
checksum:
|
|
2449
|
-
typeof artifact.checksum === "string"
|
|
2450
|
-
? artifact.checksum
|
|
2451
|
-
: null,
|
|
2452
|
-
metadataJson: JSON.stringify(
|
|
2453
|
-
artifact.metadata && typeof artifact.metadata === "object"
|
|
2454
|
-
? artifact.metadata
|
|
2455
|
-
: {},
|
|
2456
|
-
),
|
|
2457
|
-
},
|
|
2458
|
-
update: {},
|
|
2459
|
-
});
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2538
|
+
await this.upsertArtifacts(transaction, buildId, result.artifacts);
|
|
2462
2539
|
if (result.report && typeof result.report === "object") {
|
|
2463
2540
|
await this.upsertReportProjection(
|
|
2464
2541
|
transaction,
|
|
@@ -2565,23 +2642,29 @@ export class BuildsService {
|
|
|
2565
2642
|
job.status === "SUCCEEDED" &&
|
|
2566
2643
|
typeof result.outputRelativePath === "string"
|
|
2567
2644
|
) {
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2645
|
+
const outputRelativePath = result.outputRelativePath;
|
|
2646
|
+
// One transaction so a subscriber woken by publish() never observes the
|
|
2647
|
+
// export directory without the IPA that was exported into it.
|
|
2648
|
+
await prisma.$transaction(async (transaction) => {
|
|
2649
|
+
await transaction.buildArtifact.upsert({
|
|
2650
|
+
where: {
|
|
2651
|
+
buildId_relativePath: {
|
|
2652
|
+
buildId: row.buildId,
|
|
2653
|
+
relativePath: outputRelativePath,
|
|
2654
|
+
},
|
|
2655
|
+
},
|
|
2656
|
+
create: {
|
|
2657
|
+
id: randomUUID(),
|
|
2571
2658
|
buildId: row.buildId,
|
|
2572
|
-
|
|
2659
|
+
kind: "EXPORT",
|
|
2660
|
+
relativePath: outputRelativePath,
|
|
2661
|
+
sizeBytes:
|
|
2662
|
+
typeof result.sizeBytes === "number" ? result.sizeBytes : null,
|
|
2663
|
+
metadataJson: JSON.stringify({ exportId: row.id }),
|
|
2573
2664
|
},
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
buildId: row.buildId,
|
|
2578
|
-
kind: "EXPORT",
|
|
2579
|
-
relativePath: result.outputRelativePath,
|
|
2580
|
-
sizeBytes:
|
|
2581
|
-
typeof result.sizeBytes === "number" ? result.sizeBytes : null,
|
|
2582
|
-
metadataJson: JSON.stringify({ exportId: row.id }),
|
|
2583
|
-
},
|
|
2584
|
-
update: {},
|
|
2665
|
+
update: {},
|
|
2666
|
+
});
|
|
2667
|
+
await this.upsertArtifacts(transaction, row.buildId, result.artifacts);
|
|
2585
2668
|
});
|
|
2586
2669
|
}
|
|
2587
2670
|
this.publish(row.buildId);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},778568,e=>{"use strict";e.s(["EvalFlags",0,{JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},"GetOwnPropertyNamesFlags",0,{JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},"IntrinsicsFlags",0,{BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},"IsEqualOp",0,{IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2},"JSPromiseStateEnum",0,{Pending:0,Fulfilled:1,Rejected:2},"assertSync",0,function(e){return function(...t){let r=e(...t);if(r&&"object"==typeof r&&r instanceof Promise)throw Error("Function unexpectedly returned a Promise");return r}}])},215402,e=>{"use strict";var t=e.i(469064),r=class extends t.QuickJSContext{async evalCodeAsync(e,r="eval.js",s){let i=+(void 0===s),a=(0,t.evalOptionsToFlags)(s),n=0;try{n=await this.memory.newHeapCharPointer(e).consume(e=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,e.value.ptr,e.value.strlen,r,i,a))}catch(e){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",e),e}let o=this.ffi.QTS_ResolveException(this.ctx.value,n);return o?(this.ffi.QTS_FreeValuePointer(this.ctx.value,n),this.fail(this.memory.heapValueHandle(o))):this.success(this.memory.heapValueHandle(n))}newAsyncifiedFunction(e,t){return this.newFunction(e,t)}},s=class extends t.QuickJSRuntime{constructor(e){super(e)}newContext(e={}){let s=(0,t.intrinsicsToFlags)(e.intrinsics),i=new t.Lifetime(this.ffi.QTS_NewContext(this.rt.value,s),void 0,e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)}),a=new r({module:this.module,ctx:i,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(i.value,a),a}setModuleLoader(e,t){super.setModuleLoader(e,t)}setMaxStackSize(e){return super.setMaxStackSize(e)}},i=class extends t.QuickJSWASMModule{constructor(e,t){super(e,t),this.ffi=t,this.module=e}newRuntime(e={}){let r=new t.Lifetime(this.ffi.QTS_NewRuntime(),void 0,e=>{this.callbacks.deleteRuntime(e),this.ffi.QTS_FreeRuntime(e)}),i=new s({module:this.module,ffi:this.ffi,rt:r,callbacks:this.callbacks});return(0,t.applyBaseRuntimeOptions)(i,e),e.moduleLoader&&i.setModuleLoader(e.moduleLoader),i}newContext(e={}){let t=this.newRuntime(),r=e.ownedLifetimes?e.ownedLifetimes.concat([t]):[t],s=t.newContext({...e,ownedLifetimes:r});return t.context=s,s}evalCode(){throw new t.QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(e,r){return t.Scope.withScopeAsync(async s=>{let i=s.manage(this.newContext());(0,t.applyModuleEvalRuntimeOptions)(i.runtime,r);let a=await i.evalCodeAsync(e,"eval.js");if(void 0!==r.memoryLimitBytes&&i.runtime.setMemoryLimit(-1),a.error)throw i.dump(s.manage(a.error));return i.dump(s.manage(a.value))})}};e.s(["QuickJSAsyncContext",0,r,"QuickJSAsyncRuntime",0,s,"QuickJSAsyncWASMModule",0,i])},210749,e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyNames,s=e.z;e.s(["__commonJS",0,(e,t)=>function(){return t||(0,e[r(e)[0]])((t={exports:{}}).exports,t),t.exports},"__publicField",0,(e,r,s)=>{let i;return(i="symbol"!=typeof r?r+"":r)in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s},"__require",0,s])},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},857764,(e,t,r)=>{t.exports=e.x("node:url",()=>require("node:url"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},462711,651212,316552,e=>{"use strict";var t=e.i(750227);e.s(["minpath",()=>t.default],462711);var r=e.i(59639);e.s(["minproc",()=>r.default],651212);var s=e.i(857764);e.s(["urlToPath",()=>s.fileURLToPath],316552)},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},785148,(e,t,r)=>{t.exports=e.x("better-sqlite3-90e2652d1716b047",()=>require("better-sqlite3-90e2652d1716b047"))},784941,(e,t,r)=>{t.exports=e.x("@prisma/client-2c3a283f134fdcb6/runtime/client",()=>require("@prisma/client-2c3a283f134fdcb6/runtime/client"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},449719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},870722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},925328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},188646,(e,t,r)=>{t.exports=e.x("node:stream/promises",()=>require("node:stream/promises"))},503675,e=>{"use strict";var t=e.i(902157),r=e.i(912714),s=e.i(660526),i=e.i(750227),a=e.i(81111),n=e.i(188646);let o=globalThis,l=o.buildArtifactTransfers??(o.buildArtifactTransfers=new Map);function u(e,t){let r=l.get(e);r&&(l.delete(e),clearTimeout(r.timeout),r.reject(t instanceof Error?t:Error(String(t))))}async function d(e,o,d){let c=l.get(e);if(!c||c.agentId!==o)throw Error("Artifact upload is not expected");if(!d.body)throw Error("Artifact upload body is required");let p=(0,i.join)((0,s.tmpdir)(),`ade-build-artifact-upload-${e}`);try{await (0,n.pipeline)(a.Readable.fromWeb(d.body),(0,t.createWriteStream)(p,{mode:384}));let r=d.headers.get("x-artifact-filename")??"artifact",s="artifact";try{s=decodeURIComponent(r)}catch{}l.delete(e),clearTimeout(c.timeout);let i=d.headers.get("content-length");c.resolve({path:p,filename:s,contentType:d.headers.get("content-type")??"application/octet-stream",size:null!==i&&Number.isFinite(Number(i))?Number(i):null})}catch(t){throw await (0,r.rm)(p,{force:!0}),u(e,t),t}}e.s(["cancelArtifactTransfer",0,u,"expectArtifactTransfer",0,function(e,t){return new Promise((r,s)=>{let i=setTimeout(()=>{l.delete(e),s(Error("The agent did not upload the artifact in time"))},17e4);i.unref(),l.set(e,{agentId:t,resolve:r,reject:s,timeout:i})})},"receiveArtifactTransfer",0,d])},448650,e=>{"use strict";var t=e.i(747909),r=e.i(174017),s=e.i(996250),i=e.i(759756),a=e.i(561916),n=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),m=e.i(570101),_=e.i(626937),f=e.i(10372),h=e.i(193695);e.i(820232);var x=e.i(600220),v=e.i(666680),y=e.i(902157),w=e.i(912714),g=e.i(81111),R=e.i(503675),b=e.i(887394);async function S(e,t){let r=(0,v.randomUUID)();try{var s;let e,{buildId:i,artifactId:a}=await t.params,n=(0,b.getServerServices)(),o=await n.buildsService.getBuild(i);if(!o?.agentId)return new Response("Build agent is unavailable",{status:409});let l=(0,R.expectArtifactTransfer)(r,o.agentId),[u]=await Promise.all([l,n.buildsService.prepareArtifactDownload(i,a,r)]),d=(0,y.createReadStream)(u.path);return d.once("close",()=>void(0,w.rm)(u.path,{force:!0})),new Response(g.Readable.toWeb(d),{headers:{"content-disposition":(e=(s=u.filename).replace(/["\r\n]/g,"_"),`attachment; filename="${e}"; filename*=UTF-8''${encodeURIComponent(s)}`),...null===u.size?{}:{"content-length":String(u.size)},"content-type":u.contentType}})}catch(t){(0,R.cancelArtifactTransfer)(r,t);let e=t instanceof Error?t.message:String(t);if(/not found/i.test(e))return new Response("Artifact not found",{status:404});if(/offline|unavailable|must be updated/i.test(e))return new Response(e,{status:409});return console.error("Build artifact download failed:",t),new Response("Could not download artifact",{status:500})}}e.s(["GET",0,S,"maxDuration",0,180,"runtime",0,"nodejs"],977498);var E=e.i(977498);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/builds/[buildId]/artifacts/[artifactId]/route",pathname:"/api/builds/[buildId]/artifacts/[artifactId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/builds/[buildId]/artifacts/[artifactId]/route.ts",nextConfigOutput:"standalone",userland:E,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:P,serverHooks:j}=A;async function q(e,t,s){s.requestMeta&&(0,i.setRequestMeta)(e,s.requestMeta),A.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/builds/[buildId]/artifacts/[artifactId]/route";v=v.replace(/\/index$/,"")||"/";let y=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:w,deploymentId:g,params:R,nextConfig:b,parsedUrl:S,isDraftMode:E,prerenderManifest:T,routerServerContext:P,isOnDemandRevalidate:j,revalidateOnlyGenerated:q,resolvedPathname:k,clientReferenceManifest:C,serverActionsManifest:N}=y,I=(0,o.normalizeAppPath)(v),M=!!(T.dynamicRoutes[I]||T.routes[k]),L=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,S,!1):t.end("This page could not be found"),null);if(M&&!E){let e=!!T.routes[k],t=T.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await L();throw new h.NoFallbackError}}let O=null;!M||A.isDev||E||(O="/index"===(O=k)?"/":O);let U=!0===A.isDev||!M,F=M&&!U;N&&C&&(0,n.setManifestsSingleton)({page:v,clientReferenceManifest:C,serverActionsManifest:N});let J=e.method||"GET",B=(0,a.getTracer)(),D=B.getActiveScopeSpan(),H=!!(null==P?void 0:P.isWrappedByNextServer),G=!!(0,i.getRequestMeta)(e,"minimalMode"),Q=(0,i.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,b,T,G);null==Q||Q.resetRequestCache(),globalThis.__incrementalCache=Q;let V={params:R,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:U,incrementalCache:Q,cacheLifeProfiles:b.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,i)=>A.onRequestError(e,t,s,i,P)},sharedContext:{buildId:w,deploymentId:g}},K=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),$=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t));try{let i,n=async e=>A.handle($,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${J} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",s),i.updateName(t))}else e.updateName(`${J} ${v}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&j&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await n(i);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(K,z,a,V.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,s=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:j})},!1,P),t}},u=await A.handleResponse({req:e,nextConfig:b,cacheKey:O,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:G});if(!M)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",j?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return G&&M||d.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,_.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,z,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};H&&D?await o(D):(i=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${J} ${v}`,kind:a.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},o),void 0,!H))}catch(t){if(t instanceof h.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:j})},!1,P),M)throw t;return await (0,p.sendResponse)(K,z,new Response(null,{status:500})),null}}e.s(["handler",0,q,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:P})},"routeModule",0,A,"serverHooks",0,j,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,P],448650)},916005,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_buffer_00a6lhv._.js"].map(t=>e.l(t))).then(()=>t(951615)))},408839,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_@prisma_client_runtime_query_compiler_fast_bg_sqlite_mjs_15lig9w._.js"].map(t=>e.l(t))).then(()=>t(53315)))},900998,e=>{e.v(t=>Promise.all(["server/chunks/0d-b_@prisma_client_runtime_query_compiler_fast_bg_sqlite_wasm-base64_mjs_1jb9bv_._.js"].map(t=>e.l(t))).then(()=>t(699802)))},68797,e=>{e.v(e=>Promise.resolve().then(()=>e(81111)))},465520,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-debug-asyncify_dist_ffi_mjs_144ckx_._.js"].map(t=>e.l(t))).then(()=>t(437918)))},250588,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__0-ypkf7._.js","server/chunks/1daa_@jitl_quickjs-wasmfile-debug-asyncify_dist_emscripten-module_mjs_1u58-9a._.js"].map(t=>e.l(t))).then(()=>t(452979)))},835153,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-debug-sync_dist_ffi_mjs_06ojbau._.js"].map(t=>e.l(t))).then(()=>t(896934)))},591520,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__15aat79._.js","server/chunks/1q96_modules_@jitl_quickjs-wasmfile-debug-sync_dist_emscripten-module_mjs_1bzxzsr._.js"].map(t=>e.l(t))).then(()=>t(355384)))},329313,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-release-asyncify_dist_ffi_mjs_1cj0ga-._.js"].map(t=>e.l(t))).then(()=>t(497569)))},529413,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1wtng3p._.js"].map(t=>e.l(t))).then(()=>t(790919)))},175367,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-release-sync_dist_ffi_mjs_0ge8g9f._.js"].map(t=>e.l(t))).then(()=>t(644796)))},674591,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__09skp6r._.js"].map(t=>e.l(t))).then(()=>t(984782)))},969484,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_quickjs-emscripten-core_dist_module-ES6BEMUI_mjs_145exi1._.js"].map(t=>e.l(t))).then(()=>t(807057)))},706986,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_quickjs-emscripten-core_dist_module-asyncify-2EFITU5U_mjs_0eswnkg._.js"].map(t=>e.l(t))).then(()=>t(741366)))},323970,e=>{e.v(e=>Promise.resolve().then(()=>e(522734)))},589793,e=>{e.v(e=>Promise.resolve().then(()=>e(814747)))},628028,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_extended-markdown-adf-parser_dist_js-yaml-GWBS3D3U_mjs_1anug9s._.js"].map(t=>e.l(t))).then(()=>t(591073)))},70729,e=>{e.v(e=>Promise.resolve().then(()=>e(666680)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__02vqwey._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},778568,e=>{"use strict";e.s(["EvalFlags",0,{JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},"GetOwnPropertyNamesFlags",0,{JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},"IntrinsicsFlags",0,{BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},"IsEqualOp",0,{IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2},"JSPromiseStateEnum",0,{Pending:0,Fulfilled:1,Rejected:2},"assertSync",0,function(e){return function(...t){let r=e(...t);if(r&&"object"==typeof r&&r instanceof Promise)throw Error("Function unexpectedly returned a Promise");return r}}])},215402,e=>{"use strict";var t=e.i(469064),r=class extends t.QuickJSContext{async evalCodeAsync(e,r="eval.js",s){let i=+(void 0===s),a=(0,t.evalOptionsToFlags)(s),n=0;try{n=await this.memory.newHeapCharPointer(e).consume(e=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,e.value.ptr,e.value.strlen,r,i,a))}catch(e){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",e),e}let o=this.ffi.QTS_ResolveException(this.ctx.value,n);return o?(this.ffi.QTS_FreeValuePointer(this.ctx.value,n),this.fail(this.memory.heapValueHandle(o))):this.success(this.memory.heapValueHandle(n))}newAsyncifiedFunction(e,t){return this.newFunction(e,t)}},s=class extends t.QuickJSRuntime{constructor(e){super(e)}newContext(e={}){let s=(0,t.intrinsicsToFlags)(e.intrinsics),i=new t.Lifetime(this.ffi.QTS_NewContext(this.rt.value,s),void 0,e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)}),a=new r({module:this.module,ctx:i,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(i.value,a),a}setModuleLoader(e,t){super.setModuleLoader(e,t)}setMaxStackSize(e){return super.setMaxStackSize(e)}},i=class extends t.QuickJSWASMModule{constructor(e,t){super(e,t),this.ffi=t,this.module=e}newRuntime(e={}){let r=new t.Lifetime(this.ffi.QTS_NewRuntime(),void 0,e=>{this.callbacks.deleteRuntime(e),this.ffi.QTS_FreeRuntime(e)}),i=new s({module:this.module,ffi:this.ffi,rt:r,callbacks:this.callbacks});return(0,t.applyBaseRuntimeOptions)(i,e),e.moduleLoader&&i.setModuleLoader(e.moduleLoader),i}newContext(e={}){let t=this.newRuntime(),r=e.ownedLifetimes?e.ownedLifetimes.concat([t]):[t],s=t.newContext({...e,ownedLifetimes:r});return t.context=s,s}evalCode(){throw new t.QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(e,r){return t.Scope.withScopeAsync(async s=>{let i=s.manage(this.newContext());(0,t.applyModuleEvalRuntimeOptions)(i.runtime,r);let a=await i.evalCodeAsync(e,"eval.js");if(void 0!==r.memoryLimitBytes&&i.runtime.setMemoryLimit(-1),a.error)throw i.dump(s.manage(a.error));return i.dump(s.manage(a.value))})}};e.s(["QuickJSAsyncContext",0,r,"QuickJSAsyncRuntime",0,s,"QuickJSAsyncWASMModule",0,i])},210749,e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyNames,s=e.z;e.s(["__commonJS",0,(e,t)=>function(){return t||(0,e[r(e)[0]])((t={exports:{}}).exports,t),t.exports},"__publicField",0,(e,r,s)=>{let i;return(i="symbol"!=typeof r?r+"":r)in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s},"__require",0,s])},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},857764,(e,t,r)=>{t.exports=e.x("node:url",()=>require("node:url"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},462711,651212,316552,e=>{"use strict";var t=e.i(750227);e.s(["minpath",()=>t.default],462711);var r=e.i(59639);e.s(["minproc",()=>r.default],651212);var s=e.i(857764);e.s(["urlToPath",()=>s.fileURLToPath],316552)},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},785148,(e,t,r)=>{t.exports=e.x("better-sqlite3-90e2652d1716b047",()=>require("better-sqlite3-90e2652d1716b047"))},784941,(e,t,r)=>{t.exports=e.x("@prisma/client-2c3a283f134fdcb6/runtime/client",()=>require("@prisma/client-2c3a283f134fdcb6/runtime/client"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},921517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},524836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},504446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},755004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},449719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},870722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},925328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},188646,(e,t,r)=>{t.exports=e.x("node:stream/promises",()=>require("node:stream/promises"))},503675,e=>{"use strict";var t=e.i(902157),r=e.i(912714),s=e.i(660526),i=e.i(750227),a=e.i(81111),n=e.i(188646);let o=globalThis,l=o.buildArtifactTransfers??(o.buildArtifactTransfers=new Map);function u(e,t){let r=l.get(e);r&&(l.delete(e),clearTimeout(r.timeout),r.reject(t instanceof Error?t:Error(String(t))))}async function c(e,o,c){let d=l.get(e);if(!d||d.agentId!==o)throw Error("Artifact upload is not expected");if(!c.body)throw Error("Artifact upload body is required");let p=(0,i.join)((0,s.tmpdir)(),`ade-build-artifact-upload-${e}`);try{await (0,n.pipeline)(a.Readable.fromWeb(c.body),(0,t.createWriteStream)(p,{mode:384}));let r=c.headers.get("x-artifact-filename")??"artifact",s="artifact";try{s=decodeURIComponent(r)}catch{}l.delete(e),clearTimeout(d.timeout);let i=c.headers.get("content-length");d.resolve({path:p,filename:s,contentType:c.headers.get("content-type")??"application/octet-stream",size:null!==i&&Number.isFinite(Number(i))?Number(i):null})}catch(t){throw await (0,r.rm)(p,{force:!0}),u(e,t),t}}e.s(["cancelArtifactTransfer",0,u,"expectArtifactTransfer",0,function(e,t){return new Promise((r,s)=>{let i=setTimeout(()=>{l.delete(e),s(Error("The agent did not upload the artifact in time"))},17e4);i.unref(),l.set(e,{agentId:t,resolve:r,reject:s,timeout:i})})},"receiveArtifactTransfer",0,c])},684812,e=>{"use strict";var t=e.i(747909),r=e.i(174017),s=e.i(996250),i=e.i(759756),a=e.i(561916),n=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),m=e.i(570101),_=e.i(626937),h=e.i(10372),f=e.i(193695);e.i(820232);var x=e.i(600220),v=e.i(666680),w=e.i(902157),g=e.i(912714),y=e.i(81111),R=e.i(503675),S=e.i(887394);let E=new Set(["STAGED","UNSTAGED","UNTRACKED","COMMIT","BRANCH"]);async function A(e,t){let r=(0,v.randomUUID)();try{let{worktreeId:s}=await t.params,i=new URL(e.url),a=i.searchParams.get("scope"),n=i.searchParams.get("path"),o=i.searchParams.get("previousPath"),l=i.searchParams.get("side"),u=i.searchParams.get("commitSha");if(!a||!E.has(a)||!n||"BEFORE"!==l&&"AFTER"!==l)return new Response("Invalid diff image request",{status:400});let c=(0,S.getServerServices)(),d=await c.worktreesService.diffAssetAgentId(s);if(!d)return new Response("Worktree not found",{status:404});let p=(0,R.expectArtifactTransfer)(r,d),[m]=await Promise.all([p,c.worktreesService.prepareDiffAsset(s,{scope:a,path:n,previousPath:o,commitSha:u,side:l},r)]),_=(0,w.createReadStream)(m.path);return _.once("close",()=>void(0,g.rm)(m.path,{force:!0})),new Response(y.Readable.toWeb(_),{headers:{"cache-control":"private, no-store",...null===m.size?{}:{"content-length":String(m.size)},"content-type":m.contentType}})}catch(t){(0,R.cancelArtifactTransfer)(r,t);let e=t instanceof Error?t.message:String(t);if(/not found|unavailable/i.test(e))return new Response(e,{status:404});if(/offline|updated|active/i.test(e))return new Response(e,{status:409});return console.error("Worktree diff image failed:",t),new Response("Could not load diff image",{status:500})}}e.s(["GET",0,A,"maxDuration",0,90,"runtime",0,"nodejs"],763738);var b=e.i(763738);let P=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/worktrees/[worktreeId]/diff-image/route",pathname:"/api/worktrees/[worktreeId]/diff-image",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/worktrees/[worktreeId]/diff-image/route.ts",nextConfigOutput:"standalone",userland:b,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:k,serverHooks:j}=P;async function q(e,t,s){s.requestMeta&&(0,i.setRequestMeta)(e,s.requestMeta),P.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/worktrees/[worktreeId]/diff-image/route";v=v.replace(/\/index$/,"")||"/";let w=await P.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:g,deploymentId:y,params:R,nextConfig:S,parsedUrl:E,isDraftMode:A,prerenderManifest:b,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:j,resolvedPathname:q,clientReferenceManifest:C,serverActionsManifest:N}=w,M=(0,o.normalizeAppPath)(v),I=!!(b.dynamicRoutes[M]||b.routes[q]),L=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,E,!1):t.end("This page could not be found"),null);if(I&&!A){let e=!!b.routes[q],t=b.dynamicRoutes[M];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await L();throw new f.NoFallbackError}}let O=null;!I||P.isDev||A||(O="/index"===(O=q)?"/":O);let U=!0===P.isDev||!I,F=I&&!U;N&&C&&(0,n.setManifestsSingleton)({page:v,clientReferenceManifest:C,serverActionsManifest:N});let D=e.method||"GET",J=(0,a.getTracer)(),B=J.getActiveScopeSpan(),H=!!(null==T?void 0:T.isWrappedByNextServer),G=!!(0,i.getRequestMeta)(e,"minimalMode"),Q=(0,i.getRequestMeta)(e,"incrementalCache")||await P.getIncrementalCache(e,S,b,G);null==Q||Q.resetRequestCache(),globalThis.__incrementalCache=Q;let V={params:R,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:U,incrementalCache:Q,cacheLifeProfiles:S.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,i)=>P.onRequestError(e,t,s,i,T)},sharedContext:{buildId:g,deploymentId:y}},K=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t));try{let i,n=async e=>P.handle(W,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=J.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${D} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",s),i.updateName(t))}else e.updateName(`${D} ${v}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&k&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await n(i);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!I)return await (0,p.sendResponse)(K,z,a,V.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,s=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await P.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:k})},!1,T),t}},u=await P.handleResponse({req:e,nextConfig:S,cacheKey:O,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:j,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:G});if(!I)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return G&&I||c.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,_.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,z,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};H&&B?await o(B):(i=J.getActiveScopeSpan(),await J.withPropagatedContext(e.headers,()=>J.trace(c.BaseServerSpan.handleRequest,{spanName:`${D} ${v}`,kind:a.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!H))}catch(t){if(t instanceof f.NoFallbackError||await P.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:k})},!1,T),I)throw t;return await (0,p.sendResponse)(K,z,new Response(null,{status:500})),null}}e.s(["handler",0,q,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:k})},"routeModule",0,P,"serverHooks",0,j,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,k],684812)},916005,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_buffer_00a6lhv._.js"].map(t=>e.l(t))).then(()=>t(951615)))},408839,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_@prisma_client_runtime_query_compiler_fast_bg_sqlite_mjs_15lig9w._.js"].map(t=>e.l(t))).then(()=>t(53315)))},900998,e=>{e.v(t=>Promise.all(["server/chunks/0d-b_@prisma_client_runtime_query_compiler_fast_bg_sqlite_wasm-base64_mjs_1jb9bv_._.js"].map(t=>e.l(t))).then(()=>t(699802)))},68797,e=>{e.v(e=>Promise.resolve().then(()=>e(81111)))},465520,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-debug-asyncify_dist_ffi_mjs_144ckx_._.js"].map(t=>e.l(t))).then(()=>t(437918)))},250588,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__09v6swg._.js","server/chunks/1daa_@jitl_quickjs-wasmfile-debug-asyncify_dist_emscripten-module_mjs_1u58-9a._.js"].map(t=>e.l(t))).then(()=>t(452979)))},835153,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-debug-sync_dist_ffi_mjs_06ojbau._.js"].map(t=>e.l(t))).then(()=>t(896934)))},591520,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1vxtcsq._.js","server/chunks/1q96_modules_@jitl_quickjs-wasmfile-debug-sync_dist_emscripten-module_mjs_1bzxzsr._.js"].map(t=>e.l(t))).then(()=>t(355384)))},329313,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-release-asyncify_dist_ffi_mjs_1cj0ga-._.js"].map(t=>e.l(t))).then(()=>t(497569)))},529413,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__0aiyd05._.js"].map(t=>e.l(t))).then(()=>t(790919)))},175367,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@jitl_quickjs-wasmfile-release-sync_dist_ffi_mjs_0ge8g9f._.js"].map(t=>e.l(t))).then(()=>t(644796)))},674591,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__15_clsj._.js"].map(t=>e.l(t))).then(()=>t(984782)))},969484,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_quickjs-emscripten-core_dist_module-ES6BEMUI_mjs_145exi1._.js"].map(t=>e.l(t))).then(()=>t(807057)))},706986,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_quickjs-emscripten-core_dist_module-asyncify-2EFITU5U_mjs_0eswnkg._.js"].map(t=>e.l(t))).then(()=>t(741366)))},323970,e=>{e.v(e=>Promise.resolve().then(()=>e(522734)))},589793,e=>{e.v(e=>Promise.resolve().then(()=>e(814747)))},628028,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_extended-markdown-adf-parser_dist_js-yaml-GWBS3D3U_mjs_1anug9s._.js"].map(t=>e.l(t))).then(()=>t(591073)))},70729,e=>{e.v(e=>Promise.resolve().then(()=>e(666680)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0rwpsai._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[3688,a=>{"use strict";var b=a.i(572131),c=globalThis?.document?b.useLayoutEffect:()=>{};a.s(["useSize",0,function(a){let[d,e]=b.useState(void 0);return c(()=>{if(a){e({width:a.offsetWidth,height:a.offsetHeight});let b=new ResizeObserver(b=>{let c,d;if(!Array.isArray(b)||!b.length)return;let f=b[0];if("borderBoxSize"in f){let a=f.borderBoxSize,b=Array.isArray(a)?a[0]:a;c=b.inlineSize,d=b.blockSize}else c=a.offsetWidth,d=a.offsetHeight;e({width:c,height:d})});return b.observe(a,{box:"border-box"}),()=>b.unobserve(a)}e(void 0)},[a]),d}],3688)},20265,a=>{"use strict";let b=["top","right","bottom","left"],c=b.reduce((a,b)=>a.concat(b,b+"-start",b+"-end"),[]),d=Math.min,e=Math.max,f=Math.round,g=Math.floor,h={left:"right",right:"left",bottom:"top",top:"bottom"};function i(a){return a.split("-")[0]}function j(a){return a.split("-")[1]}function k(a){return"x"===a?"y":"x"}function l(a){return"y"===a?"height":"width"}function m(a){let b=a[0];return"t"===b||"b"===b?"y":"x"}function n(a){return k(m(a))}function o(a){return a.includes("start")?a.replace("start","end"):a.replace("end","start")}let p=["left","right"],q=["right","left"],r=["top","bottom"],s=["bottom","top"];function t(a){let b=i(a);return h[b]+a.slice(b.length)}a.s(["clamp",0,function(a,b,c){return e(a,d(b,c))},"createCoords",0,a=>({x:a,y:a}),"evaluate",0,function(a,b){return"function"==typeof a?a(b):a},"floor",0,g,"getAlignment",0,j,"getAlignmentAxis",0,n,"getAlignmentSides",0,function(a,b,c){void 0===c&&(c=!1);let d=j(a),e=n(a),f=l(e),g="x"===e?d===(c?"end":"start")?"right":"left":"start"===d?"bottom":"top";return b.reference[f]>b.floating[f]&&(g=t(g)),[g,t(g)]},"getAxisLength",0,l,"getExpandedPlacements",0,function(a){let b=t(a);return[o(a),b,o(b)]},"getOppositeAlignmentPlacement",0,o,"getOppositeAxis",0,k,"getOppositeAxisPlacements",0,function(a,b,c,d){let e=j(a),f=function(a,b,c){switch(a){case"top":case"bottom":if(c)return b?q:p;return b?p:q;case"left":case"right":return b?r:s;default:return[]}}(i(a),"start"===c,d);return e&&(f=f.map(a=>a+"-"+e),b&&(f=f.concat(f.map(o)))),f},"getOppositePlacement",0,t,"getPaddingObject",0,function(a){var b,c,d,e;return"number"!=typeof a?{top:null!=(b=a.top)?b:0,right:null!=(c=a.right)?c:0,bottom:null!=(d=a.bottom)?d:0,left:null!=(e=a.left)?e:0}:{top:a,right:a,bottom:a,left:a}},"getSide",0,i,"getSideAxis",0,m,"max",0,e,"min",0,d,"placements",0,c,"rectToClientRect",0,function(a){let{x:b,y:c,width:d,height:e}=a;return{width:d,height:e,top:c,left:b,right:b+d,bottom:c+e,x:b,y:c}},"round",0,f,"sides",0,b])},426476,a=>{"use strict";let b;function c(a){return function(a){return!1}(a)?(a.nodeName||"").toLowerCase():"#document"}function d(a){var b;return(null==a||null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function e(a){var b;return null==(b=(function(a){return!1}(a)?a.ownerDocument:a.document)||window.document)?void 0:b.documentElement}function f(a){return!1}function g(a){return!1}function h(a){return!1}function i(a){let{overflow:b,overflowX:c,overflowY:d,display:e}=q(a);return/auto|scroll|overlay|hidden|clip/.test(b+d+c)&&"inline"!==e&&"contents"!==e}function j(a){try{if(a.matches(":popover-open"))return!0}catch(a){}try{return a.matches(":modal")}catch(a){return!1}}let k=/transform|translate|scale|rotate|perspective|filter/,l=/paint|layout|strict|content/,m=a=>!!a&&"none"!==a;function n(a){let b=f(a)?q(a):a;return m(b.transform)||m(b.translate)||m(b.scale)||m(b.rotate)||m(b.perspective)||!o()&&(m(b.backdropFilter)||m(b.filter))||k.test(b.willChange||"")||l.test(b.contain||"")}function o(){return null==b&&(b="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),b}function p(a){return/^(html|body|#document)$/.test(c(a))}function q(a){return d(a).getComputedStyle(a)}function r(a){if("html"===c(a))return a;let b=a.assignedSlot||a.parentNode||h(a)&&a.host||e(a);return h(b)?b.host:b}function s(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}a.s(["getComputedStyle",0,q,"getContainingBlock",0,function(a){let b=r(a);for(;g(b)&&!p(b);){if(n(b))return b;if(j(b))break;b=r(b)}return null},"getDocumentElement",0,e,"getFrameElement",0,s,"getNodeName",0,c,"getNodeScroll",0,function(a){return f(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}},"getOverflowAncestors",0,function a(b,c,e){var f;void 0===c&&(c=[]),void 0===e&&(e=!0);let h=function a(b){let c=r(b);return p(c)?(b.ownerDocument||b).body:g(c)&&i(c)?c:a(c)}(b),j=h===(null==(f=b.ownerDocument)?void 0:f.body),k=d(h);if(!j)return c.concat(h,a(h,[],e));{let b=s(k);return c.concat(k,k.visualViewport||[],i(h)?h:[],b&&e?a(b):[])}},"getParentNode",0,r,"getWindow",0,d,"isContainingBlock",0,n,"isElement",0,f,"isHTMLElement",0,g,"isLastTraversableNode",0,p,"isOverflowElement",0,i,"isShadowRoot",0,h,"isTableElement",0,function(a){return/^(table|td|th)$/.test(c(a))},"isTopLayer",0,j,"isWebKit",0,o])},528094,a=>{"use strict";var b=a.i(572131);function c(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}a.i(935112);var d=Symbol.for("radix.slottable"),e=Symbol.for("react.lazy");function f(a){var b;return null!=a&&"object"==typeof a&&"$$typeof"in a&&a.$$typeof===e&&"_payload"in a&&"object"==typeof(b=a._payload)&&null!==b&&"then"in b}var g=b[" use ".trim().toString()],h=a.i(187924),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((a,e)=>{var i;let j,k=(i=`Primitive.${e}`,(j=b.forwardRef((a,e)=>{var h;let j,k,{children:l,...m}=a,n=null,o=!1,p=[];f(l)&&"function"==typeof g&&(l=g(l._payload)),b.Children.forEach(l,a=>{var c;if(c=a,b.isValidElement(c)&&"function"==typeof c.type&&"__radixId"in c.type&&c.type.__radixId===d){o=!0;let c="child"in a.props?a.props.child:a.props.children;f(c)&&"function"==typeof g&&(c=g(c._payload)),n=((a,c)=>{if("child"in a.props){let c=a.props.child;return b.isValidElement(c)?b.cloneElement(c,void 0,a.props.children(c.props.children)):null}return b.isValidElement(c)?c:null})(a,c),p.push(n?.props?.children)}else p.push(a)}),n?n=b.cloneElement(n,void 0,p):!o&&1===b.Children.count(l)&&b.isValidElement(l)&&(n=l);let q=n?(h=n,(k=(j=Object.getOwnPropertyDescriptor(h.props,"ref")?.get)&&"isReactWarning"in j&&j.isReactWarning)?h.ref:(k=(j=Object.getOwnPropertyDescriptor(h,"ref")?.get)&&"isReactWarning"in j&&j.isReactWarning)?h.props.ref:h.props.ref||h.ref):void 0,r=function(...a){return b.useCallback(function(...a){return b=>{let d=!1,e=a.map(a=>{let e=c(a,b);return d||"function"!=typeof e||(d=!0),e});if(d)return()=>{for(let b=0;b<e.length;b++){let d=e[b];"function"==typeof d?d():c(a[b],null)}}}}(...a),a)}(e,q);if(!n){if(l||0===l){let a,b;throw Error(o?(a=i,`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(b=i,`${b} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return l}let s=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(m,n.props??{});return n.type!==b.Fragment&&(s.ref=e?r:q),b.cloneElement(n,s)})).displayName=`${i}.Slot`,j),l=b.forwardRef((a,b)=>{let{asChild:c,...d}=a;return(0,h.jsx)(c?k:e,{...d,ref:b})});return l.displayName=`Primitive.${e}`,{...a,[e]:l}},{}),j=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),k=b.forwardRef((a,b)=>(0,h.jsx)(i.span,{...a,ref:b,style:{...j,...a.style}}));k.displayName="VisuallyHidden",a.s(["Root",0,k,"VISUALLY_HIDDEN_STYLES",0,j],528094)},342602,(a,b,c)=>{"use strict";b.exports=a.r(918622)},572131,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].React},187924,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].ReactJsxRuntime},935112,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].ReactDOM},918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},909270,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored.contexts.AppRouterContext},736313,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored.contexts.HooksClientContext},818341,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored.contexts.ServerInsertedHtml},738783,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].ReactServerDOMTurbopackClient},658430,a=>{"use strict";a.s(["mergeClasses",0,(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim()])},489214,755487,a=>{"use strict";a.s(["default",0,{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}],489214),a.s(["hasA11yProp",0,a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0;return!1}],755487)},390864,a=>{"use strict";var b=a.i(572131),c=a.i(489214),d=a.i(755487),e=a.i(658430);let f=(0,b.createContext)({}),g=(0,b.forwardRef)(({color:a,size:g,strokeWidth:h,absoluteStrokeWidth:i,className:j="",children:k,iconNode:l,...m},n)=>{let{size:o=24,strokeWidth:p=2,absoluteStrokeWidth:q=!1,color:r="currentColor",className:s=""}=(0,b.useContext)(f)??{},t=i??q?24*Number(h??p)/Number(g??o):h??p;return(0,b.createElement)("svg",{ref:n,...c.default,width:g??o??c.default.width,height:g??o??c.default.height,stroke:a??r,strokeWidth:t,className:(0,e.mergeClasses)("lucide",s,j),...!k&&!(0,d.hasA11yProp)(m)&&{"aria-hidden":"true"},...m},[...l.map(([a,c])=>(0,b.createElement)(a,c)),...Array.isArray(k)?k:[k]])});a.s(["default",0,g],390864)},866718,a=>{"use strict";var b=a.i(187924),c=a.i(368114);a.s(["Input",0,function({className:a,type:d,...e}){return(0,b.jsx)("input",{type:d,"data-slot":"input",className:(0,c.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",a),...e})}])},176965,a=>{"use strict";let b=(0,a.i(164831).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["default",0,b])},933783,a=>{"use strict";var b=a.i(897942);a.s(["Dialog",0,b])},323251,a=>{"use strict";var b=a.i(176965);a.s(["XIcon",()=>b.default])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__10-ftkj._.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
module.exports=[4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},114896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(563681),g=a.r(751409),h=a.r(556704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},608018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(800717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},381740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(114896),e=a.r(563681),f=a.r(556704),g=a.r(832319),h=a.r(660384),i=a.r(760312),j=a.r(13091),k=a.r(608018),l=a.r(786309),m=a.r(950640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(531382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},329927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(751409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(329927),e=a.r(556704),f=a.r(832319),g=a.r(660384),h=a.r(760312),i=a.r(13091),j=a.r(608018),k=a.r(786309),l=a.r(950640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(531382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},551125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(832319),e=a.r(556704),f=a.r(660384),g=a.r(608018),h=a.r(760312),i=a.r(696556),j=a.r(950640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(751409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},905246,(a,b,c)=>{b.exports.cookies=a.r(381740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(551125).draftMode},920916,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return e}});class d extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class e extends URLSearchParams{append(){throw new d}delete(){throw new d}set(){throw new d}sort(){throw new d}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21170,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"RedirectStatusCode",{enumerable:!0,get:function(){return e}});var d,e=((d={})[d.SeeOther=303]="SeeOther",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.PermanentRedirect=308]="PermanentRedirect",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},328859,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={REDIRECT_ERROR_CODE:function(){return g},isRedirectError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(21170),g="NEXT_REDIRECT";function h(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let b=a.digest.split(";"),[c,d]=b,e=b.slice(2,-2).join(";"),h=Number(b.at(-2));return c===g&&("replace"===d||"push"===d)&&"string"==typeof e&&!isNaN(h)&&h in f.RedirectStatusCode}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},844868,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return n},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return l},permanentRedirect:function(){return k},redirect:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(21170),g=a.r(328859),h=a.r(120635).actionAsyncStorage;function i(a,b,c=f.RedirectStatusCode.TemporaryRedirect){let d=Object.defineProperty(Error(g.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d.digest=`${g.REDIRECT_ERROR_CODE};${b};${a};${c};`,d}function j(a,b){throw i(a,b??=h?.getStore()?.isAction?"push":"replace",f.RedirectStatusCode.TemporaryRedirect)}function k(a,b="replace"){throw i(a,b,f.RedirectStatusCode.PermanentRedirect)}function l(a){return(0,g.isRedirectError)(a)?a.digest.split(";").slice(2,-2).join(";"):null}function m(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return a.digest.split(";",2)[1]}function n(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(a.digest.split(";").at(-2))}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},789798,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HTTPAccessErrorStatus:function(){return f},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return h},getAccessFallbackErrorTypeByStatus:function(){return k},getAccessFallbackHTTPStatus:function(){return j},isHTTPAccessFallbackError:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},g=new Set(Object.values(f)),h="NEXT_HTTP_ERROR_FALLBACK";function i(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let[b,c]=a.digest.split(";");return b===h&&g.has(Number(c))}function j(a){return Number(a.digest.split(";")[1])}function k(a){switch(a){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},416155,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"notFound",{enumerable:!0,get:function(){return f}});let d=a.r(789798),e=`${d.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function f(){let a=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,configurable:!0});throw a.digest=e,a}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},934557,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"forbidden",{enumerable:!0,get:function(){return d}}),a.r(789798).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},493845,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unauthorized",{enumerable:!0,get:function(){return d}}),a.r(789798).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},473808,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isPostpone",{enumerable:!0,get:function(){return e}});let d=Symbol.for("react.postpone");function e(a){return"object"==typeof a&&null!==a&&a.$$typeof===d}},401567,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isNextRouterError",{enumerable:!0,get:function(){return f}});let d=a.r(789798),e=a.r(328859);function f(a){return(0,e.isRedirectError)(a)||(0,d.isHTTPAccessFallbackError)(a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},894783,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(13091),e=a.r(473808),f=a.r(149640),g=a.r(401567),h=a.r(660384),i=a.r(696556);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},260968,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(894783).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},673727,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return m},forbidden:function(){return i.forbidden},notFound:function(){return h.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return j.unauthorized},unstable_isUnrecognizedActionError:function(){return l},unstable_rethrow:function(){return k.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(920916),g=a.r(844868),h=a.r(416155),i=a.r(934557),j=a.r(493845),k=a.r(260968);function l(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let m={push:"push",replace:"replace"};("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},570396,a=>{"use strict";a.i(673727),a.s([])},983386,a=>{"use strict";function b(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function c(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let d=function(){return JSON.stringify(arguments)};var e=class{constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}};let f={create:function(){return new e}};a.s(["memoize",0,function(a,e){let g=e&&e.cache?e.cache:f,h=e&&e.serializer?e.serializer:d;return(e&&e.strategy?e.strategy:function(a,d){var e,f;let g=1===a.length?b:c;return e=d.cache.create(),f=d.serializer,g.bind(this,a,e,f)})(a,{cache:g,serializer:h})},"strategies",0,{variadic:function(a,b){var d,e;return d=b.cache.create(),e=b.serializer,c.bind(this,a,d,e)},monadic:function(a,c){var d,e;return d=c.cache.create(),e=c.serializer,b.bind(this,a,d,e)}}])},118845,a=>{"use strict";var b,c=a.i(983386),d=((b=d||{}).MISSING_MESSAGE="MISSING_MESSAGE",b.MISSING_FORMAT="MISSING_FORMAT",b.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",b.INSUFFICIENT_PATH="INSUFFICIENT_PATH",b.INVALID_MESSAGE="INVALID_MESSAGE",b.INVALID_KEY="INVALID_KEY",b.FORMATTING_ERROR="FORMATTING_ERROR",b);function e(a,b){return(0,c.memoize)(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:c.strategies.variadic})}function f(a,b){return e((...b)=>new a(...b),b)}a.s(["I",0,class extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}},"a",0,d,"b",0,function(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},"c",0,function(a){return{getDateTimeFormat:f(Intl.DateTimeFormat,a.dateTime),getNumberFormat:f(Intl.NumberFormat,a.number),getPluralRules:f(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:f(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:f(Intl.ListFormat,a.list),getDisplayNames:f(Intl.DisplayNames,a.displayNames)}},"m",0,e])},731811,a=>{"use strict";var b,c=a.i(983386);let d=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,e=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,f=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,g=/^(@+)?(\+|#+)?[rs]?$/g,h=/(\*)(0+)|(#+)(0+)|(0+)/g,i=/^(0+)$/;function j(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(g,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function k(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function l(a){let b=k(a);return b||{}}let m=((b={})[b.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",b[b.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",b[b.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",b[b.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",b[b.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",b[b.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",b[b.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",b[b.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",b[b.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",b[b.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",b[b.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",b[b.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",b[b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",b[b.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",b[b.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",b[b.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",b[b.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",b[b.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",b[b.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",b[b.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",b[b.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",b[b.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",b[b.INVALID_TAG=23]="INVALID_TAG",b[b.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",b[b.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",b[b.UNCLOSED_TAG=27]="UNCLOSED_TAG",b);function n(a){return!!(a&&"object"==typeof a&&0===a.type)}function o(a){return!!(a&&"object"==typeof a&&1===a.type)}let p=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,q={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},r=RegExp(`^${p.source}*`),s=RegExp(`${p.source}*$`);function t(a,b){return{start:a,end:b}}let u=!!Object.fromEntries,v=!!String.prototype.trimStart,w=!!String.prototype.trimEnd,x=u?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},y=v?function(a){return a.trimStart()}:function(a){return a.replace(r,"")},z=w?function(a){return a.trimEnd()}:function(a){return a.replace(s,"")},A=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");var B=class{constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");if(this.message.length>0){let a=this.message.charCodeAt(0);if(35!==a&&39!==a&&60!==a&&123!==a&&125!==a){let a=function(a){if(0===a.length)return null;let b=1,c=1;for(let d=0;d<a.length;){let e=a.charCodeAt(d);switch(e){case 35:case 39:case 60:case 123:case 125:return null}if(10===e)b++,c=1,d++;else if(c++,e>=55296&&e<=56319&&d+1<a.length){let b=a.charCodeAt(d+1);d+=b>=56320&&b<=57343?2:1}else d++}return{offset:a.length,line:b,column:c}}(this.message);if(a){let b=this.clonePosition();return this.position=a,{val:[{type:0,value:this.message,location:t(b,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:7,location:t(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&C(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(26,t(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${d}/>`,location:t(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(23,t(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(27,t(c,this.clonePosition()));{if(this.isEOF()||!C(this.char()))return this.error(23,t(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(26,t(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:8,value:d,children:f,location:t(c,this.clonePosition())},err:null}:this.error(23,t(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}return{val:{type:0,value:d,location:t(c,this.clonePosition())},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(C(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(2,t(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(3,t(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:d,location:t(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(3,t(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,A.lastIndex=c,A.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:t(b,this.clonePosition())}}parseArgumentOptions(a,b,c,e){let f=this.clonePosition(),g=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(g){case"":return this.error(4,t(f,h));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=z(c.val);if(0===d.length)return this.error(6,t(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:t(b,this.clonePosition())}}let b=this.tryParseArgumentClose(e);if(b.err)return b;let f=t(e,this.clonePosition());if(a&&a.style.startsWith("::")){let b=y(a.style.slice(2));if("number"===g){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:2,value:c,location:f,style:d.val},err:null}}{let e;if(0===b.length)return this.error(10,f);let h=b;return this.locale&&(h=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(q[b||""]||q[d||""]||q[`${d}-001`]||q["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale)),{val:{type:"date"===g?3:4,value:c,location:f,style:{type:1,pattern:h,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(e={},h.replace(d,a=>{let b=a.length;switch(a[0]){case"G":e.era=4===b?"long":5===b?"narrow":"short";break;case"y":e.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][b-3];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][b-3];break;case"a":e.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][b-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][b-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][b-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][b-1];break;case"s":e.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e):{}}},err:null}}}return{val:{type:"number"===g?2:"date"===g?3:4,value:c,location:f,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,t(d,{...d}));this.bumpSpace();let f=this.parseIdentifierIfPossible(),h=0;if("select"!==g&&"offset"===f.value){if(!this.bumpIf(":"))return this.error(13,t(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(13,14);if(a.err)return a;this.bumpSpace(),f=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,g,b,f);if(i.err)return i;let j=this.tryParseArgumentClose(e);if(j.err)return j;let k=t(e,this.clonePosition());if("select"===g)return{val:{type:5,value:c,options:x(i.val),location:k},err:null};return{val:{type:6,value:c,options:x(i.val),offset:h,pluralType:"plural"===g?"cardinal":"ordinal",location:k},err:null}}default:return this.error(5,t(f,h))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(1,t(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,t(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(e).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(7,b)}return{val:{type:0,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...l(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...l(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(h,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(i.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(f.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(f,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...j(a)});continue}if(g.test(c.stem)){b={...b,...j(c.stem)};continue}let a=k(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!i.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(16,19);if(b.err)return b;i=t(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?21:20,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?17:18,t(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:t(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?15:16,t(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(22,t(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=t(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}};function C(a){return a>=97&&a<=122||a>=65&&a<=90}function D(a,b={}){let c=new B(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(m[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,5===b.type||6===b.type)for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else 2===b.type&&n(b.style)||(3===b.type||4===b.type)&&o(b.style)?delete b.style.location:8===b.type&&a(b.children)})}(c.val),c.val}var E=class extends Error{constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},F=class extends E{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,"INVALID_VALUE",d)}},G=class extends E{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,"INVALID_VALUE",c)}},H=class extends E{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,"MISSING_VALUE",b)}};function I(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}var J=class a{constructor(b,d=a.defaultLocale,e,f){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&0===b.type&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c},this.formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&0===b[0].type)return[{type:0,value:b[0].value}];let i=[];for(let j of b){if(0===j.type){i.push({type:0,value:j.value});continue}if(7===j.type){"number"==typeof g&&i.push({type:0,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new H(b,h);let k=f[b];if(1===j.type){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:+("string"!=typeof k),value:k});continue}if(3===j.type){let a="string"==typeof j.style?e.date[j.style]:o(j.style)?j.style.parsedOptions:void 0;i.push({type:0,value:d.getDateTimeFormat(c,a).format(k)});continue}if(4===j.type){let a="string"==typeof j.style?e.time[j.style]:o(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:0,value:d.getDateTimeFormat(c,a).format(k)});continue}if(2===j.type){let a="string"==typeof j.style?e.number[j.style]:n(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:0,value:d.getNumberFormat(c,a).format(k)});continue}if(8===j.type){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new G(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:+("string"!=typeof a),value:a})))}if(5===j.type){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new F(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(6===j.type){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new E(`Intl.PluralRules is not available in this environment.
|
|
2
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,"MISSING_INTL_API",h);let a="bigint"==typeof k?Number(k):k,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new F(j.value,k,Object.keys(j.options),h);let l="bigint"==typeof k?Number(k):k;i.push(...a(g.value,c,d,e,f,l-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&0===c.type&&0===b.type?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=d,this.resolvedLocale=a.resolveLocale(d),"string"==typeof b){if(this.message=b,!a.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...c}=f||{};this.ast=a.__parse(b,{...c,locale:this.resolvedLocale})}else this.ast=b;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(a.formats,e),this.formatters=f&&f.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:(0,c.memoize)((...a)=>new Intl.NumberFormat(...a),{cache:I(a.number),strategy:c.strategies.variadic}),getDateTimeFormat:(0,c.memoize)((...a)=>new Intl.DateTimeFormat(...a),{cache:I(a.dateTime),strategy:c.strategies.variadic}),getPluralRules:(0,c.memoize)((...a)=>new Intl.PluralRules(...a),{cache:I(a.pluralRules),strategy:c.strategies.variadic})}}(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return a.memoizedDefaultLocale||(a.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),a.memoizedDefaultLocale}static{this.resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])}}static{this.__parse=D}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}};a.s(["IntlMessageFormat",0,J],731811)},836772,a=>{"use strict";var b=a.i(800717),c=a.i(731811),d=a.i(118845);function e(...[a,f,g,h]){let i;if(Array.isArray(f))throw new d.I(d.a.INVALID_MESSAGE,void 0);if("object"==typeof f)throw new d.I(d.a.INSUFFICIENT_PATH,void 0);if("string"==typeof f){let a=g||/'[{}<#|']/.test(f)?void 0:f;if(a)return a}let{cache:j,formats:k,formatters:l,globalFormats:m,locale:n,timeZone:o}=h;l.getMessageFormat||(l.getMessageFormat=(0,d.m)((...a)=>new c.IntlMessageFormat(a[0],a[1],a[2],{formatters:l,...a[3]}),j.message));try{let a,b,d,e;i=l.getMessageFormat(f,n,(a=c.IntlMessageFormat.formats.date,b=c.IntlMessageFormat.formats.time,d={...m?.dateTime,...k?.dateTime},e={date:{...a,...d},time:{...b,...d},number:{...m?.number,...k?.number}},o&&["date","time"].forEach(a=>{let b=e[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:o,...c}}),e),{formatters:{...l,getDateTimeFormat:(a,b)=>l.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??o})}})}catch(a){throw new d.I(d.a.INVALID_MESSAGE,void 0)}let p=i.format(g);return(0,b.isValidElement)(p)||Array.isArray(p)||"string"==typeof p?p:String(p)}function f(...a){return a.filter(Boolean).join(".")}function g(a){return f(a.namespace,a.key)}function h(a){console.error(a)}function i(a,b,c,d){let e=f(d,c);if(!b)throw Error(e);let g=b;return c.split(".").forEach(b=>{let c=g[b];if(null==b||null==c)throw Error(e+` (${a})`);g=c}),g}e.raw=!0,a.s(["a",0,function(a){let c=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?i(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new d.I(d.a.MISSING_MESSAGE,a.message)}}(a.locale,a.messages,a.namespace);return function({cache:a,formats:c,formatters:h,getMessageFallback:j=g,locale:k,messagesOrError:l,namespace:m,onError:n,timeZone:o}){let p=l instanceof d.I;function q(a,b,c,e){let f=new d.I(b,c);return n(f),e??j({error:f,key:a,namespace:m})}function r(g,r,s,t){let u;if(p){if(!t)return n(l),j({error:l,key:g,namespace:m});u=t}else try{u=i(k,l,g,m)}catch(a){if(!t)return q(g,d.a.MISSING_MESSAGE,a.message,t);u=t}try{let d,i=f(m,g);return e(i,u,r?(d={},Object.keys(r).forEach(a=>{let c,e=0,f=r[a];c="function"==typeof f?c=>{let d=f(c);return(0,b.isValidElement)(d)?(0,b.cloneElement)(d,{key:a+e++}):d}:f,d[a]=c}),d):r,{cache:a,formatters:h,globalFormats:c,formats:s,locale:k,timeZone:o})}catch(c){let a,b;return c instanceof d.I?(a=c.code,b=c.originalMessage):(a=d.a.FORMATTING_ERROR,b=c.message),q(g,a,b,t)}}function s(a,b,c,e){let f=r(a,b,c,e);return"string"!=typeof f?q(a,d.a.INVALID_MESSAGE,void 0):f}return s.rich=r,s.markup=(a,b,c,d)=>r(a,b,c,d),s.raw=a=>{if(p)return n(l),j({error:l,key:a,namespace:m});try{return i(k,l,a,m)}catch(b){return q(a,d.a.MISSING_MESSAGE,b.message)}},s.has=a=>{if(p)return!1;try{return i(k,l,a,m),!0}catch{return!1}},s}({...a,messagesOrError:c})},"b",0,h,"d",0,g,"i",0,function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||h,getMessageFallback:b||g}},"r",0,function(a,b){return a===b?void 0:a.slice((b+".").length)}],836772)},303109,a=>{"use strict";var b=a.i(118845),c=a.i(836772);a.s(["createTranslator",0,function({_cache:a=(0,b.b)(),_formatters:d=(0,b.c)(a),getMessageFallback:e=c.d,messages:f,namespace:g,onError:h=c.b,...i}){return function({messages:a,namespace:b,...d}){return a=a["!"],b=(0,c.r)(b,"!"),(0,c.a)({...d,messages:a,namespace:b})}({...i,onError:h,cache:a,formatters:d,getMessageFallback:e,messages:{"!":f},namespace:g?`!.${g}`:"!"})},"hasLocale",0,function(a,b){return a.includes(b)}])},522918,520276,113852,861457,286661,a=>{"use strict";var b=a.i(836772);a.s(["initializeConfig",()=>b.i],522918);var c=a.i(118845);function d(a){let b=function(){try{return"true"===process.env._next_intl_trailing_slash}catch{return!1}}(),[c,...d]=a.split("#"),e=d.join("#"),f=c;if("/"!==f){let a=f.endsWith("/");b&&!a?f+="/":!b&&a&&(f=f.slice(0,-1))}return e&&(f+="#"+e),f}function e(a){return a.includes("[[...")}function f(a){return a.includes("[...")}function g(a){return a.includes("[")}function h(a,b){let c=a.split("/"),d=b.split("/"),h=Math.max(c.length,d.length);for(let a=0;a<h;a++){let b=c[a],h=d[a];if(!b&&h)return -1;if(b&&!h)return 1;if(b||h){if(!g(b)&&g(h))return -1;if(g(b)&&!g(h))return 1;if(!f(b)&&f(h))return -1;if(f(b)&&!f(h))return 1;if(!e(b)&&e(h))return -1;if(e(b)&&!e(h))return 1}}return 0}function i(a){return"function"==typeof a.then}a.s(["_createIntlFormatters",()=>c.c],520276),a.s(["_createCache",()=>c.b],113852),a.s(["getLocalePrefix",0,function(a,b){return"never"!==b.mode&&b.prefixes?.[a]||"/"+a},"getLocalizedTemplate",0,function(a,b,c){return"string"==typeof a?a:a[b]||c},"getSortedPathnames",0,function(a){return a.sort(h)},"isLocalizableHref",0,function(a){let b;return("object"==typeof a?null==a.host&&null==a.hostname:!/^[a-z]+:/i.test(a))&&(null==(b="object"==typeof a?a.pathname:a)||!!b.startsWith("/"))},"isPromise",0,i,"matchesPathname",0,function(a,b){let c,e=d(a),f=d(b);return(c=e.replace(/\/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[(\.\.\.[^\]]+)\]/g,"(.+)").replace(/\[([^\]]+)\]/g,"([^/]+)"),RegExp(`^${c}$`)).test(f)},"normalizeTrailingSlash",0,d,"prefixPathname",0,function(a,b){let c=a;return/^\/(\?.*)?$/.test(b)&&(b=b.slice(1)),c+=b}],861457);var j=a.i(905246),k=a.i(800717);let l=(0,k.cache)(function(){return{locale:void 0}}),m=(0,k.cache)(async function(){let a=(0,j.headers)();return i(a)?await a:a}),n=(0,k.cache)(async function(){let a;try{a=(await m()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function o(){return l().locale||await n()}a.s(["getRequestLocale",0,o],286661)},332776,885221,767228,a=>{"use strict";var b=a.i(800717),c=a.i(522918),d=a.i(520276),e=a.i(113852),f=a.i(861457),g=a.i(286661),h=a.i(303109);let i={locales:["en","es","fr","de"],defaultLocale:"en",localePrefix:"always"};a.s(["routing",0,i],885221);let j=async({requestLocale:b})=>{let c=await b,d=(0,h.hasLocale)(i.locales,c)?c:i.defaultLocale;return{locale:d,messages:(await a.f({"../../messages/de.json":{id:()=>561451,module:()=>a.A(561451)},"../../messages/en.json":{id:()=>412437,module:()=>a.A(412437)},"../../messages/es.json":{id:()=>83578,module:()=>a.A(83578)},"../../messages/fr.json":{id:()=>276111,module:()=>a.A(276111)}}).import(`../../messages/${d}.json`)).default}},k=(0,b.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),l=(0,b.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):(0,g.getRequestLocale)()}});if((0,f.isPromise)(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),m=(0,b.cache)(d._createIntlFormatters),n=(0,b.cache)(e._createCache),o=(0,b.cache)(async function(a){let b=await l(j,a);return{...(0,c.initializeConfig)(b),_formatters:m(n()),timeZone:b.timeZone||k()}});a.s(["default",0,o],767228);var p=(0,b.cache)(function(a,b){return(0,h.createTranslator)({...a,namespace:b})}),q=(0,b.cache)(async function(a){let b,c;return"string"==typeof a?b=a:a&&(c=a.locale,b=a.namespace),p(await o(c),b)});a.s(["getTranslations",0,q],332776)}];
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=node_modules_1n5939e._.js.map
|