diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 65d5604..5318693 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -44,7 +44,7 @@ model User { createdSchedules Schedule[] @relation("CreatedSchedules") confirmedSchedules Schedule[] @relation("ConfirmedSchedules") - mapVetoChoices MapVetoStep[] @relation("VetoStepChooser") + mapVoteChoices MapVoteStep[] @relation("VoteStepChooser") } model Team { @@ -68,7 +68,7 @@ model Team { schedulesAsTeamA Schedule[] @relation("ScheduleTeamA") schedulesAsTeamB Schedule[] @relation("ScheduleTeamB") - mapVetoSteps MapVetoStep[] @relation("VetoStepTeam") + mapVoteSteps MapVoteStep[] @relation("VoteStepTeam") } model TeamInvite { @@ -138,7 +138,7 @@ model Match { bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren matchDate DateTime? // geplante Startzeit (separat von demoDate) - mapVeto MapVeto? // 1:1 Map-Vote-Status + mapVote MapVote? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -297,51 +297,50 @@ model ServerRequest { // 🗺️ Map-Vote // ────────────────────────────────────────────── -enum MapVetoAction { +enum MapVoteAction { BAN PICK DECIDER } -model MapVeto { +model MapVote { id String @id @default(uuid()) matchId String @unique match Match @relation(fields: [matchId], references: [id]) - // Basiszustand bestOf Int @default(3) - mapPool String[] // z.B. ["de_inferno","de_mirage",...] + mapPool String[] currentIdx Int @default(0) locked Boolean @default(false) + opensAt DateTime? - // Optional: serverseitig speichern, statt im UI zu berechnen - opensAt DateTime? + adminEditingBy String? + adminEditingSince DateTime? - steps MapVetoStep[] + steps MapVoteStep[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } -model MapVetoStep { +model MapVoteStep { id String @id @default(uuid()) - vetoId String + voteId String order Int - action MapVetoAction + action MapVoteAction - // Team, das am Zug ist (kann bei DECIDER null sein) teamId String? - team Team? @relation("VetoStepTeam", fields: [teamId], references: [id]) + team Team? @relation("VoteStepTeam", fields: [teamId], references: [id]) - // Ergebnis & wer gewählt hat map String? chosenAt DateTime? chosenBy String? - chooser User? @relation("VetoStepChooser", fields: [chosenBy], references: [steamId]) + chooser User? @relation("VoteStepChooser", fields: [chosenBy], references: [steamId]) - veto MapVeto @relation(fields: [vetoId], references: [id]) + vote MapVote @relation(fields: [voteId], references: [id]) - @@unique([vetoId, order]) + @@unique([voteId, order]) @@index([teamId]) @@index([chosenBy]) } + diff --git a/public/assets/img/maps/de_nuke/1.jpg b/public/assets/img/maps/de_nuke/1.jpg new file mode 100644 index 0000000..92327ed Binary files /dev/null and b/public/assets/img/maps/de_nuke/1.jpg differ diff --git a/src/app/api/matches/[matchId]/_builders.ts b/src/app/api/matches/[matchId]/_builders.ts index 4173b06..9d36069 100644 --- a/src/app/api/matches/[matchId]/_builders.ts +++ b/src/app/api/matches/[matchId]/_builders.ts @@ -56,7 +56,7 @@ export async function buildCommunityFuturePayload(m: any) { .sort((a: any, b: any) => (a.user.name || '').localeCompare(b.user.name || '')) const startTs = computeStartTs(m) - const editableUntil = startTs - 60 * 60 * 1000 // 1h vor Start/Veto + const editableUntil = startTs - 60 * 60 * 1000 // 1h vor Start/Vote return { id : m.id, diff --git a/src/app/api/matches/[matchId]/delete/route.ts b/src/app/api/matches/[matchId]/delete/route.ts index cdbf5a6..a38583d 100644 --- a/src/app/api/matches/[matchId]/delete/route.ts +++ b/src/app/api/matches/[matchId]/delete/route.ts @@ -26,8 +26,8 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st } await prisma.$transaction(async (tx) => { - await tx.mapVetoStep.deleteMany({ where: { veto: { matchId } } }) - await tx.mapVeto.deleteMany({ where: { matchId } }) + await tx.mapVoteStep.deleteMany({ where: { vote: { matchId } } }) + await tx.mapVote.deleteMany({ where: { matchId } }) await tx.playerStats.deleteMany({ where: { matchId } }) await tx.matchPlayer.deleteMany({ where: { matchId } }) await tx.rankHistory.deleteMany({ where: { matchId } }) diff --git a/src/app/api/matches/[matchId]/mapvote/admin-edit/route.ts b/src/app/api/matches/[matchId]/mapvote/admin-edit/route.ts new file mode 100644 index 0000000..9e9623a --- /dev/null +++ b/src/app/api/matches/[matchId]/mapvote/admin-edit/route.ts @@ -0,0 +1,191 @@ +// /app/api/matches/[matchId]/mapvote/admin-edit/route.ts +import { NextRequest, NextResponse } from 'next/server' +import { getServerSession } from 'next-auth' +import { authOptions } from '@/app/lib/auth' +import { prisma } from '@/app/lib/prisma' +import { MapVoteAction } from '@/generated/prisma' +import { sendServerSSEMessage } from '@/app/lib/sse-server-client' +import { randomInt } from 'crypto' +import { MAP_OPTIONS } from '@/app/lib/mapOptions' + +/** -------- helpers copied (light) from main vote route -------- */ + +const ACTION_MAP: Record = { + BAN: 'ban', PICK: 'pick', DECIDER: 'decider', +} + +function mapActionToApi(a: MapVoteAction): 'ban'|'pick'|'decider' { + return ACTION_MAP[a] +} + +function buildSteps(bestOf: number, teamAId: string, teamBId: string) { + if (bestOf === 3) { + return [ + { order: 0, action: 'BAN', teamId: teamAId }, + { order: 1, action: 'BAN', teamId: teamBId }, + { order: 2, action: 'PICK', teamId: teamAId }, + { order: 3, action: 'PICK', teamId: teamBId }, + { order: 4, action: 'BAN', teamId: teamAId }, + { order: 5, action: 'BAN', teamId: teamBId }, + { order: 6, action: 'DECIDER', teamId: null }, + ] as const + } + return [ + { order: 0, action: 'BAN', teamId: teamAId }, + { order: 1, action: 'BAN', teamId: teamBId }, + { order: 2, action: 'PICK', teamId: teamAId }, + { order: 3, action: 'PICK', teamId: teamBId }, + { order: 4, action: 'PICK', teamId: teamAId }, + { order: 5, action: 'PICK', teamId: teamBId }, + { order: 6, action: 'PICK', teamId: teamAId }, + ] as const +} + +async function ensureVote(matchId: string) { + const match = await prisma.match.findUnique({ + where: { id: matchId }, + include: { + teamA: true, + teamB: true, + mapVote: { include: { steps: true } }, + }, + }) + if (!match) return { match: null, vote: null } + + if (match.mapVote) return { match, vote: match.mapVote } + + const bestOf = match.bestOf ?? 3 + const mapPool = MAP_OPTIONS.map(m => m.key) + const firstIsA = (typeof randomInt === 'function') ? randomInt(0, 2) === 0 : Math.random() < 0.5 + const firstTeamId = firstIsA ? match.teamA!.id : match.teamB!.id + const secondTeamId = firstIsA ? match.teamB!.id : match.teamA!.id + + const stepsDef = buildSteps(bestOf, firstTeamId, secondTeamId) + + const created = await prisma.mapVote.create({ + data: { + matchId: match.id, + bestOf, + mapPool, + currentIdx: 0, + locked: false, + steps: { + create: stepsDef.map(s => ({ + order: s.order, + action: s.action as MapVoteAction, + teamId: s.teamId, + })), + }, + }, + include: { steps: true }, + }) + return { match, vote: created } +} + +function shapeAdminEdit(vote: any) { + return vote.adminEditingBy + ? { + enabled: true, + by: vote.adminEditingBy as string, + since: vote.adminEditingSince ? new Date(vote.adminEditingSince).toISOString() : null, + } + : { enabled: false as const, by: null, since: null } +} + +function shapeStateSlim(vote: any) { + return { + bestOf: vote.bestOf as number, + mapPool: vote.mapPool as string[], + currentIndex: vote.currentIdx as number, + locked: vote.locked as boolean, + adminEdit: shapeAdminEdit(vote), + steps: [...vote.steps].sort((a: any, b: any) => a.order - b.order).map((s: any) => ({ + order : s.order, + action : mapActionToApi(s.action), + teamId : s.teamId, + map : s.map ?? null, + chosenAt: s.chosenAt ? s.chosenAt.toISOString() : null, + chosenBy: s.chosenBy ?? null, + })), + } +} + +/** ------------------ POST (toggle admin edit) ------------------ */ +// Body: { enabled: boolean, force?: boolean } +// - enabled=true: setzt adminEditingBy = me.steamId (falls schon anderer Admin aktiv -> 409, außer force) +// - enabled=false: cleart adminEditingBy, wenn ich der aktive Editor bin (oder force) +export async function POST(req: NextRequest, { params }: { params: { matchId: string } }) { + const session = await getServerSession(authOptions(req)) + const me = session?.user as { steamId: string; isAdmin?: boolean } | undefined + if (!me?.steamId) return NextResponse.json({ message: 'Nicht eingeloggt' }, { status: 401 }) + if (!me.isAdmin) return NextResponse.json({ message: 'Nur Admins' }, { status: 403 }) + + const matchId = params.matchId + if (!matchId) return NextResponse.json({ message: 'Missing id' }, { status: 400 }) + + let body: { enabled?: boolean; force?: boolean } = {} + try { body = await req.json() } catch {} + const enabled = !!body.enabled + const force = !!body.force + + try { + const { match, vote } = await ensureVote(matchId) + if (!match || !vote) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + + const someoneElseActive = vote.adminEditingBy && vote.adminEditingBy !== me.steamId + + // Konfliktbehandlung + if (enabled && someoneElseActive && !force) { + return NextResponse.json( + { + message: 'Bereits im Admin-Edit durch anderen Benutzer', + adminEdit: shapeAdminEdit(vote), + }, + { status: 409 }, + ) + } + + // Toggle speichern + const updated = await prisma.mapVote.update({ + where: { id: vote.id }, + data: enabled + ? { adminEditingBy: me.steamId, adminEditingSince: new Date() } + : (force || vote.adminEditingBy === me.steamId + ? { adminEditingBy: null, adminEditingSince: null } + : {} // nichts ändern, wenn jemand anderer aktiv ist und !force + ), + include: { steps: true }, + }) + + // 🔔 gezieltes SSE-Event + await sendServerSSEMessage({ + type: 'map-vote-admin-edit', + matchId, + payload: { + enabled: !!updated.adminEditingBy, + by: updated.adminEditingBy ?? null, + since: updated.adminEditingSince ?? null, + }, + }) + + return NextResponse.json({ adminEdit: shapeAdminEdit(updated), state: shapeStateSlim(updated) }) + } catch (e) { + console.error('[map-vote][POST admin-edit] error', e) + return NextResponse.json({ message: 'Toggle fehlgeschlagen' }, { status: 500 }) + } +} + +/** ------------------ GET (optional status) ------------------ */ +// Praktisch, falls du den Status separat pollen willst. +export async function GET(_req: NextRequest, { params }: { params: { matchId: string } }) { + const matchId = params.matchId + if (!matchId) return NextResponse.json({ message: 'Missing id' }, { status: 400 }) + try { + const { match, vote } = await ensureVote(matchId) + if (!match || !vote) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + return NextResponse.json({ adminEdit: shapeAdminEdit(vote), state: shapeStateSlim(vote) }) + } catch (e) { + console.error('[map-vote][GET admin-edit] error', e) + return NextResponse.json({ message: 'Fehler beim Laden' }, { status: 500 }) + } +} diff --git a/src/app/api/matches/[matchId]/mapvote/reset/route.ts b/src/app/api/matches/[matchId]/mapvote/reset/route.ts index 61fb4ab..08d17ad 100644 --- a/src/app/api/matches/[matchId]/mapvote/reset/route.ts +++ b/src/app/api/matches/[matchId]/mapvote/reset/route.ts @@ -3,41 +3,43 @@ import { NextRequest, NextResponse } from 'next/server' import { getServerSession } from 'next-auth' import { authOptions } from '@/app/lib/auth' import { prisma } from '@/app/lib/prisma' -import { MapVetoAction } from '@/generated/prisma' +import { MapVoteAction } from '@/generated/prisma' import { sendServerSSEMessage } from '@/app/lib/sse-server-client' +import { MAP_OPTIONS } from '@/app/lib/mapOptions' -/** gleicher Pool wie in deiner mapvote-Route */ -const ACTIVE_DUTY: string[] = [ - 'de_inferno','de_mirage','de_nuke','de_overpass','de_vertigo','de_ancient','de_anubis', -] +// ---- Pool aus MAP_OPTIONS ableiten (nur "de_*", ohne Sonderkarten) ---- +const MAP_POOL: string[] = MAP_OPTIONS + .filter(m => m.key.startsWith('de_') && m.key !== 'lobby_mapvote') + .map(m => m.key) -/** identische Logik wie in deiner mapvote-Route */ -function vetoOpensAt(match: { matchDate: Date | null, demoDate: Date | null }) { +// identisch zu mapvote-Route +function voteOpensAt(match: { matchDate: Date | null, demoDate: Date | null }) { const base = match.matchDate ?? match.demoDate ?? new Date() - return new Date(base.getTime() - 60 * 60 * 1000) // 1h vorher + return new Date(base.getTime() - 60 * 60 * 1000) } -function buildSteps(bestOf: number, teamAId: string, teamBId: string) { +// buildSteps so umbauen, dass die Reihenfolge (Startteam) variabel ist +function buildSteps(bestOf: number, firstId: string, secondId: string) { if (bestOf === 3) { return [ - { order: 0, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 1, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 2, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 3, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 4, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 5, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 6, action: MapVetoAction.DECIDER, teamId: null }, + { order: 0, action: MapVoteAction.BAN, teamId: firstId }, + { order: 1, action: MapVoteAction.BAN, teamId: secondId }, + { order: 2, action: MapVoteAction.PICK, teamId: firstId }, + { order: 3, action: MapVoteAction.PICK, teamId: secondId }, + { order: 4, action: MapVoteAction.BAN, teamId: firstId }, + { order: 5, action: MapVoteAction.BAN, teamId: secondId }, + { order: 6, action: MapVoteAction.DECIDER, teamId: null }, ] as const } // BO5 return [ - { order: 0, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 1, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 2, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 3, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 4, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 5, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 6, action: MapVetoAction.PICK, teamId: teamAId }, + { order: 0, action: MapVoteAction.BAN, teamId: firstId }, + { order: 1, action: MapVoteAction.BAN, teamId: secondId }, + { order: 2, action: MapVoteAction.PICK, teamId: firstId }, + { order: 3, action: MapVoteAction.PICK, teamId: secondId }, + { order: 4, action: MapVoteAction.PICK, teamId: firstId }, + { order: 5, action: MapVoteAction.PICK, teamId: secondId }, + { order: 6, action: MapVoteAction.PICK, teamId: firstId }, ] as const } @@ -50,7 +52,6 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st const matchId = params.matchId if (!matchId) return NextResponse.json({ message: 'Missing matchId' }, { status: 400 }) - // Match laden (inkl. Teams & BestOf für Steps) const match = await prisma.match.findUnique({ where: { id: matchId }, select: { @@ -60,29 +61,32 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st demoDate: true, teamA: { select: { id: true } }, teamB: { select: { id: true } }, - mapVeto: { select: { id: true } }, + mapVote: { select: { id: true } }, }, }) - if (!match || !match.teamA?.id || !match.teamB?.id) { + if (!match?.teamA?.id || !match?.teamB?.id) { return NextResponse.json({ message: 'Match/Teams nicht gefunden' }, { status: 404 }) } - const bestOf = match.bestOf ?? 3 - const stepsDef = buildSteps(bestOf, match.teamA.id, match.teamB.id) - const opensAt = vetoOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) + const bestOf = match.bestOf ?? 3 + // ---- Zufälliges Startteam bestimmen ---- + const firstId = Math.random() < 0.5 ? match.teamA.id : match.teamB.id + const secondId = firstId === match.teamA.id ? match.teamB.id : match.teamA.id + const stepsDef = buildSteps(bestOf, firstId, secondId) + + const opensAt = voteOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) - // Reset in einer TX: alte Steps -> löschen, MapVeto -> löschen, neu anlegen await prisma.$transaction(async (tx) => { - if (match.mapVeto?.id) { - await tx.mapVetoStep.deleteMany({ where: { vetoId: match.mapVeto.id } }) - await tx.mapVeto.delete({ where: { matchId } }) + if (match.mapVote?.id) { + await tx.mapVoteStep.deleteMany({ where: { voteId: match.mapVote.id } }) + await tx.mapVote.delete({ where: { matchId } }) } - await tx.mapVeto.create({ + await tx.mapVote.create({ data: { matchId, bestOf, - mapPool: ACTIVE_DUTY, + mapPool: MAP_POOL, // <- aus MAP_OPTIONS currentIdx: 0, locked: false, opensAt, @@ -97,8 +101,6 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st }) }) - // 🔔 UI-Refresh für alle Clients await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) - return NextResponse.json({ ok: true }) } diff --git a/src/app/api/matches/[matchId]/mapvote/route.ts b/src/app/api/matches/[matchId]/mapvote/route.ts index 042ac17..f8b68b1 100644 --- a/src/app/api/matches/[matchId]/mapvote/route.ts +++ b/src/app/api/matches/[matchId]/mapvote/route.ts @@ -3,27 +3,37 @@ import { NextResponse, NextRequest } from 'next/server' import { getServerSession } from 'next-auth' import { authOptions } from '@/app/lib/auth' import { prisma } from '@/app/lib/prisma' -import { MapVetoAction } from '@/generated/prisma' +import { MapVoteAction } from '@/generated/prisma' import { sendServerSSEMessage } from '@/app/lib/sse-server-client' +import { randomInt } from 'crypto' +import { MAP_OPTIONS } from '@/app/lib/mapOptions' +import { createHash } from 'crypto' /* -------------------- Konstanten -------------------- */ -const ACTIVE_DUTY: string[] = [ - 'de_inferno','de_mirage','de_nuke','de_overpass','de_vertigo','de_ancient','de_anubis', -] - -const ACTION_MAP: Record = { +const ACTION_MAP: Record = { BAN: 'ban', PICK: 'pick', DECIDER: 'decider', } /* -------------------- Helper -------------------- */ -function vetoOpensAt(match: { matchDate: Date | null, demoDate: Date | null }) { +// Admin-Edit-Flag setzen/zurücksetzen +async function setAdminEdit(voteId: string, by: string | null) { + return prisma.mapVote.update({ + where: { id: voteId }, + data: by + ? { adminEditingBy: by, adminEditingSince: new Date() } + : { adminEditingBy: null, adminEditingSince: null }, + include: { steps: true }, + }) +} + +function voteOpensAt(match: { matchDate: Date | null, demoDate: Date | null }) { const base = match.matchDate ?? match.demoDate ?? new Date() return new Date(base.getTime() - 60 * 60 * 1000) // 1h vorher } -function mapActionToApi(a: MapVetoAction): 'ban'|'pick'|'decider' { +function mapActionToApi(a: MapVoteAction): 'ban'|'pick'|'decider' { return ACTION_MAP[a] } @@ -52,8 +62,8 @@ function buildSteps(bestOf: number, teamAId: string, teamBId: string) { ] as const } -function shapeState(veto: any) { - const steps = [...veto.steps] +function shapeState(vote: any) { + const steps = [...vote.steps] .sort((a, b) => a.order - b.order) .map((s: any) => ({ order : s.order, @@ -65,12 +75,20 @@ function shapeState(veto: any) { })) return { - bestOf : veto.bestOf, - mapPool : veto.mapPool as string[], - currentIndex: veto.currentIdx, - locked : veto.locked as boolean, - opensAt : veto.opensAt ? new Date(veto.opensAt).toISOString() : null, + bestOf : vote.bestOf, + mapPool : vote.mapPool as string[], + currentIndex: vote.currentIdx, + locked : vote.locked as boolean, + opensAt : vote.opensAt ? new Date(vote.opensAt).toISOString() : null, steps, + // Admin-Edit Shape + adminEdit: vote.adminEditingBy + ? { + enabled: true, + by: vote.adminEditingBy as string, + since: vote.adminEditingSince ? new Date(vote.adminEditingSince).toISOString() : null, + } + : { enabled: false, by: null, since: null }, } } @@ -102,7 +120,6 @@ function shapePlayer(p: any) { // Base-URL aus Request ableiten (lokal/proxy-fähig) function getBaseUrl(req: NextRequest | NextResponse) { - // NextRequest hat headers; bei internen Aufrufen ggf. NextResponse, hier aber nur Request relevant const proto = (req.headers.get('x-forwarded-proto') || 'http').split(',')[0].trim() const host = (req.headers.get('x-forwarded-host') || req.headers.get('host') || '').split(',')[0].trim() return `${proto}://${host}` @@ -115,10 +132,8 @@ async function fetchTeamApi(teamId: string | null | undefined, req: NextRequest) try { const r = await fetch(url, { - // interne Server-Fetches dürfen nicht gecacht werden cache: 'no-store', headers: { - // Forward auth/proxy headers, falls nötig (nicht zwingend) 'x-forwarded-proto': req.headers.get('x-forwarded-proto') || '', 'x-forwarded-host' : req.headers.get('x-forwarded-host') || '', } @@ -129,7 +144,7 @@ async function fetchTeamApi(teamId: string | null | undefined, req: NextRequest) id: string name?: string | null logo?: string | null - leader?: string | null // LeaderId + leader?: string | null activePlayers: any[] inactivePlayers: any[] invitedPlayers: any[] @@ -139,7 +154,35 @@ async function fetchTeamApi(teamId: string | null | undefined, req: NextRequest) } } -// Leader bevorzugt aus Match-Relation; Fallback über Team-API (LeaderId -> Player aus Listen) +// Teams-Payload (mit Spielern) zusammenbauen +async function buildTeamsPayload(match: any, req: NextRequest) { + const [teamAApi, teamBApi] = await Promise.all([ + fetchTeamApi(match.teamA?.id, req), + fetchTeamApi(match.teamB?.id, req), + ]) + + const teamAPlayers = (teamAApi?.activePlayers ?? []).map(shapePlayer).filter(Boolean) + const teamBPlayers = (teamBApi?.activePlayers ?? []).map(shapePlayer).filter(Boolean) + + return { + teamA: { + id : match.teamA?.id ?? null, + name : match.teamA?.name ?? null, + logo : match.teamA?.logo ?? null, + leader : resolveLeaderPlayer(match.teamA, teamAApi), + players: teamAPlayers, + }, + teamB: { + id : match.teamB?.id ?? null, + name : match.teamB?.name ?? null, + logo : match.teamB?.logo ?? null, + leader : resolveLeaderPlayer(match.teamB, teamBApi), + players: teamBPlayers, + }, + } +} + +// Leader bevorzugt aus Match-Relation; Fallback über Team-API function resolveLeaderPlayer(matchTeam: any | null | undefined, teamApi: any | null) { const leaderFromMatch = shapeLeader(matchTeam?.leader ?? null) if (leaderFromMatch) return leaderFromMatch @@ -156,13 +199,12 @@ function resolveLeaderPlayer(matchTeam: any | null | undefined, teamApi: any | n return shapePlayer(found) ?? { steamId: leaderId, name: '', avatar: '' } } -async function ensureVeto(matchId: string) { +async function ensureVote(matchId: string) { const match = await prisma.match.findUnique({ where: { id: matchId }, include: { teamA : { include: { - // Leader-Relation als Objekt laden leader: { select: { steamId: true, @@ -189,21 +231,25 @@ async function ensureVeto(matchId: string) { } } }, - mapVeto: { include: { steps: true } }, + mapVote: { include: { steps: true } }, }, }) - if (!match) return { match: null, veto: null } + if (!match) return { match: null, vote: null } // Bereits vorhanden? - if (match.mapVeto) return { match, veto: match.mapVeto } + if (match.mapVote) return { match, vote: match.mapVote } // Neu anlegen const bestOf = match.bestOf ?? 3 - const mapPool = ACTIVE_DUTY - const opensAt = vetoOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) - const stepsDef = buildSteps(bestOf, match.teamA!.id, match.teamB!.id) + const mapPool = MAP_OPTIONS.map(m => m.key) + const opensAt = voteOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) - const created = await prisma.mapVeto.create({ + const firstIsA = (typeof randomInt === 'function') ? randomInt(0, 2) === 0 : Math.random() < 0.5 + const firstTeamId = firstIsA ? match.teamA!.id : match.teamB!.id + const secondTeamId = firstIsA ? match.teamB!.id : match.teamA!.id + const stepsDef = buildSteps(bestOf, firstTeamId, secondTeamId) + + const created = await prisma.mapVote.create({ data: { matchId : match.id, bestOf, @@ -214,7 +260,7 @@ async function ensureVeto(matchId: string) { steps : { create: stepsDef.map(s => ({ order : s.order, - action: s.action as MapVetoAction, + action: s.action as MapVoteAction, teamId: s.teamId, })), }, @@ -222,7 +268,7 @@ async function ensureVeto(matchId: string) { include: { steps: true }, }) - return { match, veto: created } + return { match, vote: created } } function computeAvailableMaps(mapPool: string[], steps: Array<{ map: string | null }>) { @@ -230,32 +276,27 @@ function computeAvailableMaps(mapPool: string[], steps: Array<{ map: string | nu return mapPool.filter(m => !used.has(m)) } -// Teams-Payload (mit Spielern) zusammenbauen -async function buildTeamsPayload(match: any, req: NextRequest) { - const [teamAApi, teamBApi] = await Promise.all([ - fetchTeamApi(match.teamA?.id, req), - fetchTeamApi(match.teamB?.id, req), - ]) +/* ---------- Visuals: deterministisches zufälliges Bild pro Map & Match ---------- */ - const teamAPlayers = (teamAApi?.activePlayers ?? []).map(shapePlayer).filter(Boolean) - const teamBPlayers = (teamBApi?.activePlayers ?? []).map(shapePlayer).filter(Boolean) +function buildMapVisuals(matchId: string, mapPool: string[]) { + const visuals: Record = {} + for (const key of mapPool) { + const opt = MAP_OPTIONS.find(o => o.key === key) + const label = opt?.label ?? key + const imgs = opt?.images ?? [] + let bg = `/assets/img/maps/${key}/1.jpg` - return { - teamA: { - id : match.teamA?.id ?? null, - name : match.teamA?.name ?? null, - logo : match.teamA?.logo ?? null, - leader: resolveLeaderPlayer(match.teamA, teamAApi), - players: teamAPlayers, - }, - teamB: { - id : match.teamB?.id ?? null, - name : match.teamB?.name ?? null, - logo : match.teamB?.logo ?? null, - leader: resolveLeaderPlayer(match.teamB, teamBApi), - players: teamBPlayers, - }, + if (imgs.length > 0) { + // deterministischer Index auf Basis von matchId+key + const h = createHash('sha256').update(`${matchId}:${key}`).digest('hex') + const n = parseInt(h.slice(0, 8), 16) // 32-bit + const idx = n % imgs.length + bg = imgs[idx] + } + + visuals[key] = { label, bg } // images optional mitgeben: { label, bg, images: imgs } } + return visuals } /* -------------------- GET -------------------- */ @@ -265,13 +306,14 @@ export async function GET(req: NextRequest, { params }: { params: { matchId: str const matchId = params.matchId if (!matchId) return NextResponse.json({ message: 'Missing id' }, { status: 400 }) - const { match, veto } = await ensureVeto(matchId) - if (!match || !veto) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + const { match, vote } = await ensureVote(matchId) + if (!match || !vote) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) const teams = await buildTeamsPayload(match, req) + const mapVisuals = buildMapVisuals(match.id, vote.mapPool) return NextResponse.json( - { ...shapeState(veto), teams }, + { ...shapeState(vote), mapVisuals, teams }, { headers: { 'Cache-Control': 'no-store' } }, ) } catch (e) { @@ -290,43 +332,61 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st const matchId = params.matchId if (!matchId) return NextResponse.json({ message: 'Missing id' }, { status: 400 }) - let body: { map?: string } = {} + type ToggleBody = { map?: string; adminEdit?: boolean } + let body: ToggleBody = {} try { body = await req.json() } catch {} try { - const { match, veto } = await ensureVeto(matchId) - if (!match || !veto) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + const { match, vote } = await ensureVote(matchId) + if (!match || !vote) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) - // Öffnungsfenster (1h vor Match-/Demo-Beginn) - const opensAt = veto.opensAt ?? vetoOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) - const isOpen = new Date() >= new Date(opensAt) - if (!isOpen && !me.isAdmin) return NextResponse.json({ message: 'Veto ist noch nicht offen' }, { status: 403 }) + /* -------- Admin-Edit umschalten (früher Exit) -------- */ + if (typeof body.adminEdit === 'boolean') { + if (!me.isAdmin) { + return NextResponse.json({ message: 'Nur Admins dürfen den Edit-Mode setzen' }, { status: 403 }) + } - // Schon abgeschlossen? - if (veto.locked) return NextResponse.json({ message: 'Veto bereits abgeschlossen' }, { status: 409 }) + const updated = await setAdminEdit(vote.id, body.adminEdit ? me.steamId : null) - // Aktuellen Schritt bestimmen - const stepsSorted = [...veto.steps].sort((a: any, b: any) => a.order - b.order) - const current = stepsSorted.find((s: any) => s.order === veto.currentIdx) - - if (!current) { - // Kein Schritt mehr -> Veto abschließen - await prisma.mapVeto.update({ where: { id: veto.id }, data: { locked: true } }) - - const updated = await prisma.mapVeto.findUnique({ - where: { id: veto.id }, - include: { steps: true }, - }) - - // 🔔 Broadcast (flat) await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) const teams = await buildTeamsPayload(match, req) + const mapVisuals = buildMapVisuals(match.id, updated.mapPool) - return NextResponse.json({ ...shapeState(updated), teams }) + return NextResponse.json({ ...shapeState(updated), mapVisuals, teams }) } - const available = computeAvailableMaps(veto.mapPool, stepsSorted) + /* -------- Wenn anderer Admin editiert: Voting sperren -------- */ + if (vote.adminEditingBy && vote.adminEditingBy !== me.steamId) { + return NextResponse.json({ message: 'Admin-Edit aktiv – Voting vorübergehend deaktiviert' }, { status: 423 }) + } + + /* -------- Zeitfenster prüfen (Admins dürfen trotzdem) -------- */ + const opensAt = vote.opensAt ?? voteOpensAt({ matchDate: match.matchDate ?? null, demoDate: match.demoDate ?? null }) + const isOpen = new Date() >= new Date(opensAt) + if (!isOpen && !me.isAdmin) return NextResponse.json({ message: 'Voting ist noch nicht offen' }, { status: 403 }) + + // Schon abgeschlossen? + if (vote.locked) return NextResponse.json({ message: 'Voting bereits abgeschlossen' }, { status: 409 }) + + // Aktuellen Schritt bestimmen + const stepsSorted = [...vote.steps].sort((a: any, b: any) => a.order - b.order) + const current = stepsSorted.find((s: any) => s.order === vote.currentIdx) + + if (!current) { + // Kein Schritt mehr -> Vote abschließen + await prisma.mapVote.update({ where: { id: vote.id }, data: { locked: true } }) + const updated = await prisma.mapVote.findUnique({ where: { id: vote.id }, include: { steps: true } }) + + await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) + + const teams = await buildTeamsPayload(match, req) + const mapVisuals = buildMapVisuals(match.id, updated!.mapPool) + + return NextResponse.json({ ...shapeState(updated), mapVisuals, teams }) + } + + const available = computeAvailableMaps(vote.mapPool, stepsSorted) // DECIDER automatisch setzen, wenn nur noch 1 Map übrig if (current.action === 'DECIDER') { @@ -335,30 +395,30 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st } const lastMap = available[0] await prisma.$transaction(async (tx) => { - await tx.mapVetoStep.update({ + await tx.mapVoteStep.update({ where: { id: current.id }, data : { map: lastMap, chosenAt: new Date(), chosenBy: me.steamId }, }) - await tx.mapVeto.update({ - where: { id: veto.id }, - data : { currentIdx: veto.currentIdx + 1, locked: true }, + await tx.mapVote.update({ + where: { id: vote.id }, + data : { currentIdx: vote.currentIdx + 1, locked: true }, }) }) - const updated = await prisma.mapVeto.findUnique({ - where: { id: veto.id }, + const updated = await prisma.mapVote.findUnique({ + where: { id: vote.id }, include: { steps: true }, }) - // 🔔 Broadcast (flat) await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) const teams = await buildTeamsPayload(match, req) + const mapVisuals = buildMapVisuals(match.id, updated!.mapPool) - return NextResponse.json({ ...shapeState(updated), teams }) + return NextResponse.json({ ...shapeState(updated), mapVisuals, teams }) } - // Rechte prüfen (Admin oder Leader des Teams am Zug) – weiterhin via leaderId + // Rechte prüfen (Admin oder Leader des Teams am Zug) const isLeaderA = !!(match as any).teamA?.leaderId && (match as any).teamA.leaderId === me.steamId const isLeaderB = !!(match as any).teamB?.leaderId && (match as any).teamB.leaderId === me.steamId const allowed = me.isAdmin || (current.teamId && ( @@ -370,20 +430,20 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st // Payload validieren const map = body.map?.trim() if (!map) return NextResponse.json({ message: 'map fehlt' }, { status: 400 }) - if (!veto.mapPool.includes(map)) return NextResponse.json({ message: 'Map nicht im Pool' }, { status: 400 }) + if (!vote.mapPool.includes(map)) return NextResponse.json({ message: 'Map nicht im Pool' }, { status: 400 }) if (!available.includes(map)) return NextResponse.json({ message: 'Map bereits vergeben' }, { status: 409 }) // Schritt setzen & ggf. weiterdrehen (+ Decider evtl. auto) await prisma.$transaction(async (tx) => { // aktuellen Schritt setzen - await tx.mapVetoStep.update({ + await tx.mapVoteStep.update({ where: { id: current.id }, data : { map, chosenAt: new Date(), chosenBy: me.steamId }, }) // neuen Zustand ermitteln - const after = await tx.mapVeto.findUnique({ - where : { id: veto.id }, + const after = await tx.mapVote.findUnique({ + where : { id: vote.id }, include: { steps: true }, }) if (!after) return @@ -397,7 +457,7 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st if (next?.action === 'DECIDER') { const avail = computeAvailableMaps(after.mapPool, stepsAfter) if (avail.length === 1) { - await tx.mapVetoStep.update({ + await tx.mapVoteStep.update({ where: { id: next.id }, data : { map: avail[0], chosenAt: new Date(), chosenBy: me.steamId }, }) @@ -410,23 +470,23 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st const maxOrder = Math.max(...stepsAfter.map(s => s.order)) if (idx > maxOrder) locked = true - await tx.mapVeto.update({ + await tx.mapVote.update({ where: { id: after.id }, data : { currentIdx: idx, locked }, }) }) - const updated = await prisma.mapVeto.findUnique({ - where : { id: veto.id }, + const updated = await prisma.mapVote.findUnique({ + where : { id: vote.id }, include: { steps: true }, }) - // 🔔 Broadcast (flat) await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) const teams = await buildTeamsPayload(match, req) + const mapVisuals = buildMapVisuals(match.id, updated!.mapPool) - return NextResponse.json({ ...shapeState(updated), teams }) + return NextResponse.json({ ...shapeState(updated), mapVisuals, teams }) } catch (e) { console.error('[map-vote][POST] error', e) return NextResponse.json({ message: 'Aktion fehlgeschlagen' }, { status: 500 }) diff --git a/src/app/api/matches/[matchId]/meta/route.ts b/src/app/api/matches/[matchId]/meta/route.ts index 78c7e69..63fb0d3 100644 --- a/src/app/api/matches/[matchId]/meta/route.ts +++ b/src/app/api/matches/[matchId]/meta/route.ts @@ -12,7 +12,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str if (!me?.steamId) return NextResponse.json({ error: 'Unauthorized' }, { status: 403 }) const body = await req.json().catch(() => ({})) - const { title, matchType, teamAId, teamBId, matchDate, map, vetoLeadMinutes } = body ?? {} + const { title, matchType, teamAId, teamBId, matchDate, map, voteLeadMinutes } = body ?? {} try { const match = await prisma.match.findUnique({ @@ -20,7 +20,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str include: { teamA: { include: { leader: true } }, teamB: { include: { leader: true } }, - mapVeto: true, + mapVote: true, }, }) if (!match) return NextResponse.json({ error: 'Match not found' }, { status: 404 }) @@ -42,7 +42,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str updateData.matchDate = matchDate ? new Date(matchDate) : null } - const lead = Number.isFinite(Number(vetoLeadMinutes)) ? Number(vetoLeadMinutes) : 60 + const lead = Number.isFinite(Number(voteLeadMinutes)) ? Number(voteLeadMinutes) : 60 let opensAt: Date | null = null if (updateData.matchDate instanceof Date) { opensAt = new Date(updateData.matchDate.getTime() - lead * 60 * 1000) @@ -54,12 +54,12 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str const m = await tx.match.update({ where: { id }, data: updateData, - include: { mapVeto: true }, + include: { mapVote: true }, }) if (opensAt) { - if (!m.mapVeto) { - await tx.mapVeto.create({ + if (!m.mapVote) { + await tx.mapVote.create({ data: { matchId: m.id, opensAt, @@ -67,8 +67,8 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str }, }) } else { - await tx.mapVeto.update({ - where: { id: m.mapVeto.id }, + await tx.mapVote.update({ + where: { id: m.mapVote.id }, data: { opensAt }, }) } @@ -79,7 +79,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str include: { teamA: { include: { leader: true } }, teamB: { include: { leader: true } }, - mapVeto: true, + mapVote: true, }, }) }) @@ -93,7 +93,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str await sendServerSSEMessage({ type: 'map-vote-updated', - payload: { matchId: updated.id, opensAt: updated.mapVeto?.opensAt ?? null }, + payload: { matchId: updated.id, opensAt: updated.mapVote?.opensAt ?? null }, }) return NextResponse.json({ @@ -104,7 +104,7 @@ export async function PUT(req: NextRequest, { params }: { params: { matchId: str teamBId: updated.teamBId, matchDate: updated.matchDate, map: updated.map, - mapVeto: updated.mapVeto, + mapVote: updated.mapVote, }, { headers: { 'Cache-Control': 'no-store' } }) } catch (err) { console.error(`PUT /matches/${id}/meta failed:`, err) diff --git a/src/app/api/matches/create/route.ts b/src/app/api/matches/create/route.ts index 8521be2..3343a0b 100644 --- a/src/app/api/matches/create/route.ts +++ b/src/app/api/matches/create/route.ts @@ -3,7 +3,7 @@ import { NextRequest, NextResponse } from 'next/server' import { getServerSession } from 'next-auth' import { authOptions } from '@/app/lib/auth' import { prisma } from '@/app/lib/prisma' -import { MapVetoAction } from '@/generated/prisma' +import { MapVoteAction } from '@/generated/prisma' import { sendServerSSEMessage } from '@/app/lib/sse-server-client' export const dynamic = 'force-dynamic' @@ -12,24 +12,24 @@ export const dynamic = 'force-dynamic' function buildSteps(bestOf: number, teamAId: string, teamBId: string) { if (bestOf === 5) { return [ - { order: 0, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 1, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 2, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 3, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 4, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 5, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 6, action: MapVetoAction.PICK, teamId: teamAId }, + { order: 0, action: MapVoteAction.BAN, teamId: teamAId }, + { order: 1, action: MapVoteAction.BAN, teamId: teamBId }, + { order: 2, action: MapVoteAction.PICK, teamId: teamAId }, + { order: 3, action: MapVoteAction.PICK, teamId: teamBId }, + { order: 4, action: MapVoteAction.PICK, teamId: teamAId }, + { order: 5, action: MapVoteAction.PICK, teamId: teamBId }, + { order: 6, action: MapVoteAction.PICK, teamId: teamAId }, ] as const } // default BO3 return [ - { order: 0, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 1, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 2, action: MapVetoAction.PICK, teamId: teamAId }, - { order: 3, action: MapVetoAction.PICK, teamId: teamBId }, - { order: 4, action: MapVetoAction.BAN, teamId: teamAId }, - { order: 5, action: MapVetoAction.BAN, teamId: teamBId }, - { order: 6, action: MapVetoAction.DECIDER, teamId: null }, + { order: 0, action: MapVoteAction.BAN, teamId: teamAId }, + { order: 1, action: MapVoteAction.BAN, teamId: teamBId }, + { order: 2, action: MapVoteAction.PICK, teamId: teamAId }, + { order: 3, action: MapVoteAction.PICK, teamId: teamBId }, + { order: 4, action: MapVoteAction.BAN, teamId: teamAId }, + { order: 5, action: MapVoteAction.BAN, teamId: teamBId }, + { order: 6, action: MapVoteAction.DECIDER, teamId: null }, ] as const } @@ -146,12 +146,12 @@ export async function POST (req: NextRequest) { await tx.matchPlayer.createMany({ data: playersData, skipDuplicates: true }) } - // 6) MapVeto anlegen + // 6) MapVote anlegen const baseDate = newMatch.demoDate ?? plannedAt const opensAt = new Date(baseDate.getTime() - 60 * 60 * 1000) const stepsDef = buildSteps(bestOfInt, teamAId, teamBId) - await tx.mapVeto.create({ + await tx.mapVote.create({ data: { matchId : newMatch.id, bestOf : bestOfInt, diff --git a/src/app/api/matches/route.ts b/src/app/api/matches/route.ts index bbed299..a6591f2 100644 --- a/src/app/api/matches/route.ts +++ b/src/app/api/matches/route.ts @@ -13,7 +13,7 @@ export async function GET(req: Request) { teamA : true, teamB : true, players: { include: { user: true, stats: true, team: true } }, - mapVeto: { include: { steps: true } }, + mapVote: { include: { steps: true } }, }, }) @@ -27,13 +27,13 @@ export async function GET(req: Request) { let totalSteps: number | null = null let opensInMinutes: number | null = null // <-- optional - if (m.mapVeto) { - const stepsSorted = [...m.mapVeto.steps].sort((a, b) => a.order - b.order) + if (m.mapVote) { + const stepsSorted = [...m.mapVote.steps].sort((a, b) => a.order - b.order) const anyChosen = stepsSorted.some(s => !!s.chosenAt) - status = m.mapVeto.locked ? 'completed' : (anyChosen ? 'in_progress' : 'not_started') + status = m.mapVote.locked ? 'completed' : (anyChosen ? 'in_progress' : 'not_started') const computedOpensAt = - m.mapVeto.opensAt ?? + m.mapVote.opensAt ?? (() => { const base = m.matchDate ?? m.demoDate ?? new Date() return new Date(base.getTime() - 60 * 60 * 1000) // 1h vorher @@ -47,8 +47,8 @@ export async function GET(req: Request) { opensInMinutes = Math.max(0, Math.ceil((oa - now) / 60000)) } - currentIndex = m.mapVeto.currentIdx - const cur = stepsSorted.find(s => s.order === m.mapVeto?.currentIdx) + currentIndex = m.mapVote.currentIdx + const cur = stepsSorted.find(s => s.order === m.mapVote?.currentIdx) currentAction = (cur?.action as 'BAN'|'PICK'|'DECIDER') ?? null decidedCount = stepsSorted.filter(s => !!s.chosenAt).length totalSteps = stepsSorted.length @@ -68,7 +68,7 @@ export async function GET(req: Request) { scoreB : m.scoreB, winnerTeam: m.winnerTeam ?? null, - mapVeto: m.mapVeto ? { + mapVote: m.mapVote ? { status, opensAt: opensAtISO, isOpen, diff --git a/src/app/components/Button.tsx b/src/app/components/Button.tsx index deba9ee..5eaa394 100644 --- a/src/app/components/Button.tsx +++ b/src/app/components/Button.tsx @@ -10,9 +10,9 @@ type ButtonProps = { modalId?: string color?: 'blue' | 'red' | 'gray' | 'green' | 'teal' | 'transparent' variant?: 'solid' | 'outline' | 'ghost' | 'soft' | 'white' | 'link' - size?: 'xs' |'sm' | 'md' | 'lg' + size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' className?: string - dropDirection?: "up" | "down" | "auto" + dropDirection?: 'up' | 'down' | 'auto' disabled?: boolean } & ButtonHTMLAttributes @@ -27,10 +27,10 @@ const Button = forwardRef(function Button( variant = 'solid', size = 'md', className, - dropDirection = "down", + dropDirection = 'down', disabled = false, ...rest - }, + }, ref ) { const [open, setOpen] = useState(false) @@ -52,12 +52,14 @@ const Button = forwardRef(function Button( sm: 'py-2 px-3', md: 'py-3 px-4', lg: 'p-4 sm:p-5', + xl: 'py-6 px-8 text-lg', + full: 'py-6 px-8 text-lg w-full', } const base = ` ${sizeClasses[size] || sizeClasses['md']} inline-flex items-center gap-x-2 text-sm font-medium rounded-lg - focus:outline-hidden disabled:opacity-50 disabled:pointer-events-none + focus:outline-hidden disabled:opacity-50 disabled:cursor-not-allowed ` const variants: Record> = { @@ -83,7 +85,7 @@ const Button = forwardRef(function Button( gray: 'border border-transparent text-gray-600 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100 focus:text-gray-800 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-white dark:focus:bg-neutral-700 dark:focus:text-white', teal: 'border border-transparent text-teal-600 hover:bg-teal-100 hover:text-teal-800 focus:bg-teal-100 focus:text-teal-800 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-white dark:focus:bg-neutral-700 dark:focus:text-white', green: 'border border-transparent text-green-600 hover:bg-green-100 hover:text-green-800 focus:bg-green-100 focus:text-green-800 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-white dark:focus:bg-neutral-700 dark:focus:text-white', - transparent: 'border border-transparent text-transparent-600 hover:bg-transparent-100 hover:text-transparent-800 focus:bg-transparent-100 focus:text-transparent-800 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-white dark:focus:bg-neutral-700 dark:focus:text-white', + transparent: 'border border-transparent text-transparent-600 hover:bg-transparent-100 focus:bg-transparent-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-white dark:focus:bg-neutral-700 dark:focus:text-white', }, soft: { blue: 'bg-blue-100 text-blue-800 hover:bg-blue-200 focus:bg-blue-200 dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900', @@ -107,39 +109,50 @@ const Button = forwardRef(function Button( gray: 'border border-transparent text-gray-600 hover:text-gray-800 focus:text-gray-800 dark:text-neutral-400 dark:hover:text-white dark:focus:text-white', teal: 'border border-transparent text-teal-600 hover:text-teal-800 focus:text-teal-800 dark:text-neutral-400 dark:hover:text-white dark:focus:text-white', green: 'border border-transparent text-green-600 hover:text-green-800 focus:text-green-800 dark:text-neutral-400 dark:hover:text-white dark:focus:text-white', - transparent: 'border border-transparent text-transparent-600 hover:text-transparent-800 focus:text-transparent-800 dark:text-neutral-400 dark:hover:text-white dark:focus:text-white' + transparent: 'border border-transparent text-transparent-600 hover:text-transparent-800 focus:text-transparent-800 dark:text-neutral-400 dark:hover:text-white dark:focus:text-white', }, } + const variantClasses = variants[variant]?.[color] || variants.solid.blue + + // Entfernt alle Hover/Focus/Active Tokens (inkl. dark:hover:..., sm:focus:..., etc.) + const stripInteractive = (cls: string) => + cls + .split(/\s+/) + .filter(c => c && !c.includes('hover:') && !c.includes('focus:') && !c.includes('active:')) + .join(' ') + + const safeVariantClasses = disabled ? stripInteractive(variantClasses) : variantClasses + const classes = ` ${base} - ${variants[variant]?.[color] || variants.solid.blue} + ${safeVariantClasses} ${className || ''} ` useEffect(() => { - if (open && dropDirection === "auto" && buttonRef.current) { + if (open && dropDirection === 'auto' && buttonRef.current) { requestAnimationFrame(() => { - const rect = buttonRef.current!.getBoundingClientRect(); - const dropdownHeight = 200; - const spaceBelow = window.innerHeight - rect.bottom; - const spaceAbove = rect.top; - + const rect = buttonRef.current!.getBoundingClientRect() + const dropdownHeight = 200 + const spaceBelow = window.innerHeight - rect.bottom + const spaceAbove = rect.top + if (spaceBelow < dropdownHeight && spaceAbove > dropdownHeight) { - setDirection("up"); + setDirection('up') } else { - setDirection("down"); + setDirection('down') } - }); + }) } - }, [open, dropDirection]); + }, [open, dropDirection]) const toggle = (event: React.MouseEvent) => { const next = !open setOpen(next) onToggle?.(next) onClick?.(event) -} + } return ( + + + {/* Mittlere Spalte (zentriert) */} +

Voting

+ + {/* Rechte Spalte */} +
Modus: BO{match.bestOf ?? state?.bestOf ?? 3}
+ {isAdmin && ( - + + + )}
{/* Countdown / Status */} - {!isOpen && ( -
- - Öffnet in {formatCountdown(msToOpen)} - -
- )} - - {/* Countdown / Status ganz oben und größer */} -
+
{state?.locked ? ( - ✅ Veto abgeschlossen + ✅ Voting abgeschlossen ) : isOpen ? ( - isMyTurn ? ( + isFrozenByAdmin ? ( + + 🔒 Admin-Edit aktiv – Voting pausiert + {editingDisplayName ? ` (von ${editingDisplayName})` : ''} + + ) : isMyTurn ? ( - ✋ Halte gedrückt, um zu bestätigen + {currentStep?.action === 'ban' + ? '🚫 Dein Team darf bannen' + : currentStep?.action === 'pick' + ? '✅ Dein Team darf picken' + : 'Du bist dran'} ) : ( ⏳ Wartet auf  - {currentStep?.teamId === match.teamA?.id ? match.teamA.name : match.teamB.name} -  (Leader/Admin) + {currentStep?.teamId === match.teamA?.id + ? match.teamA.name + : match.teamB.name} ) ) : ( @@ -402,17 +498,33 @@ export default function MapVetoPanel({ match }: Props) { )} {error && ( - + {error} )}
- + {/* Hauptbereich */} {state && ( -
- {/* Links – Team A */} - +
- {/* Mitte – Maps (Hold-to-confirm) */} -
-
    - {mapPool.map((map) => { + {/* Mitte – Mappool */} +
    +
      + {sortedMapPool.map((map) => { const decision = decisionByMap.get(map) const status = decision?.action ?? null // 'ban' | 'pick' | 'decider' | null const teamId = decision?.teamId ?? null @@ -449,28 +562,13 @@ export default function MapVetoPanel({ match }: Props) { const intent = isAvailable ? currentStep?.action : null const intentStyles = intent === 'ban' - ? { - ring: '', - border: '', - hover: 'hover:bg-red-50 dark:hover:bg-red-950', - progress: 'bg-red-200/60 dark:bg-red-800/40', - } + ? { hover: 'hover:bg-red-50 dark:hover:bg-red-950', progress: 'bg-red-200/60 dark:bg-red-800/40' } : intent === 'pick' - ? { - ring: '', - border: '', - hover: 'hover:bg-green-50 dark:hover:bg-green-950', - progress: 'bg-green-200/60 dark:bg-green-800/40', - } - : { - ring: '', - border: '', - hover: 'hover:bg-blue-50 dark:hover:bg-blue-950', - progress: 'bg-blue-200/60 dark:bg-blue-800/40', - } + ? { hover: 'hover:bg-green-50 dark:hover:bg-green-950', progress: 'bg-green-200/60 dark:bg-green-800/40' } + : { hover: 'hover:bg-blue-50 dark:hover:bg-blue-950', progress: 'bg-blue-200/60 dark:bg-blue-800/40' } const baseClasses = - 'relative flex items-center justify-between gap-2 rounded-md border p-2.5 transition select-none' + 'relative flex items-center justify-between gap-2 rounded-md border border-neutral-500 p-2.5 transition select-none' const visualTaken = status === 'ban' @@ -479,8 +577,8 @@ export default function MapVetoPanel({ match }: Props) { ? 'bg-blue-50/60 dark:bg-blue-900/20 border-blue-200 dark:border-blue-900/40' : 'bg-neutral-100 dark:bg-neutral-800 border-neutral-300 dark:border-neutral-700' - const visualAvailable = `bg-white dark:bg-neutral-900 ${intentStyles.border} ring-1 ${intentStyles.ring} ${intentStyles.hover} cursor-pointer` - const visualDisabled = 'bg-white dark:bg-neutral-900 border-neutral-300 dark:border-neutral-700' + const visualAvailable = `bg-white dark:bg-neutral-900 ${intentStyles.hover} cursor-pointer` + const visualDisabled = `bg-white dark:bg-neutral-900 border-neutral-300 dark:border-neutral-700 cursor-not-allowed ${isFrozenByAdmin ? 'opacity-60' : ''}` const visualClasses = taken ? visualTaken : isAvailable ? visualAvailable : visualDisabled // Decider-Team bestimmen (falls nötig) @@ -497,26 +595,44 @@ export default function MapVetoPanel({ match }: Props) { const progress = progressByMap[map] ?? 0 const showProgress = isAvailable && progress > 0 && progress < 1 + const bg = state?.mapVisuals?.[map]?.bg ?? `/assets/img/maps/${map}/1.jpg` + + const disabledTitle = isFrozenByAdmin + ? 'Ein Admin bearbeitet gerade – Voting gesperrt' + : 'Nur der Team-Leader (oder Admin) darf wählen' + return (
    • {/* linker Slot */} {pickedByA ? ( {match.teamA?.name ) : ( -
      +
      )} {/* Button */}
    • ) @@ -581,8 +778,24 @@ export default function MapVetoPanel({ match }: Props) {
    - {/* Rechts – Team B */} - +
)} diff --git a/src/app/components/MapVetoProfileCard.tsx b/src/app/components/MapVoteProfileCard.tsx similarity index 58% rename from src/app/components/MapVetoProfileCard.tsx rename to src/app/components/MapVoteProfileCard.tsx index a200d10..b121656 100644 --- a/src/app/components/MapVetoProfileCard.tsx +++ b/src/app/components/MapVoteProfileCard.tsx @@ -5,22 +5,21 @@ import PremierRankBadge from './PremierRankBadge' type Side = 'A' | 'B' type Props = { - side: Side // 'A' = linke Spalte, 'B' = rechte Spalte + side: Side name: string avatar?: string | null - rank?: number // Zahl aus deinen Stats + rank?: number matchType?: 'premier' | 'competitive' | string isLeader?: boolean - isActiveTurn?: boolean // pulsiert, wenn dieses Team am Zug ist - onClick?: () => void // optional + isActiveTurn?: boolean + onClick?: () => void } -export default function MapVetoProfileCard({ +export default function MapVoteProfileCard({ side, name, avatar, rank = 0, - matchType = 'premier', isLeader = false, isActiveTurn = false, onClick, @@ -32,20 +31,24 @@ export default function MapVetoProfileCard({ type="button" onClick={onClick} className={[ - 'group relative w-full', + 'group relative w-full rounded-xl shadow-md', isRight ? 'ml-auto text-right' : 'mr-auto text-left', - ].join(' ')} + ] + .filter(Boolean) + .join(' ')} title={isLeader ? `${name} (Leader)` : name} >
{/* Avatar */}
@@ -64,24 +67,29 @@ export default function MapVetoProfileCard({ ].join(' ')} title="Team-Leader" > - {/* Stern-Icon */} - - + + )}
- {/* Text + Rank */} -
-
- - {name} - - - - -
+ {/* Name + Status */} +
+ + {name} + {isActiveTurn ? ( am Zug … @@ -92,6 +100,9 @@ export default function MapVetoProfileCard({ )}
+ + {/* PremierRank ganz außen */} +
) diff --git a/src/app/components/MatchDetails.tsx b/src/app/components/MatchDetails.tsx index 8bf37a8..67ba1df 100644 --- a/src/app/components/MatchDetails.tsx +++ b/src/app/components/MatchDetails.tsx @@ -22,7 +22,7 @@ import type { EditSide } from './EditMatchPlayersModal' import type { Match, MatchPlayer } from '../types/match' import Button from './Button' import { MAP_OPTIONS } from '../lib/mapOptions' -import MapVetoBanner from './MapVetoBanner' +import MapVoteBanner from './MapVoteBanner' import { useSSEStore } from '@/app/lib/useSSEStore' import { Team } from '../types/team' import Alert from './Alert' @@ -71,7 +71,7 @@ export function MatchDetails({ match, initialNow }: { match: Match; initialNow: const mapKey = normalizeMapKey(match.map) const mapLabel = MAP_OPTIONS.find(opt => opt.key === mapKey)?.label ?? - MAP_OPTIONS.find(opt => opt.key === 'lobby_mapveto')?.label ?? + MAP_OPTIONS.find(opt => opt.key === 'lobby_mapvote')?.label ?? 'Unbekannte Map' /* ─── Match-Zeitpunkt ─────────────────────────────────────── */ @@ -81,24 +81,24 @@ export function MatchDetails({ match, initialNow }: { match: Match; initialNow: /* ─── Modal-State: null = geschlossen, 'A' / 'B' = offen ─── */ const [editSide, setEditSide] = useState(null) - /* ─── Live-Uhr (für Veto-Zeitpunkt) ───────────────────────── */ + /* ─── Live-Uhr (für vote-Zeitpunkt) ───────────────────────── */ useEffect(() => { const id = setInterval(() => setNow(Date.now()), 1000) return () => clearInterval(id) }, []) - const vetoOpensAtTs = useMemo(() => { - const base = match.mapVeto?.opensAt - ? new Date(match.mapVeto.opensAt).getTime() + const voteOpensAtTs = useMemo(() => { + const base = match.mapVote?.opensAt + ? new Date(match.mapVote.opensAt).getTime() : new Date(match.matchDate ?? match.demoDate ?? initialNow).getTime() - 60 * 60 * 1000 return base - }, [match.mapVeto?.opensAt, match.matchDate, match.demoDate, initialNow]) + }, [match.mapVote?.opensAt, match.matchDate, match.demoDate, initialNow]) - const endDate = new Date(vetoOpensAtTs) - const mapVetoStarted = (match.mapVeto?.isOpen ?? false) || now >= vetoOpensAtTs + const endDate = new Date(voteOpensAtTs) + const mapvoteStarted = (match.mapVote?.isOpen ?? false) || now >= voteOpensAtTs - const showEditA = canEditA && !mapVetoStarted - const showEditB = canEditB && !mapVetoStarted + const showEditA = canEditA && !mapvoteStarted + const showEditB = canEditB && !mapvoteStarted /* ─── SSE-Listener ─────────────────────────────────────────── */ useEffect(() => { @@ -271,7 +271,7 @@ export function MatchDetails({ match, initialNow }: { match: Match; initialNow: Score: {match.scoreA ?? 0}:{match.scoreB ?? 0}
- + {/* ───────── Team-Blöcke ───────── */}
@@ -369,7 +369,7 @@ export function MatchDetails({ match, initialNow }: { match: Match; initialNow: defaultTeamBName={match.teamB?.name ?? null} defaultDateISO={match.matchDate ?? match.demoDate ?? null} defaultMap={match.map ?? null} - defaultVetoLeadMinutes={60} + defaultVoteLeadMinutes={60} onSaved={() => { router.refresh() }} /> )} diff --git a/src/app/components/TeamCard.tsx b/src/app/components/TeamCard.tsx index 7edf2dc..5711ae3 100644 --- a/src/app/components/TeamCard.tsx +++ b/src/app/components/TeamCard.tsx @@ -25,7 +25,7 @@ export default function TeamCard({ const [joining, setJoining] = useState(false) const isRequested = Boolean(invitationId) - const isDisabled = joining || currentUserSteamId === team.leader + const isDisabled = joining || currentUserSteamId === team.leader?.steamId const handleClick = async () => { if (joining) return diff --git a/src/app/components/profile/[steamId]/matches/UserMatchesList.tsx b/src/app/components/profile/[steamId]/matches/UserMatchesList.tsx index 3eea1e1..a4bd02f 100644 --- a/src/app/components/profile/[steamId]/matches/UserMatchesList.tsx +++ b/src/app/components/profile/[steamId]/matches/UserMatchesList.tsx @@ -200,7 +200,7 @@ export default function UserMatchesList({ steamId }: { steamId: string }) { {matches.map(m => { const mapInfo = MAP_OPTIONS.find(opt => opt.key === m.map) ?? - MAP_OPTIONS.find(opt => opt.key === 'lobby_mapveto') + MAP_OPTIONS.find(opt => opt.key === 'lobby_mapvote') const [scoreCT, scoreT] = parseScore(m.score) const ownCTSide = m.team !== 'T' diff --git a/src/app/lib/mapOptions.ts b/src/app/lib/mapOptions.ts index 67e20f4..402adf1 100644 --- a/src/app/lib/mapOptions.ts +++ b/src/app/lib/mapOptions.ts @@ -1,25 +1,73 @@ // src/lib/mapOptions.ts -export type MapOption = { key: string; label: string } +export type MapOption = { + key: string + label: string + images: string[] +} export const MAP_OPTIONS: MapOption[] = [ - { key: 'de_train', label: 'Train' }, - { key: 'ar_baggage', label: 'Baggage' }, - { key: 'ar_pool_day', label: 'Pool Day' }, - { key: 'ar_shoots', label: 'Shoots' }, - { key: 'cs_agency', label: 'Agency' }, - { key: 'cs_italy', label: 'Italy' }, - { key: 'cs_office', label: 'Office' }, - { key: 'de_ancient', label: 'Ancient' }, - { key: 'de_anubis', label: 'Anubis' }, - { key: 'de_brewery', label: 'Brewery' }, - { key: 'de_dogtown', label: 'Dogtown' }, - { key: 'de_dust2', label: 'Dust 2' }, - { key: 'de_grail', label: 'Grail' }, - { key: 'de_inferno', label: 'Inferno' }, - { key: 'de_jura', label: 'Jura' }, - { key: 'de_mirage', label: 'Mirage' }, - { key: 'de_nuke', label: 'Nuke' }, - { key: 'de_overpass', label: 'Overpass' }, - { key: 'de_vertigo', label: 'Vertigo' }, - { key: 'lobby_mapveto', label: 'Pick/Ban' }, + { + key: 'de_train', + label: 'Train', + images: [ + '/assets/img/maps/de_train/1.jpg', + '/assets/img/maps/de_train/2.jpg', + ], + }, + { + key: 'de_dust2', + label: 'Dust 2', + images: [ + '/assets/img/maps/de_dust2/1.jpg', + '/assets/img/maps/de_dust2/2.jpg', + ], + }, + { + key: 'de_mirage', + label: 'Mirage', + images: [ + '/assets/img/maps/de_mirage/1.jpg', + '/assets/img/maps/de_mirage/2.jpg', + ], + }, + { + key: 'de_nuke', + label: 'Nuke', + images: [ + '/assets/img/maps/de_nuke/1.jpg', + '/assets/img/maps/de_nuke/2.jpg', + ], + }, + { + key: 'de_ancient', + label: 'Ancient', + images: [ + '/assets/img/maps/de_ancient/1.jpg', + '/assets/img/maps/de_ancient/2.jpg', + ], + }, + { + key: 'de_inferno', + label: 'Inferno', + images: [ + '/assets/img/maps/de_inferno/1.jpg', + '/assets/img/maps/de_inferno/2.jpg', + ], + }, + { + key: 'de_overpass', + label: 'Overpass', + images: [ + '/assets/img/maps/de_overpass/1.jpg', + '/assets/img/maps/de_overpass/2.jpg', + ], + }, + { + key: 'lobby_mapvote', + label: 'Pick/Ban', + images: [ + '/assets/img/maps/lobby_mapvote/1.jpg', + '/assets/img/maps/lobby_mapvote/2.jpg', + ], + }, ] diff --git a/src/app/lib/sseEvents.ts b/src/app/lib/sseEvents.ts index 4bb8db7..4a53dcb 100644 --- a/src/app/lib/sseEvents.ts +++ b/src/app/lib/sseEvents.ts @@ -20,12 +20,11 @@ export const SSE_EVENT_TYPES = [ 'expired-sharecode', 'team-invite-revoked', 'map-vote-updated', + 'map-vote-admin-edit', 'match-created', 'matches-updated', 'match-deleted', 'match-updated', - - // ➕ neu: gezieltes Event, wenn sich die Aufstellung ändert 'match-lineup-updated', ] as const; @@ -67,6 +66,8 @@ export const MATCH_EVENTS: ReadonlySet = new Set([ 'match-deleted', 'match-lineup-updated', 'match-updated', + 'map-vote-updated', + 'map-vote-admin-edit', ]); // Event-Typen, die das NotificationCenter betreffen diff --git a/src/app/match-details/[matchId]/vote/VoteClient.tsx b/src/app/match-details/[matchId]/vote/VoteClient.tsx index 111525d..96c19ed 100644 --- a/src/app/match-details/[matchId]/vote/VoteClient.tsx +++ b/src/app/match-details/[matchId]/vote/VoteClient.tsx @@ -1,10 +1,10 @@ // app/match-details/[matchId]/vote/VoteClient.tsx 'use client' -import MapVetoPanel from '@/app/components/MapVetoPanel' +import MapVotePanel from '@/app/components/MapVotePanel' import { useMatch } from '../MatchContext' // aus dem Layout-Context export default function VoteClient() { const match = useMatch() - return + return } diff --git a/src/app/types/mapveto.ts b/src/app/types/mapveto.ts deleted file mode 100644 index af0eb6e..0000000 --- a/src/app/types/mapveto.ts +++ /dev/null @@ -1,32 +0,0 @@ -// /types/mapveto.ts -import type { Player } from './team' - -export type MapVetoStep = { - order: number - action: 'ban'|'pick'|'decider' - teamId: string | null - map: string | null - chosenAt: string | null - chosenBy: string | null -} - -export type MapVetoTeam = { - id: string | null - name?: string | null - logo?: string | null - leader: Player | null - players: Player[] -} - -export type MapVetoState = { - bestOf: number - mapPool: string[] - currentIndex: number - locked: boolean - opensAt: string | null - steps: MapVetoStep[] - teams?: { - teamA: MapVetoTeam - teamB: MapVetoTeam - } -} \ No newline at end of file diff --git a/src/app/types/mapvote.ts b/src/app/types/mapvote.ts new file mode 100644 index 0000000..8a6af14 --- /dev/null +++ b/src/app/types/mapvote.ts @@ -0,0 +1,50 @@ +// /types/mapvote.ts +import type { Player } from './team' + +export type MapVoteStep = { + order: number + action: 'ban'|'pick'|'decider' + teamId: string | null + map: string | null + chosenAt: string | null + chosenBy: string | null +} + +export type MapVoteTeam = { + id: string | null + name?: string | null + logo?: string | null + leader: Player | null + players: Player[] +} + +export type MapVoteMapVisual = { + /** Menschlicher Name aus MAP_OPTIONS */ + label: string + /** Vom Server vorab ausgewähltes Hintergrundbild für diese Map (stabil pro Match) */ + bg: string + /** Optional: alle verfügbaren Bilder (falls du sie im FE brauchst) */ + images?: string[] +} + +// ⬅️ NEU: Admin-Edit-Metadaten (für globalen Freeze) +export type MapVoteAdminEdit = { + enabled: boolean + by: string | null // steamId des Admins + since: string | null // ISO-String +} + +export type MapVoteState = { + bestOf: number + mapPool: string[] + mapVisuals: Record + currentIndex: number + locked: boolean + opensAt: string | null + steps: MapVoteStep[] + teams?: { + teamA: MapVoteTeam + teamB: MapVoteTeam + } + adminEdit?: MapVoteAdminEdit // ⬅️ NEU +} \ No newline at end of file diff --git a/src/app/types/match.ts b/src/app/types/match.ts index fe74963..8f53b22 100644 --- a/src/app/types/match.ts +++ b/src/app/types/match.ts @@ -21,7 +21,7 @@ export type Match = { teamA: Team teamB: Team - mapVeto?: { + mapVote?: { status: 'not_started' | 'in_progress' | 'completed' | null opensAt: string | null isOpen: boolean | null diff --git a/src/generated/prisma/edge.js b/src/generated/prisma/edge.js index 6d3e538..fda550f 100644 --- a/src/generated/prisma/edge.js +++ b/src/generated/prisma/edge.js @@ -35,12 +35,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd + * Prisma Client JS version: 6.14.0 + * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 */ Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" + client: "6.14.0", + engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -248,7 +248,7 @@ exports.Prisma.ServerRequestScalarFieldEnum = { createdAt: 'createdAt' }; -exports.Prisma.MapVetoScalarFieldEnum = { +exports.Prisma.MapVoteScalarFieldEnum = { id: 'id', matchId: 'matchId', bestOf: 'bestOf', @@ -256,13 +256,15 @@ exports.Prisma.MapVetoScalarFieldEnum = { currentIdx: 'currentIdx', locked: 'locked', opensAt: 'opensAt', + adminEditingBy: 'adminEditingBy', + adminEditingSince: 'adminEditingSince', createdAt: 'createdAt', updatedAt: 'updatedAt' }; -exports.Prisma.MapVetoStepScalarFieldEnum = { +exports.Prisma.MapVoteStepScalarFieldEnum = { id: 'id', - vetoId: 'vetoId', + voteId: 'voteId', order: 'order', action: 'action', teamId: 'teamId', @@ -304,7 +306,7 @@ exports.ScheduleStatus = exports.$Enums.ScheduleStatus = { COMPLETED: 'COMPLETED' }; -exports.MapVetoAction = exports.$Enums.MapVetoAction = { +exports.MapVoteAction = exports.$Enums.MapVoteAction = { BAN: 'BAN', PICK: 'PICK', DECIDER: 'DECIDER' @@ -322,8 +324,8 @@ exports.Prisma.ModelName = { Schedule: 'Schedule', DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', - MapVeto: 'MapVeto', - MapVetoStep: 'MapVetoStep' + MapVote: 'MapVote', + MapVoteStep: 'MapVoteStep' }; /** * Create the Client @@ -336,7 +338,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "C:\\Users\\Chris\\fork\\ironie-nextjs\\src\\generated\\prisma", + "value": "C:\\Users\\Rother\\fork\\ironie-nextjs\\src\\generated\\prisma", "fromEnvVar": null }, "config": { @@ -350,7 +352,7 @@ const config = { } ], "previewFeatures": [], - "sourceFilePath": "C:\\Users\\Chris\\fork\\ironie-nextjs\\prisma\\schema.prisma", + "sourceFilePath": "C:\\Users\\Rother\\fork\\ironie-nextjs\\prisma\\schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -358,13 +360,12 @@ const config = { "schemaEnvPath": "../../../.env" }, "relativePath": "../../../prisma", - "clientVersion": "6.13.0", - "engineVersion": "361e86d0ea4987e9f53a565309b3eed797a6bcbd", + "clientVersion": "6.14.0", + "engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49", "datasourceNames": [ "db" ], "activeProvider": "postgresql", - "postinstall": false, "inlineDatasources": { "db": { "url": { @@ -373,13 +374,13 @@ const config = { } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVetoChoices MapVetoStep[] @relation(\"VetoStepChooser\")\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVetoSteps MapVetoStep[] @relation(\"VetoStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVeto MapVeto? // 1:1 Map-Vote-Status\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVetoAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVeto {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n // Basiszustand\n bestOf Int @default(3)\n mapPool String[] // z.B. [\"de_inferno\",\"de_mirage\",...]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n\n // Optional: serverseitig speichern, statt im UI zu berechnen\n opensAt DateTime?\n\n steps MapVetoStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVetoStep {\n id String @id @default(uuid())\n vetoId String\n order Int\n action MapVetoAction\n\n // Team, das am Zug ist (kann bei DECIDER null sein)\n teamId String?\n team Team? @relation(\"VetoStepTeam\", fields: [teamId], references: [id])\n\n // Ergebnis & wer gewählt hat\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VetoStepChooser\", fields: [chosenBy], references: [steamId])\n\n veto MapVeto @relation(fields: [vetoId], references: [id])\n\n @@unique([vetoId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", - "inlineSchemaHash": "ab45ee8d931acf77b08baacd1dff66a5afff9bab089d755c2341727c18cad5ee", + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", + "inlineSchemaHash": "6a3173f8873b8732ce0374e908c46c28a2f778a9616d63160597fb24c88535e2", "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVetoChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"VetoStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVetoSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"VetoStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVeto\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVeto\",\"nativeType\":null,\"relationName\":\"MapVetoToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVeto\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVetoToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"MapVetoToMapVetoStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVetoStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vetoId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VetoStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VetoStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"veto\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVeto\",\"nativeType\":null,\"relationName\":\"MapVetoToMapVetoStep\",\"relationFromFields\":[\"vetoId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"vetoId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"vetoId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVetoAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/src/generated/prisma/index-browser.js b/src/generated/prisma/index-browser.js index 5a89a34..39bc898 100644 --- a/src/generated/prisma/index-browser.js +++ b/src/generated/prisma/index-browser.js @@ -20,12 +20,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd + * Prisma Client JS version: 6.14.0 + * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 */ Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" + client: "6.14.0", + engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" } Prisma.PrismaClientKnownRequestError = () => { @@ -276,7 +276,7 @@ exports.Prisma.ServerRequestScalarFieldEnum = { createdAt: 'createdAt' }; -exports.Prisma.MapVetoScalarFieldEnum = { +exports.Prisma.MapVoteScalarFieldEnum = { id: 'id', matchId: 'matchId', bestOf: 'bestOf', @@ -284,13 +284,15 @@ exports.Prisma.MapVetoScalarFieldEnum = { currentIdx: 'currentIdx', locked: 'locked', opensAt: 'opensAt', + adminEditingBy: 'adminEditingBy', + adminEditingSince: 'adminEditingSince', createdAt: 'createdAt', updatedAt: 'updatedAt' }; -exports.Prisma.MapVetoStepScalarFieldEnum = { +exports.Prisma.MapVoteStepScalarFieldEnum = { id: 'id', - vetoId: 'vetoId', + voteId: 'voteId', order: 'order', action: 'action', teamId: 'teamId', @@ -332,7 +334,7 @@ exports.ScheduleStatus = exports.$Enums.ScheduleStatus = { COMPLETED: 'COMPLETED' }; -exports.MapVetoAction = exports.$Enums.MapVetoAction = { +exports.MapVoteAction = exports.$Enums.MapVoteAction = { BAN: 'BAN', PICK: 'PICK', DECIDER: 'DECIDER' @@ -350,8 +352,8 @@ exports.Prisma.ModelName = { Schedule: 'Schedule', DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', - MapVeto: 'MapVeto', - MapVetoStep: 'MapVetoStep' + MapVote: 'MapVote', + MapVoteStep: 'MapVoteStep' }; /** diff --git a/src/generated/prisma/index.d.ts b/src/generated/prisma/index.d.ts index 39cfb43..d7c4ff7 100644 --- a/src/generated/prisma/index.d.ts +++ b/src/generated/prisma/index.d.ts @@ -69,15 +69,15 @@ export type DemoFile = $Result.DefaultSelection */ export type ServerRequest = $Result.DefaultSelection /** - * Model MapVeto + * Model MapVote * */ -export type MapVeto = $Result.DefaultSelection +export type MapVote = $Result.DefaultSelection /** - * Model MapVetoStep + * Model MapVoteStep * */ -export type MapVetoStep = $Result.DefaultSelection +export type MapVoteStep = $Result.DefaultSelection /** * Enums @@ -94,13 +94,13 @@ export namespace $Enums { export type ScheduleStatus = (typeof ScheduleStatus)[keyof typeof ScheduleStatus] -export const MapVetoAction: { +export const MapVoteAction: { BAN: 'BAN', PICK: 'PICK', DECIDER: 'DECIDER' }; -export type MapVetoAction = (typeof MapVetoAction)[keyof typeof MapVetoAction] +export type MapVoteAction = (typeof MapVoteAction)[keyof typeof MapVoteAction] } @@ -108,9 +108,9 @@ export type ScheduleStatus = $Enums.ScheduleStatus export const ScheduleStatus: typeof $Enums.ScheduleStatus -export type MapVetoAction = $Enums.MapVetoAction +export type MapVoteAction = $Enums.MapVoteAction -export const MapVetoAction: typeof $Enums.MapVetoAction +export const MapVoteAction: typeof $Enums.MapVoteAction /** * ## Prisma Client ʲˢ @@ -161,13 +161,6 @@ export class PrismaClient< */ $disconnect(): $Utils.JsPromise; - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - /** * Executes a prepared raw query and returns the number of affected rows. * @example @@ -348,24 +341,24 @@ export class PrismaClient< get serverRequest(): Prisma.ServerRequestDelegate; /** - * `prisma.mapVeto`: Exposes CRUD operations for the **MapVeto** model. + * `prisma.mapVote`: Exposes CRUD operations for the **MapVote** model. * Example usage: * ```ts - * // Fetch zero or more MapVetos - * const mapVetos = await prisma.mapVeto.findMany() + * // Fetch zero or more MapVotes + * const mapVotes = await prisma.mapVote.findMany() * ``` */ - get mapVeto(): Prisma.MapVetoDelegate; + get mapVote(): Prisma.MapVoteDelegate; /** - * `prisma.mapVetoStep`: Exposes CRUD operations for the **MapVetoStep** model. + * `prisma.mapVoteStep`: Exposes CRUD operations for the **MapVoteStep** model. * Example usage: * ```ts - * // Fetch zero or more MapVetoSteps - * const mapVetoSteps = await prisma.mapVetoStep.findMany() + * // Fetch zero or more MapVoteSteps + * const mapVoteSteps = await prisma.mapVoteStep.findMany() * ``` */ - get mapVetoStep(): Prisma.MapVetoStepDelegate; + get mapVoteStep(): Prisma.MapVoteStepDelegate; } export namespace Prisma { @@ -424,8 +417,8 @@ export namespace Prisma { export import Exact = $Public.Exact /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd + * Prisma Client JS version: 6.14.0 + * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 */ export type PrismaVersion = { client: string @@ -817,8 +810,8 @@ export namespace Prisma { Schedule: 'Schedule', DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', - MapVeto: 'MapVeto', - MapVetoStep: 'MapVetoStep' + MapVote: 'MapVote', + MapVoteStep: 'MapVoteStep' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -837,7 +830,7 @@ export namespace Prisma { omit: GlobalOmitOptions } meta: { - modelProps: "user" | "team" | "teamInvite" | "notification" | "match" | "matchPlayer" | "playerStats" | "rankHistory" | "schedule" | "demoFile" | "serverRequest" | "mapVeto" | "mapVetoStep" + modelProps: "user" | "team" | "teamInvite" | "notification" | "match" | "matchPlayer" | "playerStats" | "rankHistory" | "schedule" | "demoFile" | "serverRequest" | "mapVote" | "mapVoteStep" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { @@ -1655,151 +1648,151 @@ export namespace Prisma { } } } - MapVeto: { - payload: Prisma.$MapVetoPayload - fields: Prisma.MapVetoFieldRefs + MapVote: { + payload: Prisma.$MapVotePayload + fields: Prisma.MapVoteFieldRefs operations: { findUnique: { - args: Prisma.MapVetoFindUniqueArgs - result: $Utils.PayloadToResult | null + args: Prisma.MapVoteFindUniqueArgs + result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.MapVetoFindUniqueOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteFindUniqueOrThrowArgs + result: $Utils.PayloadToResult } findFirst: { - args: Prisma.MapVetoFindFirstArgs - result: $Utils.PayloadToResult | null + args: Prisma.MapVoteFindFirstArgs + result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.MapVetoFindFirstOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteFindFirstOrThrowArgs + result: $Utils.PayloadToResult } findMany: { - args: Prisma.MapVetoFindManyArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteFindManyArgs + result: $Utils.PayloadToResult[] } create: { - args: Prisma.MapVetoCreateArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteCreateArgs + result: $Utils.PayloadToResult } createMany: { - args: Prisma.MapVetoCreateManyArgs + args: Prisma.MapVoteCreateManyArgs result: BatchPayload } createManyAndReturn: { - args: Prisma.MapVetoCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.MapVetoDeleteArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteDeleteArgs + result: $Utils.PayloadToResult } update: { - args: Prisma.MapVetoUpdateArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteUpdateArgs + result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.MapVetoDeleteManyArgs + args: Prisma.MapVoteDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.MapVetoUpdateManyArgs + args: Prisma.MapVoteUpdateManyArgs result: BatchPayload } updateManyAndReturn: { - args: Prisma.MapVetoUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] } upsert: { - args: Prisma.MapVetoUpsertArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteUpsertArgs + result: $Utils.PayloadToResult } aggregate: { - args: Prisma.MapVetoAggregateArgs - result: $Utils.Optional + args: Prisma.MapVoteAggregateArgs + result: $Utils.Optional } groupBy: { - args: Prisma.MapVetoGroupByArgs - result: $Utils.Optional[] + args: Prisma.MapVoteGroupByArgs + result: $Utils.Optional[] } count: { - args: Prisma.MapVetoCountArgs - result: $Utils.Optional | number + args: Prisma.MapVoteCountArgs + result: $Utils.Optional | number } } } - MapVetoStep: { - payload: Prisma.$MapVetoStepPayload - fields: Prisma.MapVetoStepFieldRefs + MapVoteStep: { + payload: Prisma.$MapVoteStepPayload + fields: Prisma.MapVoteStepFieldRefs operations: { findUnique: { - args: Prisma.MapVetoStepFindUniqueArgs - result: $Utils.PayloadToResult | null + args: Prisma.MapVoteStepFindUniqueArgs + result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.MapVetoStepFindUniqueOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepFindUniqueOrThrowArgs + result: $Utils.PayloadToResult } findFirst: { - args: Prisma.MapVetoStepFindFirstArgs - result: $Utils.PayloadToResult | null + args: Prisma.MapVoteStepFindFirstArgs + result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.MapVetoStepFindFirstOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepFindFirstOrThrowArgs + result: $Utils.PayloadToResult } findMany: { - args: Prisma.MapVetoStepFindManyArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteStepFindManyArgs + result: $Utils.PayloadToResult[] } create: { - args: Prisma.MapVetoStepCreateArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepCreateArgs + result: $Utils.PayloadToResult } createMany: { - args: Prisma.MapVetoStepCreateManyArgs + args: Prisma.MapVoteStepCreateManyArgs result: BatchPayload } createManyAndReturn: { - args: Prisma.MapVetoStepCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteStepCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.MapVetoStepDeleteArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepDeleteArgs + result: $Utils.PayloadToResult } update: { - args: Prisma.MapVetoStepUpdateArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepUpdateArgs + result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.MapVetoStepDeleteManyArgs + args: Prisma.MapVoteStepDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.MapVetoStepUpdateManyArgs + args: Prisma.MapVoteStepUpdateManyArgs result: BatchPayload } updateManyAndReturn: { - args: Prisma.MapVetoStepUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.MapVoteStepUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] } upsert: { - args: Prisma.MapVetoStepUpsertArgs - result: $Utils.PayloadToResult + args: Prisma.MapVoteStepUpsertArgs + result: $Utils.PayloadToResult } aggregate: { - args: Prisma.MapVetoStepAggregateArgs - result: $Utils.Optional + args: Prisma.MapVoteStepAggregateArgs + result: $Utils.Optional } groupBy: { - args: Prisma.MapVetoStepGroupByArgs - result: $Utils.Optional[] + args: Prisma.MapVoteStepGroupByArgs + result: $Utils.Optional[] } count: { - args: Prisma.MapVetoStepCountArgs - result: $Utils.Optional | number + args: Prisma.MapVoteStepCountArgs + result: $Utils.Optional | number } } } @@ -1906,8 +1899,8 @@ export namespace Prisma { schedule?: ScheduleOmit demoFile?: DemoFileOmit serverRequest?: ServerRequestOmit - mapVeto?: MapVetoOmit - mapVetoStep?: MapVetoStepOmit + mapVote?: MapVoteOmit + mapVoteStep?: MapVoteStepOmit } /* Types for Logging */ @@ -1966,25 +1959,6 @@ export namespace Prisma { | 'findRaw' | 'groupBy' - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - // tested in getLogLevel.test.ts export function getLogLevel(log: Array): LogLevel | undefined; @@ -2017,7 +1991,7 @@ export namespace Prisma { demoFiles: number createdSchedules: number confirmedSchedules: number - mapVetoChoices: number + mapVoteChoices: number } export type UserCountOutputTypeSelect = { @@ -2031,7 +2005,7 @@ export namespace Prisma { demoFiles?: boolean | UserCountOutputTypeCountDemoFilesArgs createdSchedules?: boolean | UserCountOutputTypeCountCreatedSchedulesArgs confirmedSchedules?: boolean | UserCountOutputTypeCountConfirmedSchedulesArgs - mapVetoChoices?: boolean | UserCountOutputTypeCountMapVetoChoicesArgs + mapVoteChoices?: boolean | UserCountOutputTypeCountMapVoteChoicesArgs } // Custom InputTypes @@ -2118,8 +2092,8 @@ export namespace Prisma { /** * UserCountOutputType without action */ - export type UserCountOutputTypeCountMapVetoChoicesArgs = { - where?: MapVetoStepWhereInput + export type UserCountOutputTypeCountMapVoteChoicesArgs = { + where?: MapVoteStepWhereInput } @@ -2135,7 +2109,7 @@ export namespace Prisma { matchesAsTeamB: number schedulesAsTeamA: number schedulesAsTeamB: number - mapVetoSteps: number + mapVoteSteps: number } export type TeamCountOutputTypeSelect = { @@ -2146,7 +2120,7 @@ export namespace Prisma { matchesAsTeamB?: boolean | TeamCountOutputTypeCountMatchesAsTeamBArgs schedulesAsTeamA?: boolean | TeamCountOutputTypeCountSchedulesAsTeamAArgs schedulesAsTeamB?: boolean | TeamCountOutputTypeCountSchedulesAsTeamBArgs - mapVetoSteps?: boolean | TeamCountOutputTypeCountMapVetoStepsArgs + mapVoteSteps?: boolean | TeamCountOutputTypeCountMapVoteStepsArgs } // Custom InputTypes @@ -2212,8 +2186,8 @@ export namespace Prisma { /** * TeamCountOutputType without action */ - export type TeamCountOutputTypeCountMapVetoStepsArgs = { - where?: MapVetoStepWhereInput + export type TeamCountOutputTypeCountMapVoteStepsArgs = { + where?: MapVoteStepWhereInput } @@ -2276,33 +2250,33 @@ export namespace Prisma { /** - * Count Type MapVetoCountOutputType + * Count Type MapVoteCountOutputType */ - export type MapVetoCountOutputType = { + export type MapVoteCountOutputType = { steps: number } - export type MapVetoCountOutputTypeSelect = { - steps?: boolean | MapVetoCountOutputTypeCountStepsArgs + export type MapVoteCountOutputTypeSelect = { + steps?: boolean | MapVoteCountOutputTypeCountStepsArgs } // Custom InputTypes /** - * MapVetoCountOutputType without action + * MapVoteCountOutputType without action */ - export type MapVetoCountOutputTypeDefaultArgs = { + export type MapVoteCountOutputTypeDefaultArgs = { /** - * Select specific fields to fetch from the MapVetoCountOutputType + * Select specific fields to fetch from the MapVoteCountOutputType */ - select?: MapVetoCountOutputTypeSelect | null + select?: MapVoteCountOutputTypeSelect | null } /** - * MapVetoCountOutputType without action + * MapVoteCountOutputType without action */ - export type MapVetoCountOutputTypeCountStepsArgs = { - where?: MapVetoStepWhereInput + export type MapVoteCountOutputTypeCountStepsArgs = { + where?: MapVoteStepWhereInput } @@ -2568,7 +2542,7 @@ export namespace Prisma { demoFiles?: boolean | User$demoFilesArgs createdSchedules?: boolean | User$createdSchedulesArgs confirmedSchedules?: boolean | User$confirmedSchedulesArgs - mapVetoChoices?: boolean | User$mapVetoChoicesArgs + mapVoteChoices?: boolean | User$mapVoteChoicesArgs _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> @@ -2630,7 +2604,7 @@ export namespace Prisma { demoFiles?: boolean | User$demoFilesArgs createdSchedules?: boolean | User$createdSchedulesArgs confirmedSchedules?: boolean | User$confirmedSchedulesArgs - mapVetoChoices?: boolean | User$mapVetoChoicesArgs + mapVoteChoices?: boolean | User$mapVoteChoicesArgs _count?: boolean | UserCountOutputTypeDefaultArgs } export type UserIncludeCreateManyAndReturn = { @@ -2655,7 +2629,7 @@ export namespace Prisma { demoFiles: Prisma.$DemoFilePayload[] createdSchedules: Prisma.$SchedulePayload[] confirmedSchedules: Prisma.$SchedulePayload[] - mapVetoChoices: Prisma.$MapVetoStepPayload[] + mapVoteChoices: Prisma.$MapVoteStepPayload[] } scalars: $Extensions.GetPayloadResult<{ steamId: string @@ -3075,7 +3049,7 @@ export namespace Prisma { demoFiles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> createdSchedules = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> confirmedSchedules = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - mapVetoChoices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + mapVoteChoices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -3790,27 +3764,27 @@ export namespace Prisma { } /** - * User.mapVetoChoices + * User.mapVoteChoices */ - export type User$mapVetoChoicesArgs = { + export type User$mapVoteChoicesArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null - where?: MapVetoStepWhereInput - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] - cursor?: MapVetoStepWhereUniqueInput + include?: MapVoteStepInclude | null + where?: MapVoteStepWhereInput + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] + cursor?: MapVoteStepWhereUniqueInput take?: number skip?: number - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** @@ -4012,7 +3986,7 @@ export namespace Prisma { matchesAsTeamB?: boolean | Team$matchesAsTeamBArgs schedulesAsTeamA?: boolean | Team$schedulesAsTeamAArgs schedulesAsTeamB?: boolean | Team$schedulesAsTeamBArgs - mapVetoSteps?: boolean | Team$mapVetoStepsArgs + mapVoteSteps?: boolean | Team$mapVoteStepsArgs _count?: boolean | TeamCountOutputTypeDefaultArgs }, ExtArgs["result"]["team"]> @@ -4058,7 +4032,7 @@ export namespace Prisma { matchesAsTeamB?: boolean | Team$matchesAsTeamBArgs schedulesAsTeamA?: boolean | Team$schedulesAsTeamAArgs schedulesAsTeamB?: boolean | Team$schedulesAsTeamBArgs - mapVetoSteps?: boolean | Team$mapVetoStepsArgs + mapVoteSteps?: boolean | Team$mapVoteStepsArgs _count?: boolean | TeamCountOutputTypeDefaultArgs } export type TeamIncludeCreateManyAndReturn = { @@ -4079,7 +4053,7 @@ export namespace Prisma { matchesAsTeamB: Prisma.$MatchPayload[] schedulesAsTeamA: Prisma.$SchedulePayload[] schedulesAsTeamB: Prisma.$SchedulePayload[] - mapVetoSteps: Prisma.$MapVetoStepPayload[] + mapVoteSteps: Prisma.$MapVoteStepPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -4491,7 +4465,7 @@ export namespace Prisma { matchesAsTeamB = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> schedulesAsTeamA = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> schedulesAsTeamB = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - mapVetoSteps = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + mapVoteSteps = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -5111,27 +5085,27 @@ export namespace Prisma { } /** - * Team.mapVetoSteps + * Team.mapVoteSteps */ - export type Team$mapVetoStepsArgs = { + export type Team$mapVoteStepsArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null - where?: MapVetoStepWhereInput - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] - cursor?: MapVetoStepWhereUniqueInput + include?: MapVoteStepInclude | null + where?: MapVoteStepWhereInput + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] + cursor?: MapVoteStepWhereUniqueInput take?: number skip?: number - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** @@ -7650,7 +7624,7 @@ export namespace Prisma { demoFile?: boolean | Match$demoFileArgs players?: boolean | Match$playersArgs rankUpdates?: boolean | Match$rankUpdatesArgs - mapVeto?: boolean | Match$mapVetoArgs + mapVote?: boolean | Match$mapVoteArgs schedule?: boolean | Match$scheduleArgs _count?: boolean | MatchCountOutputTypeDefaultArgs }, ExtArgs["result"]["match"]> @@ -7734,7 +7708,7 @@ export namespace Prisma { demoFile?: boolean | Match$demoFileArgs players?: boolean | Match$playersArgs rankUpdates?: boolean | Match$rankUpdatesArgs - mapVeto?: boolean | Match$mapVetoArgs + mapVote?: boolean | Match$mapVoteArgs schedule?: boolean | Match$scheduleArgs _count?: boolean | MatchCountOutputTypeDefaultArgs } @@ -7757,7 +7731,7 @@ export namespace Prisma { demoFile: Prisma.$DemoFilePayload | null players: Prisma.$MatchPlayerPayload[] rankUpdates: Prisma.$RankHistoryPayload[] - mapVeto: Prisma.$MapVetoPayload | null + mapVote: Prisma.$MapVotePayload | null schedule: Prisma.$SchedulePayload | null } scalars: $Extensions.GetPayloadResult<{ @@ -8181,7 +8155,7 @@ export namespace Prisma { demoFile = {}>(args?: Subset>): Prisma__DemoFileClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> players = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> rankUpdates = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - mapVeto = {}>(args?: Subset>): Prisma__MapVetoClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + mapVote = {}>(args?: Subset>): Prisma__MapVoteClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> schedule = {}>(args?: Subset>): Prisma__ScheduleClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. @@ -8780,22 +8754,22 @@ export namespace Prisma { } /** - * Match.mapVeto + * Match.mapVote */ - export type Match$mapVetoArgs = { + export type Match$mapVoteArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null - where?: MapVetoWhereInput + include?: MapVoteInclude | null + where?: MapVoteWhereInput } /** @@ -16158,50 +16132,54 @@ export namespace Prisma { /** - * Model MapVeto + * Model MapVote */ - export type AggregateMapVeto = { - _count: MapVetoCountAggregateOutputType | null - _avg: MapVetoAvgAggregateOutputType | null - _sum: MapVetoSumAggregateOutputType | null - _min: MapVetoMinAggregateOutputType | null - _max: MapVetoMaxAggregateOutputType | null + export type AggregateMapVote = { + _count: MapVoteCountAggregateOutputType | null + _avg: MapVoteAvgAggregateOutputType | null + _sum: MapVoteSumAggregateOutputType | null + _min: MapVoteMinAggregateOutputType | null + _max: MapVoteMaxAggregateOutputType | null } - export type MapVetoAvgAggregateOutputType = { + export type MapVoteAvgAggregateOutputType = { bestOf: number | null currentIdx: number | null } - export type MapVetoSumAggregateOutputType = { + export type MapVoteSumAggregateOutputType = { bestOf: number | null currentIdx: number | null } - export type MapVetoMinAggregateOutputType = { + export type MapVoteMinAggregateOutputType = { id: string | null matchId: string | null bestOf: number | null currentIdx: number | null locked: boolean | null opensAt: Date | null + adminEditingBy: string | null + adminEditingSince: Date | null createdAt: Date | null updatedAt: Date | null } - export type MapVetoMaxAggregateOutputType = { + export type MapVoteMaxAggregateOutputType = { id: string | null matchId: string | null bestOf: number | null currentIdx: number | null locked: boolean | null opensAt: Date | null + adminEditingBy: string | null + adminEditingSince: Date | null createdAt: Date | null updatedAt: Date | null } - export type MapVetoCountAggregateOutputType = { + export type MapVoteCountAggregateOutputType = { id: number matchId: number bestOf: number @@ -16209,45 +16187,51 @@ export namespace Prisma { currentIdx: number locked: number opensAt: number + adminEditingBy: number + adminEditingSince: number createdAt: number updatedAt: number _all: number } - export type MapVetoAvgAggregateInputType = { + export type MapVoteAvgAggregateInputType = { bestOf?: true currentIdx?: true } - export type MapVetoSumAggregateInputType = { + export type MapVoteSumAggregateInputType = { bestOf?: true currentIdx?: true } - export type MapVetoMinAggregateInputType = { + export type MapVoteMinAggregateInputType = { id?: true matchId?: true bestOf?: true currentIdx?: true locked?: true opensAt?: true + adminEditingBy?: true + adminEditingSince?: true createdAt?: true updatedAt?: true } - export type MapVetoMaxAggregateInputType = { + export type MapVoteMaxAggregateInputType = { id?: true matchId?: true bestOf?: true currentIdx?: true locked?: true opensAt?: true + adminEditingBy?: true + adminEditingSince?: true createdAt?: true updatedAt?: true } - export type MapVetoCountAggregateInputType = { + export type MapVoteCountAggregateInputType = { id?: true matchId?: true bestOf?: true @@ -16255,98 +16239,100 @@ export namespace Prisma { currentIdx?: true locked?: true opensAt?: true + adminEditingBy?: true + adminEditingSince?: true createdAt?: true updatedAt?: true _all?: true } - export type MapVetoAggregateArgs = { + export type MapVoteAggregateArgs = { /** - * Filter which MapVeto to aggregate. + * Filter which MapVote to aggregate. */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetos to fetch. + * Determine the order of MapVotes to fetch. */ - orderBy?: MapVetoOrderByWithRelationInput | MapVetoOrderByWithRelationInput[] + orderBy?: MapVoteOrderByWithRelationInput | MapVoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: MapVetoWhereUniqueInput + cursor?: MapVoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetos from the position of the cursor. + * Take `±n` MapVotes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetos. + * Skip the first `n` MapVotes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned MapVetos + * Count returned MapVotes **/ - _count?: true | MapVetoCountAggregateInputType + _count?: true | MapVoteCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ - _avg?: MapVetoAvgAggregateInputType + _avg?: MapVoteAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ - _sum?: MapVetoSumAggregateInputType + _sum?: MapVoteSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ - _min?: MapVetoMinAggregateInputType + _min?: MapVoteMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: MapVetoMaxAggregateInputType + _max?: MapVoteMaxAggregateInputType } - export type GetMapVetoAggregateType = { - [P in keyof T & keyof AggregateMapVeto]: P extends '_count' | 'count' + export type GetMapVoteAggregateType = { + [P in keyof T & keyof AggregateMapVote]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type MapVetoGroupByArgs = { - where?: MapVetoWhereInput - orderBy?: MapVetoOrderByWithAggregationInput | MapVetoOrderByWithAggregationInput[] - by: MapVetoScalarFieldEnum[] | MapVetoScalarFieldEnum - having?: MapVetoScalarWhereWithAggregatesInput + export type MapVoteGroupByArgs = { + where?: MapVoteWhereInput + orderBy?: MapVoteOrderByWithAggregationInput | MapVoteOrderByWithAggregationInput[] + by: MapVoteScalarFieldEnum[] | MapVoteScalarFieldEnum + having?: MapVoteScalarWhereWithAggregatesInput take?: number skip?: number - _count?: MapVetoCountAggregateInputType | true - _avg?: MapVetoAvgAggregateInputType - _sum?: MapVetoSumAggregateInputType - _min?: MapVetoMinAggregateInputType - _max?: MapVetoMaxAggregateInputType + _count?: MapVoteCountAggregateInputType | true + _avg?: MapVoteAvgAggregateInputType + _sum?: MapVoteSumAggregateInputType + _min?: MapVoteMinAggregateInputType + _max?: MapVoteMaxAggregateInputType } - export type MapVetoGroupByOutputType = { + export type MapVoteGroupByOutputType = { id: string matchId: string bestOf: number @@ -16354,30 +16340,32 @@ export namespace Prisma { currentIdx: number locked: boolean opensAt: Date | null + adminEditingBy: string | null + adminEditingSince: Date | null createdAt: Date updatedAt: Date - _count: MapVetoCountAggregateOutputType | null - _avg: MapVetoAvgAggregateOutputType | null - _sum: MapVetoSumAggregateOutputType | null - _min: MapVetoMinAggregateOutputType | null - _max: MapVetoMaxAggregateOutputType | null + _count: MapVoteCountAggregateOutputType | null + _avg: MapVoteAvgAggregateOutputType | null + _sum: MapVoteSumAggregateOutputType | null + _min: MapVoteMinAggregateOutputType | null + _max: MapVoteMaxAggregateOutputType | null } - type GetMapVetoGroupByPayload = Prisma.PrismaPromise< + type GetMapVoteGroupByPayload = Prisma.PrismaPromise< Array< - PickEnumerable & + PickEnumerable & { - [P in ((keyof T) & (keyof MapVetoGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof MapVoteGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type MapVetoSelect = $Extensions.GetSelect<{ + export type MapVoteSelect = $Extensions.GetSelect<{ id?: boolean matchId?: boolean bestOf?: boolean @@ -16385,14 +16373,16 @@ export namespace Prisma { currentIdx?: boolean locked?: boolean opensAt?: boolean + adminEditingBy?: boolean + adminEditingSince?: boolean createdAt?: boolean updatedAt?: boolean match?: boolean | MatchDefaultArgs - steps?: boolean | MapVeto$stepsArgs - _count?: boolean | MapVetoCountOutputTypeDefaultArgs - }, ExtArgs["result"]["mapVeto"]> + steps?: boolean | MapVote$stepsArgs + _count?: boolean | MapVoteCountOutputTypeDefaultArgs + }, ExtArgs["result"]["mapVote"]> - export type MapVetoSelectCreateManyAndReturn = $Extensions.GetSelect<{ + export type MapVoteSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean matchId?: boolean bestOf?: boolean @@ -16400,12 +16390,14 @@ export namespace Prisma { currentIdx?: boolean locked?: boolean opensAt?: boolean + adminEditingBy?: boolean + adminEditingSince?: boolean createdAt?: boolean updatedAt?: boolean match?: boolean | MatchDefaultArgs - }, ExtArgs["result"]["mapVeto"]> + }, ExtArgs["result"]["mapVote"]> - export type MapVetoSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + export type MapVoteSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean matchId?: boolean bestOf?: boolean @@ -16413,12 +16405,14 @@ export namespace Prisma { currentIdx?: boolean locked?: boolean opensAt?: boolean + adminEditingBy?: boolean + adminEditingSince?: boolean createdAt?: boolean updatedAt?: boolean match?: boolean | MatchDefaultArgs - }, ExtArgs["result"]["mapVeto"]> + }, ExtArgs["result"]["mapVote"]> - export type MapVetoSelectScalar = { + export type MapVoteSelectScalar = { id?: boolean matchId?: boolean bestOf?: boolean @@ -16426,28 +16420,30 @@ export namespace Prisma { currentIdx?: boolean locked?: boolean opensAt?: boolean + adminEditingBy?: boolean + adminEditingSince?: boolean createdAt?: boolean updatedAt?: boolean } - export type MapVetoOmit = $Extensions.GetOmit<"id" | "matchId" | "bestOf" | "mapPool" | "currentIdx" | "locked" | "opensAt" | "createdAt" | "updatedAt", ExtArgs["result"]["mapVeto"]> - export type MapVetoInclude = { + export type MapVoteOmit = $Extensions.GetOmit<"id" | "matchId" | "bestOf" | "mapPool" | "currentIdx" | "locked" | "opensAt" | "adminEditingBy" | "adminEditingSince" | "createdAt" | "updatedAt", ExtArgs["result"]["mapVote"]> + export type MapVoteInclude = { match?: boolean | MatchDefaultArgs - steps?: boolean | MapVeto$stepsArgs - _count?: boolean | MapVetoCountOutputTypeDefaultArgs + steps?: boolean | MapVote$stepsArgs + _count?: boolean | MapVoteCountOutputTypeDefaultArgs } - export type MapVetoIncludeCreateManyAndReturn = { + export type MapVoteIncludeCreateManyAndReturn = { match?: boolean | MatchDefaultArgs } - export type MapVetoIncludeUpdateManyAndReturn = { + export type MapVoteIncludeUpdateManyAndReturn = { match?: boolean | MatchDefaultArgs } - export type $MapVetoPayload = { - name: "MapVeto" + export type $MapVotePayload = { + name: "MapVote" objects: { match: Prisma.$MatchPayload - steps: Prisma.$MapVetoStepPayload[] + steps: Prisma.$MapVoteStepPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -16457,138 +16453,140 @@ export namespace Prisma { currentIdx: number locked: boolean opensAt: Date | null + adminEditingBy: string | null + adminEditingSince: Date | null createdAt: Date updatedAt: Date - }, ExtArgs["result"]["mapVeto"]> + }, ExtArgs["result"]["mapVote"]> composites: {} } - type MapVetoGetPayload = $Result.GetResult + type MapVoteGetPayload = $Result.GetResult - type MapVetoCountArgs = - Omit & { - select?: MapVetoCountAggregateInputType | true + type MapVoteCountArgs = + Omit & { + select?: MapVoteCountAggregateInputType | true } - export interface MapVetoDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['MapVeto'], meta: { name: 'MapVeto' } } + export interface MapVoteDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MapVote'], meta: { name: 'MapVote' } } /** - * Find zero or one MapVeto that matches the filter. - * @param {MapVetoFindUniqueArgs} args - Arguments to find a MapVeto + * Find zero or one MapVote that matches the filter. + * @param {MapVoteFindUniqueArgs} args - Arguments to find a MapVote * @example - * // Get one MapVeto - * const mapVeto = await prisma.mapVeto.findUnique({ + * // Get one MapVote + * const mapVote = await prisma.mapVote.findUnique({ * where: { * // ... provide filter here * } * }) */ - findUnique(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** - * Find one MapVeto that matches the filter or throw an error with `error.code='P2025'` + * Find one MapVote that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {MapVetoFindUniqueOrThrowArgs} args - Arguments to find a MapVeto + * @param {MapVoteFindUniqueOrThrowArgs} args - Arguments to find a MapVote * @example - * // Get one MapVeto - * const mapVeto = await prisma.mapVeto.findUniqueOrThrow({ + * // Get one MapVote + * const mapVote = await prisma.mapVote.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ - findUniqueOrThrow(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Find the first MapVeto that matches the filter. + * Find the first MapVote that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoFindFirstArgs} args - Arguments to find a MapVeto + * @param {MapVoteFindFirstArgs} args - Arguments to find a MapVote * @example - * // Get one MapVeto - * const mapVeto = await prisma.mapVeto.findFirst({ + * // Get one MapVote + * const mapVote = await prisma.mapVote.findFirst({ * where: { * // ... provide filter here * } * }) */ - findFirst(args?: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst(args?: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** - * Find the first MapVeto that matches the filter or + * Find the first MapVote that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoFindFirstOrThrowArgs} args - Arguments to find a MapVeto + * @param {MapVoteFindFirstOrThrowArgs} args - Arguments to find a MapVote * @example - * // Get one MapVeto - * const mapVeto = await prisma.mapVeto.findFirstOrThrow({ + * // Get one MapVote + * const mapVote = await prisma.mapVote.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ - findFirstOrThrow(args?: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow(args?: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Find zero or more MapVetos that matches the filter. + * Find zero or more MapVotes that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoFindManyArgs} args - Arguments to filter and select certain fields only. + * @param {MapVoteFindManyArgs} args - Arguments to filter and select certain fields only. * @example - * // Get all MapVetos - * const mapVetos = await prisma.mapVeto.findMany() + * // Get all MapVotes + * const mapVotes = await prisma.mapVote.findMany() * - * // Get first 10 MapVetos - * const mapVetos = await prisma.mapVeto.findMany({ take: 10 }) + * // Get first 10 MapVotes + * const mapVotes = await prisma.mapVote.findMany({ take: 10 }) * * // Only select the `id` - * const mapVetoWithIdOnly = await prisma.mapVeto.findMany({ select: { id: true } }) + * const mapVoteWithIdOnly = await prisma.mapVote.findMany({ select: { id: true } }) * */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** - * Create a MapVeto. - * @param {MapVetoCreateArgs} args - Arguments to create a MapVeto. + * Create a MapVote. + * @param {MapVoteCreateArgs} args - Arguments to create a MapVote. * @example - * // Create one MapVeto - * const MapVeto = await prisma.mapVeto.create({ + * // Create one MapVote + * const MapVote = await prisma.mapVote.create({ * data: { - * // ... data to create a MapVeto + * // ... data to create a MapVote * } * }) * */ - create(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Create many MapVetos. - * @param {MapVetoCreateManyArgs} args - Arguments to create many MapVetos. + * Create many MapVotes. + * @param {MapVoteCreateManyArgs} args - Arguments to create many MapVotes. * @example - * // Create many MapVetos - * const mapVeto = await prisma.mapVeto.createMany({ + * // Create many MapVotes + * const mapVote = await prisma.mapVote.createMany({ * data: [ * // ... provide data here * ] * }) * */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Create many MapVetos and returns the data saved in the database. - * @param {MapVetoCreateManyAndReturnArgs} args - Arguments to create many MapVetos. + * Create many MapVotes and returns the data saved in the database. + * @param {MapVoteCreateManyAndReturnArgs} args - Arguments to create many MapVotes. * @example - * // Create many MapVetos - * const mapVeto = await prisma.mapVeto.createManyAndReturn({ + * // Create many MapVotes + * const mapVote = await prisma.mapVote.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * - * // Create many MapVetos and only return the `id` - * const mapVetoWithIdOnly = await prisma.mapVeto.createManyAndReturn({ + * // Create many MapVotes and only return the `id` + * const mapVoteWithIdOnly = await prisma.mapVote.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here @@ -16598,28 +16596,28 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> /** - * Delete a MapVeto. - * @param {MapVetoDeleteArgs} args - Arguments to delete one MapVeto. + * Delete a MapVote. + * @param {MapVoteDeleteArgs} args - Arguments to delete one MapVote. * @example - * // Delete one MapVeto - * const MapVeto = await prisma.mapVeto.delete({ + * // Delete one MapVote + * const MapVote = await prisma.mapVote.delete({ * where: { - * // ... filter to delete one MapVeto + * // ... filter to delete one MapVote * } * }) * */ - delete(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Update one MapVeto. - * @param {MapVetoUpdateArgs} args - Arguments to update one MapVeto. + * Update one MapVote. + * @param {MapVoteUpdateArgs} args - Arguments to update one MapVote. * @example - * // Update one MapVeto - * const mapVeto = await prisma.mapVeto.update({ + * // Update one MapVote + * const mapVote = await prisma.mapVote.update({ * where: { * // ... provide filter here * }, @@ -16629,30 +16627,30 @@ export namespace Prisma { * }) * */ - update(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Delete zero or more MapVetos. - * @param {MapVetoDeleteManyArgs} args - Arguments to filter MapVetos to delete. + * Delete zero or more MapVotes. + * @param {MapVoteDeleteManyArgs} args - Arguments to filter MapVotes to delete. * @example - * // Delete a few MapVetos - * const { count } = await prisma.mapVeto.deleteMany({ + * // Delete a few MapVotes + * const { count } = await prisma.mapVote.deleteMany({ * where: { * // ... provide filter here * } * }) * */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more MapVetos. + * Update zero or more MapVotes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoUpdateManyArgs} args - Arguments to update one or more rows. + * @param {MapVoteUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many MapVetos - * const mapVeto = await prisma.mapVeto.updateMany({ + * // Update many MapVotes + * const mapVote = await prisma.mapVote.updateMany({ * where: { * // ... provide filter here * }, @@ -16662,14 +16660,14 @@ export namespace Prisma { * }) * */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more MapVetos and returns the data updated in the database. - * @param {MapVetoUpdateManyAndReturnArgs} args - Arguments to update many MapVetos. + * Update zero or more MapVotes and returns the data updated in the database. + * @param {MapVoteUpdateManyAndReturnArgs} args - Arguments to update many MapVotes. * @example - * // Update many MapVetos - * const mapVeto = await prisma.mapVeto.updateManyAndReturn({ + * // Update many MapVotes + * const mapVote = await prisma.mapVote.updateManyAndReturn({ * where: { * // ... provide filter here * }, @@ -16678,8 +16676,8 @@ export namespace Prisma { * ] * }) * - * // Update zero or more MapVetos and only return the `id` - * const mapVetoWithIdOnly = await prisma.mapVeto.updateManyAndReturn({ + * // Update zero or more MapVotes and only return the `id` + * const mapVoteWithIdOnly = await prisma.mapVote.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here @@ -16692,56 +16690,56 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** - * Create or update one MapVeto. - * @param {MapVetoUpsertArgs} args - Arguments to update or create a MapVeto. + * Create or update one MapVote. + * @param {MapVoteUpsertArgs} args - Arguments to update or create a MapVote. * @example - * // Update or create a MapVeto - * const mapVeto = await prisma.mapVeto.upsert({ + * // Update or create a MapVote + * const mapVote = await prisma.mapVote.upsert({ * create: { - * // ... data to create a MapVeto + * // ... data to create a MapVote * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the MapVeto we want to update + * // ... the filter for the MapVote we want to update * } * }) */ - upsert(args: SelectSubset>): Prisma__MapVetoClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + upsert(args: SelectSubset>): Prisma__MapVoteClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Count the number of MapVetos. + * Count the number of MapVotes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoCountArgs} args - Arguments to filter MapVetos to count. + * @param {MapVoteCountArgs} args - Arguments to filter MapVotes to count. * @example - * // Count the number of MapVetos - * const count = await prisma.mapVeto.count({ + * // Count the number of MapVotes + * const count = await prisma.mapVote.count({ * where: { - * // ... the filter for the MapVetos we want to count + * // ... the filter for the MapVotes we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a MapVeto. + * Allows you to perform aggregations operations on a MapVote. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {MapVoteAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -16761,13 +16759,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by MapVeto. + * Group by MapVote. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoGroupByArgs} args - Group by arguments. + * @param {MapVoteGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -16782,14 +16780,14 @@ export namespace Prisma { * **/ groupBy< - T extends MapVetoGroupByArgs, + T extends MapVoteGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: MapVetoGroupByArgs['orderBy'] } - : { orderBy?: MapVetoGroupByArgs['orderBy'] }, + ? { orderBy: MapVoteGroupByArgs['orderBy'] } + : { orderBy?: MapVoteGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, @@ -16838,23 +16836,23 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMapVetoGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMapVoteGroupByPayload : Prisma.PrismaPromise /** - * Fields of the MapVeto model + * Fields of the MapVote model */ - readonly fields: MapVetoFieldRefs; + readonly fields: MapVoteFieldRefs; } /** - * The delegate class that acts as a "Promise-like" for MapVeto. + * The delegate class that acts as a "Promise-like" for MapVote. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export interface Prisma__MapVetoClient extends Prisma.PrismaPromise { + export interface Prisma__MapVoteClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" match = {}>(args?: Subset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - steps = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + steps = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -16881,501 +16879,503 @@ export namespace Prisma { /** - * Fields of the MapVeto model + * Fields of the MapVote model */ - interface MapVetoFieldRefs { - readonly id: FieldRef<"MapVeto", 'String'> - readonly matchId: FieldRef<"MapVeto", 'String'> - readonly bestOf: FieldRef<"MapVeto", 'Int'> - readonly mapPool: FieldRef<"MapVeto", 'String[]'> - readonly currentIdx: FieldRef<"MapVeto", 'Int'> - readonly locked: FieldRef<"MapVeto", 'Boolean'> - readonly opensAt: FieldRef<"MapVeto", 'DateTime'> - readonly createdAt: FieldRef<"MapVeto", 'DateTime'> - readonly updatedAt: FieldRef<"MapVeto", 'DateTime'> + interface MapVoteFieldRefs { + readonly id: FieldRef<"MapVote", 'String'> + readonly matchId: FieldRef<"MapVote", 'String'> + readonly bestOf: FieldRef<"MapVote", 'Int'> + readonly mapPool: FieldRef<"MapVote", 'String[]'> + readonly currentIdx: FieldRef<"MapVote", 'Int'> + readonly locked: FieldRef<"MapVote", 'Boolean'> + readonly opensAt: FieldRef<"MapVote", 'DateTime'> + readonly adminEditingBy: FieldRef<"MapVote", 'String'> + readonly adminEditingSince: FieldRef<"MapVote", 'DateTime'> + readonly createdAt: FieldRef<"MapVote", 'DateTime'> + readonly updatedAt: FieldRef<"MapVote", 'DateTime'> } // Custom InputTypes /** - * MapVeto findUnique + * MapVote findUnique */ - export type MapVetoFindUniqueArgs = { + export type MapVoteFindUniqueArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter, which MapVeto to fetch. + * Filter, which MapVote to fetch. */ - where: MapVetoWhereUniqueInput + where: MapVoteWhereUniqueInput } /** - * MapVeto findUniqueOrThrow + * MapVote findUniqueOrThrow */ - export type MapVetoFindUniqueOrThrowArgs = { + export type MapVoteFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter, which MapVeto to fetch. + * Filter, which MapVote to fetch. */ - where: MapVetoWhereUniqueInput + where: MapVoteWhereUniqueInput } /** - * MapVeto findFirst + * MapVote findFirst */ - export type MapVetoFindFirstArgs = { + export type MapVoteFindFirstArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter, which MapVeto to fetch. + * Filter, which MapVote to fetch. */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetos to fetch. + * Determine the order of MapVotes to fetch. */ - orderBy?: MapVetoOrderByWithRelationInput | MapVetoOrderByWithRelationInput[] + orderBy?: MapVoteOrderByWithRelationInput | MapVoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for MapVetos. + * Sets the position for searching for MapVotes. */ - cursor?: MapVetoWhereUniqueInput + cursor?: MapVoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetos from the position of the cursor. + * Take `±n` MapVotes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetos. + * Skip the first `n` MapVotes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of MapVetos. + * Filter by unique combinations of MapVotes. */ - distinct?: MapVetoScalarFieldEnum | MapVetoScalarFieldEnum[] + distinct?: MapVoteScalarFieldEnum | MapVoteScalarFieldEnum[] } /** - * MapVeto findFirstOrThrow + * MapVote findFirstOrThrow */ - export type MapVetoFindFirstOrThrowArgs = { + export type MapVoteFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter, which MapVeto to fetch. + * Filter, which MapVote to fetch. */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetos to fetch. + * Determine the order of MapVotes to fetch. */ - orderBy?: MapVetoOrderByWithRelationInput | MapVetoOrderByWithRelationInput[] + orderBy?: MapVoteOrderByWithRelationInput | MapVoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for MapVetos. + * Sets the position for searching for MapVotes. */ - cursor?: MapVetoWhereUniqueInput + cursor?: MapVoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetos from the position of the cursor. + * Take `±n` MapVotes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetos. + * Skip the first `n` MapVotes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of MapVetos. + * Filter by unique combinations of MapVotes. */ - distinct?: MapVetoScalarFieldEnum | MapVetoScalarFieldEnum[] + distinct?: MapVoteScalarFieldEnum | MapVoteScalarFieldEnum[] } /** - * MapVeto findMany + * MapVote findMany */ - export type MapVetoFindManyArgs = { + export type MapVoteFindManyArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter, which MapVetos to fetch. + * Filter, which MapVotes to fetch. */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetos to fetch. + * Determine the order of MapVotes to fetch. */ - orderBy?: MapVetoOrderByWithRelationInput | MapVetoOrderByWithRelationInput[] + orderBy?: MapVoteOrderByWithRelationInput | MapVoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing MapVetos. + * Sets the position for listing MapVotes. */ - cursor?: MapVetoWhereUniqueInput + cursor?: MapVoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetos from the position of the cursor. + * Take `±n` MapVotes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetos. + * Skip the first `n` MapVotes. */ skip?: number - distinct?: MapVetoScalarFieldEnum | MapVetoScalarFieldEnum[] + distinct?: MapVoteScalarFieldEnum | MapVoteScalarFieldEnum[] } /** - * MapVeto create + * MapVote create */ - export type MapVetoCreateArgs = { + export type MapVoteCreateArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * The data needed to create a MapVeto. + * The data needed to create a MapVote. */ - data: XOR + data: XOR } /** - * MapVeto createMany + * MapVote createMany */ - export type MapVetoCreateManyArgs = { + export type MapVoteCreateManyArgs = { /** - * The data used to create many MapVetos. + * The data used to create many MapVotes. */ - data: MapVetoCreateManyInput | MapVetoCreateManyInput[] + data: MapVoteCreateManyInput | MapVoteCreateManyInput[] skipDuplicates?: boolean } /** - * MapVeto createManyAndReturn + * MapVote createManyAndReturn */ - export type MapVetoCreateManyAndReturnArgs = { + export type MapVoteCreateManyAndReturnArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelectCreateManyAndReturn | null + select?: MapVoteSelectCreateManyAndReturn | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** - * The data used to create many MapVetos. + * The data used to create many MapVotes. */ - data: MapVetoCreateManyInput | MapVetoCreateManyInput[] + data: MapVoteCreateManyInput | MapVoteCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ - include?: MapVetoIncludeCreateManyAndReturn | null + include?: MapVoteIncludeCreateManyAndReturn | null } /** - * MapVeto update + * MapVote update */ - export type MapVetoUpdateArgs = { + export type MapVoteUpdateArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * The data needed to update a MapVeto. + * The data needed to update a MapVote. */ - data: XOR + data: XOR /** - * Choose, which MapVeto to update. + * Choose, which MapVote to update. */ - where: MapVetoWhereUniqueInput + where: MapVoteWhereUniqueInput } /** - * MapVeto updateMany + * MapVote updateMany */ - export type MapVetoUpdateManyArgs = { + export type MapVoteUpdateManyArgs = { /** - * The data used to update MapVetos. + * The data used to update MapVotes. */ - data: XOR + data: XOR /** - * Filter which MapVetos to update + * Filter which MapVotes to update */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** - * Limit how many MapVetos to update. + * Limit how many MapVotes to update. */ limit?: number } /** - * MapVeto updateManyAndReturn + * MapVote updateManyAndReturn */ - export type MapVetoUpdateManyAndReturnArgs = { + export type MapVoteUpdateManyAndReturnArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelectUpdateManyAndReturn | null + select?: MapVoteSelectUpdateManyAndReturn | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** - * The data used to update MapVetos. + * The data used to update MapVotes. */ - data: XOR + data: XOR /** - * Filter which MapVetos to update + * Filter which MapVotes to update */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** - * Limit how many MapVetos to update. + * Limit how many MapVotes to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ - include?: MapVetoIncludeUpdateManyAndReturn | null + include?: MapVoteIncludeUpdateManyAndReturn | null } /** - * MapVeto upsert + * MapVote upsert */ - export type MapVetoUpsertArgs = { + export type MapVoteUpsertArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * The filter to search for the MapVeto to update in case it exists. + * The filter to search for the MapVote to update in case it exists. */ - where: MapVetoWhereUniqueInput + where: MapVoteWhereUniqueInput /** - * In case the MapVeto found by the `where` argument doesn't exist, create a new MapVeto with this data. + * In case the MapVote found by the `where` argument doesn't exist, create a new MapVote with this data. */ - create: XOR + create: XOR /** - * In case the MapVeto was found with the provided `where` argument, update it with this data. + * In case the MapVote was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * MapVeto delete + * MapVote delete */ - export type MapVetoDeleteArgs = { + export type MapVoteDeleteArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null /** - * Filter which MapVeto to delete. + * Filter which MapVote to delete. */ - where: MapVetoWhereUniqueInput + where: MapVoteWhereUniqueInput } /** - * MapVeto deleteMany + * MapVote deleteMany */ - export type MapVetoDeleteManyArgs = { + export type MapVoteDeleteManyArgs = { /** - * Filter which MapVetos to delete + * Filter which MapVotes to delete */ - where?: MapVetoWhereInput + where?: MapVoteWhereInput /** - * Limit how many MapVetos to delete. + * Limit how many MapVotes to delete. */ limit?: number } /** - * MapVeto.steps + * MapVote.steps */ - export type MapVeto$stepsArgs = { + export type MapVote$stepsArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null - where?: MapVetoStepWhereInput - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] - cursor?: MapVetoStepWhereUniqueInput + include?: MapVoteStepInclude | null + where?: MapVoteStepWhereInput + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] + cursor?: MapVoteStepWhereUniqueInput take?: number skip?: number - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** - * MapVeto without action + * MapVote without action */ - export type MapVetoDefaultArgs = { + export type MapVoteDefaultArgs = { /** - * Select specific fields to fetch from the MapVeto + * Select specific fields to fetch from the MapVote */ - select?: MapVetoSelect | null + select?: MapVoteSelect | null /** - * Omit specific fields from the MapVeto + * Omit specific fields from the MapVote */ - omit?: MapVetoOmit | null + omit?: MapVoteOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoInclude | null + include?: MapVoteInclude | null } /** - * Model MapVetoStep + * Model MapVoteStep */ - export type AggregateMapVetoStep = { - _count: MapVetoStepCountAggregateOutputType | null - _avg: MapVetoStepAvgAggregateOutputType | null - _sum: MapVetoStepSumAggregateOutputType | null - _min: MapVetoStepMinAggregateOutputType | null - _max: MapVetoStepMaxAggregateOutputType | null + export type AggregateMapVoteStep = { + _count: MapVoteStepCountAggregateOutputType | null + _avg: MapVoteStepAvgAggregateOutputType | null + _sum: MapVoteStepSumAggregateOutputType | null + _min: MapVoteStepMinAggregateOutputType | null + _max: MapVoteStepMaxAggregateOutputType | null } - export type MapVetoStepAvgAggregateOutputType = { + export type MapVoteStepAvgAggregateOutputType = { order: number | null } - export type MapVetoStepSumAggregateOutputType = { + export type MapVoteStepSumAggregateOutputType = { order: number | null } - export type MapVetoStepMinAggregateOutputType = { + export type MapVoteStepMinAggregateOutputType = { id: string | null - vetoId: string | null + voteId: string | null order: number | null - action: $Enums.MapVetoAction | null + action: $Enums.MapVoteAction | null teamId: string | null map: string | null chosenAt: Date | null chosenBy: string | null } - export type MapVetoStepMaxAggregateOutputType = { + export type MapVoteStepMaxAggregateOutputType = { id: string | null - vetoId: string | null + voteId: string | null order: number | null - action: $Enums.MapVetoAction | null + action: $Enums.MapVoteAction | null teamId: string | null map: string | null chosenAt: Date | null chosenBy: string | null } - export type MapVetoStepCountAggregateOutputType = { + export type MapVoteStepCountAggregateOutputType = { id: number - vetoId: number + voteId: number order: number action: number teamId: number @@ -17386,17 +17386,17 @@ export namespace Prisma { } - export type MapVetoStepAvgAggregateInputType = { + export type MapVoteStepAvgAggregateInputType = { order?: true } - export type MapVetoStepSumAggregateInputType = { + export type MapVoteStepSumAggregateInputType = { order?: true } - export type MapVetoStepMinAggregateInputType = { + export type MapVoteStepMinAggregateInputType = { id?: true - vetoId?: true + voteId?: true order?: true action?: true teamId?: true @@ -17405,9 +17405,9 @@ export namespace Prisma { chosenBy?: true } - export type MapVetoStepMaxAggregateInputType = { + export type MapVoteStepMaxAggregateInputType = { id?: true - vetoId?: true + voteId?: true order?: true action?: true teamId?: true @@ -17416,9 +17416,9 @@ export namespace Prisma { chosenBy?: true } - export type MapVetoStepCountAggregateInputType = { + export type MapVoteStepCountAggregateInputType = { id?: true - vetoId?: true + voteId?: true order?: true action?: true teamId?: true @@ -17428,167 +17428,167 @@ export namespace Prisma { _all?: true } - export type MapVetoStepAggregateArgs = { + export type MapVoteStepAggregateArgs = { /** - * Filter which MapVetoStep to aggregate. + * Filter which MapVoteStep to aggregate. */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetoSteps to fetch. + * Determine the order of MapVoteSteps to fetch. */ - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: MapVetoStepWhereUniqueInput + cursor?: MapVoteStepWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetoSteps from the position of the cursor. + * Take `±n` MapVoteSteps from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetoSteps. + * Skip the first `n` MapVoteSteps. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned MapVetoSteps + * Count returned MapVoteSteps **/ - _count?: true | MapVetoStepCountAggregateInputType + _count?: true | MapVoteStepCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ - _avg?: MapVetoStepAvgAggregateInputType + _avg?: MapVoteStepAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ - _sum?: MapVetoStepSumAggregateInputType + _sum?: MapVoteStepSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ - _min?: MapVetoStepMinAggregateInputType + _min?: MapVoteStepMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: MapVetoStepMaxAggregateInputType + _max?: MapVoteStepMaxAggregateInputType } - export type GetMapVetoStepAggregateType = { - [P in keyof T & keyof AggregateMapVetoStep]: P extends '_count' | 'count' + export type GetMapVoteStepAggregateType = { + [P in keyof T & keyof AggregateMapVoteStep]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type MapVetoStepGroupByArgs = { - where?: MapVetoStepWhereInput - orderBy?: MapVetoStepOrderByWithAggregationInput | MapVetoStepOrderByWithAggregationInput[] - by: MapVetoStepScalarFieldEnum[] | MapVetoStepScalarFieldEnum - having?: MapVetoStepScalarWhereWithAggregatesInput + export type MapVoteStepGroupByArgs = { + where?: MapVoteStepWhereInput + orderBy?: MapVoteStepOrderByWithAggregationInput | MapVoteStepOrderByWithAggregationInput[] + by: MapVoteStepScalarFieldEnum[] | MapVoteStepScalarFieldEnum + having?: MapVoteStepScalarWhereWithAggregatesInput take?: number skip?: number - _count?: MapVetoStepCountAggregateInputType | true - _avg?: MapVetoStepAvgAggregateInputType - _sum?: MapVetoStepSumAggregateInputType - _min?: MapVetoStepMinAggregateInputType - _max?: MapVetoStepMaxAggregateInputType + _count?: MapVoteStepCountAggregateInputType | true + _avg?: MapVoteStepAvgAggregateInputType + _sum?: MapVoteStepSumAggregateInputType + _min?: MapVoteStepMinAggregateInputType + _max?: MapVoteStepMaxAggregateInputType } - export type MapVetoStepGroupByOutputType = { + export type MapVoteStepGroupByOutputType = { id: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId: string | null map: string | null chosenAt: Date | null chosenBy: string | null - _count: MapVetoStepCountAggregateOutputType | null - _avg: MapVetoStepAvgAggregateOutputType | null - _sum: MapVetoStepSumAggregateOutputType | null - _min: MapVetoStepMinAggregateOutputType | null - _max: MapVetoStepMaxAggregateOutputType | null + _count: MapVoteStepCountAggregateOutputType | null + _avg: MapVoteStepAvgAggregateOutputType | null + _sum: MapVoteStepSumAggregateOutputType | null + _min: MapVoteStepMinAggregateOutputType | null + _max: MapVoteStepMaxAggregateOutputType | null } - type GetMapVetoStepGroupByPayload = Prisma.PrismaPromise< + type GetMapVoteStepGroupByPayload = Prisma.PrismaPromise< Array< - PickEnumerable & + PickEnumerable & { - [P in ((keyof T) & (keyof MapVetoStepGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof MapVoteStepGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type MapVetoStepSelect = $Extensions.GetSelect<{ + export type MapVoteStepSelect = $Extensions.GetSelect<{ id?: boolean - vetoId?: boolean + voteId?: boolean order?: boolean action?: boolean teamId?: boolean map?: boolean chosenAt?: boolean chosenBy?: boolean - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs - }, ExtArgs["result"]["mapVetoStep"]> + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs + }, ExtArgs["result"]["mapVoteStep"]> - export type MapVetoStepSelectCreateManyAndReturn = $Extensions.GetSelect<{ + export type MapVoteStepSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean - vetoId?: boolean + voteId?: boolean order?: boolean action?: boolean teamId?: boolean map?: boolean chosenAt?: boolean chosenBy?: boolean - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs - }, ExtArgs["result"]["mapVetoStep"]> + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs + }, ExtArgs["result"]["mapVoteStep"]> - export type MapVetoStepSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + export type MapVoteStepSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean - vetoId?: boolean + voteId?: boolean order?: boolean action?: boolean teamId?: boolean map?: boolean chosenAt?: boolean chosenBy?: boolean - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs - }, ExtArgs["result"]["mapVetoStep"]> + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs + }, ExtArgs["result"]["mapVoteStep"]> - export type MapVetoStepSelectScalar = { + export type MapVoteStepSelectScalar = { id?: boolean - vetoId?: boolean + voteId?: boolean order?: boolean action?: boolean teamId?: boolean @@ -17597,169 +17597,169 @@ export namespace Prisma { chosenBy?: boolean } - export type MapVetoStepOmit = $Extensions.GetOmit<"id" | "vetoId" | "order" | "action" | "teamId" | "map" | "chosenAt" | "chosenBy", ExtArgs["result"]["mapVetoStep"]> - export type MapVetoStepInclude = { - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs + export type MapVoteStepOmit = $Extensions.GetOmit<"id" | "voteId" | "order" | "action" | "teamId" | "map" | "chosenAt" | "chosenBy", ExtArgs["result"]["mapVoteStep"]> + export type MapVoteStepInclude = { + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs } - export type MapVetoStepIncludeCreateManyAndReturn = { - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs + export type MapVoteStepIncludeCreateManyAndReturn = { + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs } - export type MapVetoStepIncludeUpdateManyAndReturn = { - team?: boolean | MapVetoStep$teamArgs - chooser?: boolean | MapVetoStep$chooserArgs - veto?: boolean | MapVetoDefaultArgs + export type MapVoteStepIncludeUpdateManyAndReturn = { + team?: boolean | MapVoteStep$teamArgs + chooser?: boolean | MapVoteStep$chooserArgs + vote?: boolean | MapVoteDefaultArgs } - export type $MapVetoStepPayload = { - name: "MapVetoStep" + export type $MapVoteStepPayload = { + name: "MapVoteStep" objects: { team: Prisma.$TeamPayload | null chooser: Prisma.$UserPayload | null - veto: Prisma.$MapVetoPayload + vote: Prisma.$MapVotePayload } scalars: $Extensions.GetPayloadResult<{ id: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId: string | null map: string | null chosenAt: Date | null chosenBy: string | null - }, ExtArgs["result"]["mapVetoStep"]> + }, ExtArgs["result"]["mapVoteStep"]> composites: {} } - type MapVetoStepGetPayload = $Result.GetResult + type MapVoteStepGetPayload = $Result.GetResult - type MapVetoStepCountArgs = - Omit & { - select?: MapVetoStepCountAggregateInputType | true + type MapVoteStepCountArgs = + Omit & { + select?: MapVoteStepCountAggregateInputType | true } - export interface MapVetoStepDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['MapVetoStep'], meta: { name: 'MapVetoStep' } } + export interface MapVoteStepDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MapVoteStep'], meta: { name: 'MapVoteStep' } } /** - * Find zero or one MapVetoStep that matches the filter. - * @param {MapVetoStepFindUniqueArgs} args - Arguments to find a MapVetoStep + * Find zero or one MapVoteStep that matches the filter. + * @param {MapVoteStepFindUniqueArgs} args - Arguments to find a MapVoteStep * @example - * // Get one MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.findUnique({ + * // Get one MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.findUnique({ * where: { * // ... provide filter here * } * }) */ - findUnique(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** - * Find one MapVetoStep that matches the filter or throw an error with `error.code='P2025'` + * Find one MapVoteStep that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {MapVetoStepFindUniqueOrThrowArgs} args - Arguments to find a MapVetoStep + * @param {MapVoteStepFindUniqueOrThrowArgs} args - Arguments to find a MapVoteStep * @example - * // Get one MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.findUniqueOrThrow({ + * // Get one MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ - findUniqueOrThrow(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Find the first MapVetoStep that matches the filter. + * Find the first MapVoteStep that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepFindFirstArgs} args - Arguments to find a MapVetoStep + * @param {MapVoteStepFindFirstArgs} args - Arguments to find a MapVoteStep * @example - * // Get one MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.findFirst({ + * // Get one MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.findFirst({ * where: { * // ... provide filter here * } * }) */ - findFirst(args?: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst(args?: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** - * Find the first MapVetoStep that matches the filter or + * Find the first MapVoteStep that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepFindFirstOrThrowArgs} args - Arguments to find a MapVetoStep + * @param {MapVoteStepFindFirstOrThrowArgs} args - Arguments to find a MapVoteStep * @example - * // Get one MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.findFirstOrThrow({ + * // Get one MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ - findFirstOrThrow(args?: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow(args?: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Find zero or more MapVetoSteps that matches the filter. + * Find zero or more MapVoteSteps that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepFindManyArgs} args - Arguments to filter and select certain fields only. + * @param {MapVoteStepFindManyArgs} args - Arguments to filter and select certain fields only. * @example - * // Get all MapVetoSteps - * const mapVetoSteps = await prisma.mapVetoStep.findMany() + * // Get all MapVoteSteps + * const mapVoteSteps = await prisma.mapVoteStep.findMany() * - * // Get first 10 MapVetoSteps - * const mapVetoSteps = await prisma.mapVetoStep.findMany({ take: 10 }) + * // Get first 10 MapVoteSteps + * const mapVoteSteps = await prisma.mapVoteStep.findMany({ take: 10 }) * * // Only select the `id` - * const mapVetoStepWithIdOnly = await prisma.mapVetoStep.findMany({ select: { id: true } }) + * const mapVoteStepWithIdOnly = await prisma.mapVoteStep.findMany({ select: { id: true } }) * */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** - * Create a MapVetoStep. - * @param {MapVetoStepCreateArgs} args - Arguments to create a MapVetoStep. + * Create a MapVoteStep. + * @param {MapVoteStepCreateArgs} args - Arguments to create a MapVoteStep. * @example - * // Create one MapVetoStep - * const MapVetoStep = await prisma.mapVetoStep.create({ + * // Create one MapVoteStep + * const MapVoteStep = await prisma.mapVoteStep.create({ * data: { - * // ... data to create a MapVetoStep + * // ... data to create a MapVoteStep * } * }) * */ - create(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Create many MapVetoSteps. - * @param {MapVetoStepCreateManyArgs} args - Arguments to create many MapVetoSteps. + * Create many MapVoteSteps. + * @param {MapVoteStepCreateManyArgs} args - Arguments to create many MapVoteSteps. * @example - * // Create many MapVetoSteps - * const mapVetoStep = await prisma.mapVetoStep.createMany({ + * // Create many MapVoteSteps + * const mapVoteStep = await prisma.mapVoteStep.createMany({ * data: [ * // ... provide data here * ] * }) * */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Create many MapVetoSteps and returns the data saved in the database. - * @param {MapVetoStepCreateManyAndReturnArgs} args - Arguments to create many MapVetoSteps. + * Create many MapVoteSteps and returns the data saved in the database. + * @param {MapVoteStepCreateManyAndReturnArgs} args - Arguments to create many MapVoteSteps. * @example - * // Create many MapVetoSteps - * const mapVetoStep = await prisma.mapVetoStep.createManyAndReturn({ + * // Create many MapVoteSteps + * const mapVoteStep = await prisma.mapVoteStep.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * - * // Create many MapVetoSteps and only return the `id` - * const mapVetoStepWithIdOnly = await prisma.mapVetoStep.createManyAndReturn({ + * // Create many MapVoteSteps and only return the `id` + * const mapVoteStepWithIdOnly = await prisma.mapVoteStep.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here @@ -17769,28 +17769,28 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> /** - * Delete a MapVetoStep. - * @param {MapVetoStepDeleteArgs} args - Arguments to delete one MapVetoStep. + * Delete a MapVoteStep. + * @param {MapVoteStepDeleteArgs} args - Arguments to delete one MapVoteStep. * @example - * // Delete one MapVetoStep - * const MapVetoStep = await prisma.mapVetoStep.delete({ + * // Delete one MapVoteStep + * const MapVoteStep = await prisma.mapVoteStep.delete({ * where: { - * // ... filter to delete one MapVetoStep + * // ... filter to delete one MapVoteStep * } * }) * */ - delete(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Update one MapVetoStep. - * @param {MapVetoStepUpdateArgs} args - Arguments to update one MapVetoStep. + * Update one MapVoteStep. + * @param {MapVoteStepUpdateArgs} args - Arguments to update one MapVoteStep. * @example - * // Update one MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.update({ + * // Update one MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.update({ * where: { * // ... provide filter here * }, @@ -17800,30 +17800,30 @@ export namespace Prisma { * }) * */ - update(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Delete zero or more MapVetoSteps. - * @param {MapVetoStepDeleteManyArgs} args - Arguments to filter MapVetoSteps to delete. + * Delete zero or more MapVoteSteps. + * @param {MapVoteStepDeleteManyArgs} args - Arguments to filter MapVoteSteps to delete. * @example - * // Delete a few MapVetoSteps - * const { count } = await prisma.mapVetoStep.deleteMany({ + * // Delete a few MapVoteSteps + * const { count } = await prisma.mapVoteStep.deleteMany({ * where: { * // ... provide filter here * } * }) * */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more MapVetoSteps. + * Update zero or more MapVoteSteps. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepUpdateManyArgs} args - Arguments to update one or more rows. + * @param {MapVoteStepUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many MapVetoSteps - * const mapVetoStep = await prisma.mapVetoStep.updateMany({ + * // Update many MapVoteSteps + * const mapVoteStep = await prisma.mapVoteStep.updateMany({ * where: { * // ... provide filter here * }, @@ -17833,14 +17833,14 @@ export namespace Prisma { * }) * */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more MapVetoSteps and returns the data updated in the database. - * @param {MapVetoStepUpdateManyAndReturnArgs} args - Arguments to update many MapVetoSteps. + * Update zero or more MapVoteSteps and returns the data updated in the database. + * @param {MapVoteStepUpdateManyAndReturnArgs} args - Arguments to update many MapVoteSteps. * @example - * // Update many MapVetoSteps - * const mapVetoStep = await prisma.mapVetoStep.updateManyAndReturn({ + * // Update many MapVoteSteps + * const mapVoteStep = await prisma.mapVoteStep.updateManyAndReturn({ * where: { * // ... provide filter here * }, @@ -17849,8 +17849,8 @@ export namespace Prisma { * ] * }) * - * // Update zero or more MapVetoSteps and only return the `id` - * const mapVetoStepWithIdOnly = await prisma.mapVetoStep.updateManyAndReturn({ + * // Update zero or more MapVoteSteps and only return the `id` + * const mapVoteStepWithIdOnly = await prisma.mapVoteStep.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here @@ -17863,56 +17863,56 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** - * Create or update one MapVetoStep. - * @param {MapVetoStepUpsertArgs} args - Arguments to update or create a MapVetoStep. + * Create or update one MapVoteStep. + * @param {MapVoteStepUpsertArgs} args - Arguments to update or create a MapVoteStep. * @example - * // Update or create a MapVetoStep - * const mapVetoStep = await prisma.mapVetoStep.upsert({ + * // Update or create a MapVoteStep + * const mapVoteStep = await prisma.mapVoteStep.upsert({ * create: { - * // ... data to create a MapVetoStep + * // ... data to create a MapVoteStep * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the MapVetoStep we want to update + * // ... the filter for the MapVoteStep we want to update * } * }) */ - upsert(args: SelectSubset>): Prisma__MapVetoStepClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + upsert(args: SelectSubset>): Prisma__MapVoteStepClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** - * Count the number of MapVetoSteps. + * Count the number of MapVoteSteps. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepCountArgs} args - Arguments to filter MapVetoSteps to count. + * @param {MapVoteStepCountArgs} args - Arguments to filter MapVoteSteps to count. * @example - * // Count the number of MapVetoSteps - * const count = await prisma.mapVetoStep.count({ + * // Count the number of MapVoteSteps + * const count = await prisma.mapVoteStep.count({ * where: { - * // ... the filter for the MapVetoSteps we want to count + * // ... the filter for the MapVoteSteps we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a MapVetoStep. + * Allows you to perform aggregations operations on a MapVoteStep. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {MapVoteStepAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -17932,13 +17932,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by MapVetoStep. + * Group by MapVoteStep. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {MapVetoStepGroupByArgs} args - Group by arguments. + * @param {MapVoteStepGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -17953,14 +17953,14 @@ export namespace Prisma { * **/ groupBy< - T extends MapVetoStepGroupByArgs, + T extends MapVoteStepGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: MapVetoStepGroupByArgs['orderBy'] } - : { orderBy?: MapVetoStepGroupByArgs['orderBy'] }, + ? { orderBy: MapVoteStepGroupByArgs['orderBy'] } + : { orderBy?: MapVoteStepGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, @@ -18009,24 +18009,24 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMapVetoStepGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMapVoteStepGroupByPayload : Prisma.PrismaPromise /** - * Fields of the MapVetoStep model + * Fields of the MapVoteStep model */ - readonly fields: MapVetoStepFieldRefs; + readonly fields: MapVoteStepFieldRefs; } /** - * The delegate class that acts as a "Promise-like" for MapVetoStep. + * The delegate class that acts as a "Promise-like" for MapVoteStep. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export interface Prisma__MapVetoStepClient extends Prisma.PrismaPromise { + export interface Prisma__MapVoteStepClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - team = {}>(args?: Subset>): Prisma__TeamClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - chooser = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - veto = {}>(args?: Subset>): Prisma__MapVetoClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + team = {}>(args?: Subset>): Prisma__TeamClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + chooser = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + vote = {}>(args?: Subset>): Prisma__MapVoteClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -18053,416 +18053,416 @@ export namespace Prisma { /** - * Fields of the MapVetoStep model + * Fields of the MapVoteStep model */ - interface MapVetoStepFieldRefs { - readonly id: FieldRef<"MapVetoStep", 'String'> - readonly vetoId: FieldRef<"MapVetoStep", 'String'> - readonly order: FieldRef<"MapVetoStep", 'Int'> - readonly action: FieldRef<"MapVetoStep", 'MapVetoAction'> - readonly teamId: FieldRef<"MapVetoStep", 'String'> - readonly map: FieldRef<"MapVetoStep", 'String'> - readonly chosenAt: FieldRef<"MapVetoStep", 'DateTime'> - readonly chosenBy: FieldRef<"MapVetoStep", 'String'> + interface MapVoteStepFieldRefs { + readonly id: FieldRef<"MapVoteStep", 'String'> + readonly voteId: FieldRef<"MapVoteStep", 'String'> + readonly order: FieldRef<"MapVoteStep", 'Int'> + readonly action: FieldRef<"MapVoteStep", 'MapVoteAction'> + readonly teamId: FieldRef<"MapVoteStep", 'String'> + readonly map: FieldRef<"MapVoteStep", 'String'> + readonly chosenAt: FieldRef<"MapVoteStep", 'DateTime'> + readonly chosenBy: FieldRef<"MapVoteStep", 'String'> } // Custom InputTypes /** - * MapVetoStep findUnique + * MapVoteStep findUnique */ - export type MapVetoStepFindUniqueArgs = { + export type MapVoteStepFindUniqueArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter, which MapVetoStep to fetch. + * Filter, which MapVoteStep to fetch. */ - where: MapVetoStepWhereUniqueInput + where: MapVoteStepWhereUniqueInput } /** - * MapVetoStep findUniqueOrThrow + * MapVoteStep findUniqueOrThrow */ - export type MapVetoStepFindUniqueOrThrowArgs = { + export type MapVoteStepFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter, which MapVetoStep to fetch. + * Filter, which MapVoteStep to fetch. */ - where: MapVetoStepWhereUniqueInput + where: MapVoteStepWhereUniqueInput } /** - * MapVetoStep findFirst + * MapVoteStep findFirst */ - export type MapVetoStepFindFirstArgs = { + export type MapVoteStepFindFirstArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter, which MapVetoStep to fetch. + * Filter, which MapVoteStep to fetch. */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetoSteps to fetch. + * Determine the order of MapVoteSteps to fetch. */ - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for MapVetoSteps. + * Sets the position for searching for MapVoteSteps. */ - cursor?: MapVetoStepWhereUniqueInput + cursor?: MapVoteStepWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetoSteps from the position of the cursor. + * Take `±n` MapVoteSteps from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetoSteps. + * Skip the first `n` MapVoteSteps. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of MapVetoSteps. + * Filter by unique combinations of MapVoteSteps. */ - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** - * MapVetoStep findFirstOrThrow + * MapVoteStep findFirstOrThrow */ - export type MapVetoStepFindFirstOrThrowArgs = { + export type MapVoteStepFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter, which MapVetoStep to fetch. + * Filter, which MapVoteStep to fetch. */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetoSteps to fetch. + * Determine the order of MapVoteSteps to fetch. */ - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for MapVetoSteps. + * Sets the position for searching for MapVoteSteps. */ - cursor?: MapVetoStepWhereUniqueInput + cursor?: MapVoteStepWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetoSteps from the position of the cursor. + * Take `±n` MapVoteSteps from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetoSteps. + * Skip the first `n` MapVoteSteps. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of MapVetoSteps. + * Filter by unique combinations of MapVoteSteps. */ - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** - * MapVetoStep findMany + * MapVoteStep findMany */ - export type MapVetoStepFindManyArgs = { + export type MapVoteStepFindManyArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter, which MapVetoSteps to fetch. + * Filter, which MapVoteSteps to fetch. */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of MapVetoSteps to fetch. + * Determine the order of MapVoteSteps to fetch. */ - orderBy?: MapVetoStepOrderByWithRelationInput | MapVetoStepOrderByWithRelationInput[] + orderBy?: MapVoteStepOrderByWithRelationInput | MapVoteStepOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing MapVetoSteps. + * Sets the position for listing MapVoteSteps. */ - cursor?: MapVetoStepWhereUniqueInput + cursor?: MapVoteStepWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` MapVetoSteps from the position of the cursor. + * Take `±n` MapVoteSteps from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Skip the first `n` MapVetoSteps. + * Skip the first `n` MapVoteSteps. */ skip?: number - distinct?: MapVetoStepScalarFieldEnum | MapVetoStepScalarFieldEnum[] + distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } /** - * MapVetoStep create + * MapVoteStep create */ - export type MapVetoStepCreateArgs = { + export type MapVoteStepCreateArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * The data needed to create a MapVetoStep. + * The data needed to create a MapVoteStep. */ - data: XOR + data: XOR } /** - * MapVetoStep createMany + * MapVoteStep createMany */ - export type MapVetoStepCreateManyArgs = { + export type MapVoteStepCreateManyArgs = { /** - * The data used to create many MapVetoSteps. + * The data used to create many MapVoteSteps. */ - data: MapVetoStepCreateManyInput | MapVetoStepCreateManyInput[] + data: MapVoteStepCreateManyInput | MapVoteStepCreateManyInput[] skipDuplicates?: boolean } /** - * MapVetoStep createManyAndReturn + * MapVoteStep createManyAndReturn */ - export type MapVetoStepCreateManyAndReturnArgs = { + export type MapVoteStepCreateManyAndReturnArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelectCreateManyAndReturn | null + select?: MapVoteStepSelectCreateManyAndReturn | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** - * The data used to create many MapVetoSteps. + * The data used to create many MapVoteSteps. */ - data: MapVetoStepCreateManyInput | MapVetoStepCreateManyInput[] + data: MapVoteStepCreateManyInput | MapVoteStepCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepIncludeCreateManyAndReturn | null + include?: MapVoteStepIncludeCreateManyAndReturn | null } /** - * MapVetoStep update + * MapVoteStep update */ - export type MapVetoStepUpdateArgs = { + export type MapVoteStepUpdateArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * The data needed to update a MapVetoStep. + * The data needed to update a MapVoteStep. */ - data: XOR + data: XOR /** - * Choose, which MapVetoStep to update. + * Choose, which MapVoteStep to update. */ - where: MapVetoStepWhereUniqueInput + where: MapVoteStepWhereUniqueInput } /** - * MapVetoStep updateMany + * MapVoteStep updateMany */ - export type MapVetoStepUpdateManyArgs = { + export type MapVoteStepUpdateManyArgs = { /** - * The data used to update MapVetoSteps. + * The data used to update MapVoteSteps. */ - data: XOR + data: XOR /** - * Filter which MapVetoSteps to update + * Filter which MapVoteSteps to update */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** - * Limit how many MapVetoSteps to update. + * Limit how many MapVoteSteps to update. */ limit?: number } /** - * MapVetoStep updateManyAndReturn + * MapVoteStep updateManyAndReturn */ - export type MapVetoStepUpdateManyAndReturnArgs = { + export type MapVoteStepUpdateManyAndReturnArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelectUpdateManyAndReturn | null + select?: MapVoteStepSelectUpdateManyAndReturn | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** - * The data used to update MapVetoSteps. + * The data used to update MapVoteSteps. */ - data: XOR + data: XOR /** - * Filter which MapVetoSteps to update + * Filter which MapVoteSteps to update */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** - * Limit how many MapVetoSteps to update. + * Limit how many MapVoteSteps to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepIncludeUpdateManyAndReturn | null + include?: MapVoteStepIncludeUpdateManyAndReturn | null } /** - * MapVetoStep upsert + * MapVoteStep upsert */ - export type MapVetoStepUpsertArgs = { + export type MapVoteStepUpsertArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * The filter to search for the MapVetoStep to update in case it exists. + * The filter to search for the MapVoteStep to update in case it exists. */ - where: MapVetoStepWhereUniqueInput + where: MapVoteStepWhereUniqueInput /** - * In case the MapVetoStep found by the `where` argument doesn't exist, create a new MapVetoStep with this data. + * In case the MapVoteStep found by the `where` argument doesn't exist, create a new MapVoteStep with this data. */ - create: XOR + create: XOR /** - * In case the MapVetoStep was found with the provided `where` argument, update it with this data. + * In case the MapVoteStep was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * MapVetoStep delete + * MapVoteStep delete */ - export type MapVetoStepDeleteArgs = { + export type MapVoteStepDeleteArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null /** - * Filter which MapVetoStep to delete. + * Filter which MapVoteStep to delete. */ - where: MapVetoStepWhereUniqueInput + where: MapVoteStepWhereUniqueInput } /** - * MapVetoStep deleteMany + * MapVoteStep deleteMany */ - export type MapVetoStepDeleteManyArgs = { + export type MapVoteStepDeleteManyArgs = { /** - * Filter which MapVetoSteps to delete + * Filter which MapVoteSteps to delete */ - where?: MapVetoStepWhereInput + where?: MapVoteStepWhereInput /** - * Limit how many MapVetoSteps to delete. + * Limit how many MapVoteSteps to delete. */ limit?: number } /** - * MapVetoStep.team + * MapVoteStep.team */ - export type MapVetoStep$teamArgs = { + export type MapVoteStep$teamArgs = { /** * Select specific fields to fetch from the Team */ @@ -18479,9 +18479,9 @@ export namespace Prisma { } /** - * MapVetoStep.chooser + * MapVoteStep.chooser */ - export type MapVetoStep$chooserArgs = { + export type MapVoteStep$chooserArgs = { /** * Select specific fields to fetch from the User */ @@ -18498,21 +18498,21 @@ export namespace Prisma { } /** - * MapVetoStep without action + * MapVoteStep without action */ - export type MapVetoStepDefaultArgs = { + export type MapVoteStepDefaultArgs = { /** - * Select specific fields to fetch from the MapVetoStep + * Select specific fields to fetch from the MapVoteStep */ - select?: MapVetoStepSelect | null + select?: MapVoteStepSelect | null /** - * Omit specific fields from the MapVetoStep + * Omit specific fields from the MapVoteStep */ - omit?: MapVetoStepOmit | null + omit?: MapVoteStepOmit | null /** * Choose, which related nodes to fetch as well */ - include?: MapVetoStepInclude | null + include?: MapVoteStepInclude | null } @@ -18719,7 +18719,7 @@ export namespace Prisma { export type ServerRequestScalarFieldEnum = (typeof ServerRequestScalarFieldEnum)[keyof typeof ServerRequestScalarFieldEnum] - export const MapVetoScalarFieldEnum: { + export const MapVoteScalarFieldEnum: { id: 'id', matchId: 'matchId', bestOf: 'bestOf', @@ -18727,16 +18727,18 @@ export namespace Prisma { currentIdx: 'currentIdx', locked: 'locked', opensAt: 'opensAt', + adminEditingBy: 'adminEditingBy', + adminEditingSince: 'adminEditingSince', createdAt: 'createdAt', updatedAt: 'updatedAt' }; - export type MapVetoScalarFieldEnum = (typeof MapVetoScalarFieldEnum)[keyof typeof MapVetoScalarFieldEnum] + export type MapVoteScalarFieldEnum = (typeof MapVoteScalarFieldEnum)[keyof typeof MapVoteScalarFieldEnum] - export const MapVetoStepScalarFieldEnum: { + export const MapVoteStepScalarFieldEnum: { id: 'id', - vetoId: 'vetoId', + voteId: 'voteId', order: 'order', action: 'action', teamId: 'teamId', @@ -18745,7 +18747,7 @@ export namespace Prisma { chosenBy: 'chosenBy' }; - export type MapVetoStepScalarFieldEnum = (typeof MapVetoStepScalarFieldEnum)[keyof typeof MapVetoStepScalarFieldEnum] + export type MapVoteStepScalarFieldEnum = (typeof MapVoteStepScalarFieldEnum)[keyof typeof MapVoteStepScalarFieldEnum] export const SortOrder: { @@ -18900,16 +18902,16 @@ export namespace Prisma { /** - * Reference to a field of type 'MapVetoAction' + * Reference to a field of type 'MapVoteAction' */ - export type EnumMapVetoActionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MapVetoAction'> + export type EnumMapVoteActionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MapVoteAction'> /** - * Reference to a field of type 'MapVetoAction[]' + * Reference to a field of type 'MapVoteAction[]' */ - export type ListEnumMapVetoActionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MapVetoAction[]'> + export type ListEnumMapVoteActionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MapVoteAction[]'> /** * Deep Input Types @@ -18943,7 +18945,7 @@ export namespace Prisma { demoFiles?: DemoFileListRelationFilter createdSchedules?: ScheduleListRelationFilter confirmedSchedules?: ScheduleListRelationFilter - mapVetoChoices?: MapVetoStepListRelationFilter + mapVoteChoices?: MapVoteStepListRelationFilter } export type UserOrderByWithRelationInput = { @@ -18970,7 +18972,7 @@ export namespace Prisma { demoFiles?: DemoFileOrderByRelationAggregateInput createdSchedules?: ScheduleOrderByRelationAggregateInput confirmedSchedules?: ScheduleOrderByRelationAggregateInput - mapVetoChoices?: MapVetoStepOrderByRelationAggregateInput + mapVoteChoices?: MapVoteStepOrderByRelationAggregateInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ @@ -19000,7 +19002,7 @@ export namespace Prisma { demoFiles?: DemoFileListRelationFilter createdSchedules?: ScheduleListRelationFilter confirmedSchedules?: ScheduleListRelationFilter - mapVetoChoices?: MapVetoStepListRelationFilter + mapVoteChoices?: MapVoteStepListRelationFilter }, "steamId"> export type UserOrderByWithAggregationInput = { @@ -19058,7 +19060,7 @@ export namespace Prisma { matchesAsTeamB?: MatchListRelationFilter schedulesAsTeamA?: ScheduleListRelationFilter schedulesAsTeamB?: ScheduleListRelationFilter - mapVetoSteps?: MapVetoStepListRelationFilter + mapVoteSteps?: MapVoteStepListRelationFilter } export type TeamOrderByWithRelationInput = { @@ -19077,7 +19079,7 @@ export namespace Prisma { matchesAsTeamB?: MatchOrderByRelationAggregateInput schedulesAsTeamA?: ScheduleOrderByRelationAggregateInput schedulesAsTeamB?: ScheduleOrderByRelationAggregateInput - mapVetoSteps?: MapVetoStepOrderByRelationAggregateInput + mapVoteSteps?: MapVoteStepOrderByRelationAggregateInput } export type TeamWhereUniqueInput = Prisma.AtLeast<{ @@ -19099,7 +19101,7 @@ export namespace Prisma { matchesAsTeamB?: MatchListRelationFilter schedulesAsTeamA?: ScheduleListRelationFilter schedulesAsTeamB?: ScheduleListRelationFilter - mapVetoSteps?: MapVetoStepListRelationFilter + mapVoteSteps?: MapVoteStepListRelationFilter }, "id" | "name" | "leaderId"> export type TeamOrderByWithAggregationInput = { @@ -19291,7 +19293,7 @@ export namespace Prisma { demoFile?: XOR | null players?: MatchPlayerListRelationFilter rankUpdates?: RankHistoryListRelationFilter - mapVeto?: XOR | null + mapVote?: XOR | null schedule?: XOR | null } @@ -19322,7 +19324,7 @@ export namespace Prisma { demoFile?: DemoFileOrderByWithRelationInput players?: MatchPlayerOrderByRelationAggregateInput rankUpdates?: RankHistoryOrderByRelationAggregateInput - mapVeto?: MapVetoOrderByWithRelationInput + mapVote?: MapVoteOrderByWithRelationInput schedule?: ScheduleOrderByWithRelationInput } @@ -19356,7 +19358,7 @@ export namespace Prisma { demoFile?: XOR | null players?: MatchPlayerListRelationFilter rankUpdates?: RankHistoryListRelationFilter - mapVeto?: XOR | null + mapVote?: XOR | null schedule?: XOR | null }, "id"> @@ -19988,24 +19990,26 @@ export namespace Prisma { createdAt?: DateTimeWithAggregatesFilter<"ServerRequest"> | Date | string } - export type MapVetoWhereInput = { - AND?: MapVetoWhereInput | MapVetoWhereInput[] - OR?: MapVetoWhereInput[] - NOT?: MapVetoWhereInput | MapVetoWhereInput[] - id?: StringFilter<"MapVeto"> | string - matchId?: StringFilter<"MapVeto"> | string - bestOf?: IntFilter<"MapVeto"> | number - mapPool?: StringNullableListFilter<"MapVeto"> - currentIdx?: IntFilter<"MapVeto"> | number - locked?: BoolFilter<"MapVeto"> | boolean - opensAt?: DateTimeNullableFilter<"MapVeto"> | Date | string | null - createdAt?: DateTimeFilter<"MapVeto"> | Date | string - updatedAt?: DateTimeFilter<"MapVeto"> | Date | string + export type MapVoteWhereInput = { + AND?: MapVoteWhereInput | MapVoteWhereInput[] + OR?: MapVoteWhereInput[] + NOT?: MapVoteWhereInput | MapVoteWhereInput[] + id?: StringFilter<"MapVote"> | string + matchId?: StringFilter<"MapVote"> | string + bestOf?: IntFilter<"MapVote"> | number + mapPool?: StringNullableListFilter<"MapVote"> + currentIdx?: IntFilter<"MapVote"> | number + locked?: BoolFilter<"MapVote"> | boolean + opensAt?: DateTimeNullableFilter<"MapVote"> | Date | string | null + adminEditingBy?: StringNullableFilter<"MapVote"> | string | null + adminEditingSince?: DateTimeNullableFilter<"MapVote"> | Date | string | null + createdAt?: DateTimeFilter<"MapVote"> | Date | string + updatedAt?: DateTimeFilter<"MapVote"> | Date | string match?: XOR - steps?: MapVetoStepListRelationFilter + steps?: MapVoteStepListRelationFilter } - export type MapVetoOrderByWithRelationInput = { + export type MapVoteOrderByWithRelationInput = { id?: SortOrder matchId?: SortOrder bestOf?: SortOrder @@ -20013,30 +20017,34 @@ export namespace Prisma { currentIdx?: SortOrder locked?: SortOrder opensAt?: SortOrderInput | SortOrder + adminEditingBy?: SortOrderInput | SortOrder + adminEditingSince?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder match?: MatchOrderByWithRelationInput - steps?: MapVetoStepOrderByRelationAggregateInput + steps?: MapVoteStepOrderByRelationAggregateInput } - export type MapVetoWhereUniqueInput = Prisma.AtLeast<{ + export type MapVoteWhereUniqueInput = Prisma.AtLeast<{ id?: string matchId?: string - AND?: MapVetoWhereInput | MapVetoWhereInput[] - OR?: MapVetoWhereInput[] - NOT?: MapVetoWhereInput | MapVetoWhereInput[] - bestOf?: IntFilter<"MapVeto"> | number - mapPool?: StringNullableListFilter<"MapVeto"> - currentIdx?: IntFilter<"MapVeto"> | number - locked?: BoolFilter<"MapVeto"> | boolean - opensAt?: DateTimeNullableFilter<"MapVeto"> | Date | string | null - createdAt?: DateTimeFilter<"MapVeto"> | Date | string - updatedAt?: DateTimeFilter<"MapVeto"> | Date | string + AND?: MapVoteWhereInput | MapVoteWhereInput[] + OR?: MapVoteWhereInput[] + NOT?: MapVoteWhereInput | MapVoteWhereInput[] + bestOf?: IntFilter<"MapVote"> | number + mapPool?: StringNullableListFilter<"MapVote"> + currentIdx?: IntFilter<"MapVote"> | number + locked?: BoolFilter<"MapVote"> | boolean + opensAt?: DateTimeNullableFilter<"MapVote"> | Date | string | null + adminEditingBy?: StringNullableFilter<"MapVote"> | string | null + adminEditingSince?: DateTimeNullableFilter<"MapVote"> | Date | string | null + createdAt?: DateTimeFilter<"MapVote"> | Date | string + updatedAt?: DateTimeFilter<"MapVote"> | Date | string match?: XOR - steps?: MapVetoStepListRelationFilter + steps?: MapVoteStepListRelationFilter }, "id" | "matchId"> - export type MapVetoOrderByWithAggregationInput = { + export type MapVoteOrderByWithAggregationInput = { id?: SortOrder matchId?: SortOrder bestOf?: SortOrder @@ -20044,50 +20052,54 @@ export namespace Prisma { currentIdx?: SortOrder locked?: SortOrder opensAt?: SortOrderInput | SortOrder + adminEditingBy?: SortOrderInput | SortOrder + adminEditingSince?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder - _count?: MapVetoCountOrderByAggregateInput - _avg?: MapVetoAvgOrderByAggregateInput - _max?: MapVetoMaxOrderByAggregateInput - _min?: MapVetoMinOrderByAggregateInput - _sum?: MapVetoSumOrderByAggregateInput + _count?: MapVoteCountOrderByAggregateInput + _avg?: MapVoteAvgOrderByAggregateInput + _max?: MapVoteMaxOrderByAggregateInput + _min?: MapVoteMinOrderByAggregateInput + _sum?: MapVoteSumOrderByAggregateInput } - export type MapVetoScalarWhereWithAggregatesInput = { - AND?: MapVetoScalarWhereWithAggregatesInput | MapVetoScalarWhereWithAggregatesInput[] - OR?: MapVetoScalarWhereWithAggregatesInput[] - NOT?: MapVetoScalarWhereWithAggregatesInput | MapVetoScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"MapVeto"> | string - matchId?: StringWithAggregatesFilter<"MapVeto"> | string - bestOf?: IntWithAggregatesFilter<"MapVeto"> | number - mapPool?: StringNullableListFilter<"MapVeto"> - currentIdx?: IntWithAggregatesFilter<"MapVeto"> | number - locked?: BoolWithAggregatesFilter<"MapVeto"> | boolean - opensAt?: DateTimeNullableWithAggregatesFilter<"MapVeto"> | Date | string | null - createdAt?: DateTimeWithAggregatesFilter<"MapVeto"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"MapVeto"> | Date | string + export type MapVoteScalarWhereWithAggregatesInput = { + AND?: MapVoteScalarWhereWithAggregatesInput | MapVoteScalarWhereWithAggregatesInput[] + OR?: MapVoteScalarWhereWithAggregatesInput[] + NOT?: MapVoteScalarWhereWithAggregatesInput | MapVoteScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"MapVote"> | string + matchId?: StringWithAggregatesFilter<"MapVote"> | string + bestOf?: IntWithAggregatesFilter<"MapVote"> | number + mapPool?: StringNullableListFilter<"MapVote"> + currentIdx?: IntWithAggregatesFilter<"MapVote"> | number + locked?: BoolWithAggregatesFilter<"MapVote"> | boolean + opensAt?: DateTimeNullableWithAggregatesFilter<"MapVote"> | Date | string | null + adminEditingBy?: StringNullableWithAggregatesFilter<"MapVote"> | string | null + adminEditingSince?: DateTimeNullableWithAggregatesFilter<"MapVote"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"MapVote"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"MapVote"> | Date | string } - export type MapVetoStepWhereInput = { - AND?: MapVetoStepWhereInput | MapVetoStepWhereInput[] - OR?: MapVetoStepWhereInput[] - NOT?: MapVetoStepWhereInput | MapVetoStepWhereInput[] - id?: StringFilter<"MapVetoStep"> | string - vetoId?: StringFilter<"MapVetoStep"> | string - order?: IntFilter<"MapVetoStep"> | number - action?: EnumMapVetoActionFilter<"MapVetoStep"> | $Enums.MapVetoAction - teamId?: StringNullableFilter<"MapVetoStep"> | string | null - map?: StringNullableFilter<"MapVetoStep"> | string | null - chosenAt?: DateTimeNullableFilter<"MapVetoStep"> | Date | string | null - chosenBy?: StringNullableFilter<"MapVetoStep"> | string | null + export type MapVoteStepWhereInput = { + AND?: MapVoteStepWhereInput | MapVoteStepWhereInput[] + OR?: MapVoteStepWhereInput[] + NOT?: MapVoteStepWhereInput | MapVoteStepWhereInput[] + id?: StringFilter<"MapVoteStep"> | string + voteId?: StringFilter<"MapVoteStep"> | string + order?: IntFilter<"MapVoteStep"> | number + action?: EnumMapVoteActionFilter<"MapVoteStep"> | $Enums.MapVoteAction + teamId?: StringNullableFilter<"MapVoteStep"> | string | null + map?: StringNullableFilter<"MapVoteStep"> | string | null + chosenAt?: DateTimeNullableFilter<"MapVoteStep"> | Date | string | null + chosenBy?: StringNullableFilter<"MapVoteStep"> | string | null team?: XOR | null chooser?: XOR | null - veto?: XOR + vote?: XOR } - export type MapVetoStepOrderByWithRelationInput = { + export type MapVoteStepOrderByWithRelationInput = { id?: SortOrder - vetoId?: SortOrder + voteId?: SortOrder order?: SortOrder action?: SortOrder teamId?: SortOrderInput | SortOrder @@ -20096,55 +20108,55 @@ export namespace Prisma { chosenBy?: SortOrderInput | SortOrder team?: TeamOrderByWithRelationInput chooser?: UserOrderByWithRelationInput - veto?: MapVetoOrderByWithRelationInput + vote?: MapVoteOrderByWithRelationInput } - export type MapVetoStepWhereUniqueInput = Prisma.AtLeast<{ + export type MapVoteStepWhereUniqueInput = Prisma.AtLeast<{ id?: string - vetoId_order?: MapVetoStepVetoIdOrderCompoundUniqueInput - AND?: MapVetoStepWhereInput | MapVetoStepWhereInput[] - OR?: MapVetoStepWhereInput[] - NOT?: MapVetoStepWhereInput | MapVetoStepWhereInput[] - vetoId?: StringFilter<"MapVetoStep"> | string - order?: IntFilter<"MapVetoStep"> | number - action?: EnumMapVetoActionFilter<"MapVetoStep"> | $Enums.MapVetoAction - teamId?: StringNullableFilter<"MapVetoStep"> | string | null - map?: StringNullableFilter<"MapVetoStep"> | string | null - chosenAt?: DateTimeNullableFilter<"MapVetoStep"> | Date | string | null - chosenBy?: StringNullableFilter<"MapVetoStep"> | string | null + voteId_order?: MapVoteStepVoteIdOrderCompoundUniqueInput + AND?: MapVoteStepWhereInput | MapVoteStepWhereInput[] + OR?: MapVoteStepWhereInput[] + NOT?: MapVoteStepWhereInput | MapVoteStepWhereInput[] + voteId?: StringFilter<"MapVoteStep"> | string + order?: IntFilter<"MapVoteStep"> | number + action?: EnumMapVoteActionFilter<"MapVoteStep"> | $Enums.MapVoteAction + teamId?: StringNullableFilter<"MapVoteStep"> | string | null + map?: StringNullableFilter<"MapVoteStep"> | string | null + chosenAt?: DateTimeNullableFilter<"MapVoteStep"> | Date | string | null + chosenBy?: StringNullableFilter<"MapVoteStep"> | string | null team?: XOR | null chooser?: XOR | null - veto?: XOR - }, "id" | "vetoId_order"> + vote?: XOR + }, "id" | "voteId_order"> - export type MapVetoStepOrderByWithAggregationInput = { + export type MapVoteStepOrderByWithAggregationInput = { id?: SortOrder - vetoId?: SortOrder + voteId?: SortOrder order?: SortOrder action?: SortOrder teamId?: SortOrderInput | SortOrder map?: SortOrderInput | SortOrder chosenAt?: SortOrderInput | SortOrder chosenBy?: SortOrderInput | SortOrder - _count?: MapVetoStepCountOrderByAggregateInput - _avg?: MapVetoStepAvgOrderByAggregateInput - _max?: MapVetoStepMaxOrderByAggregateInput - _min?: MapVetoStepMinOrderByAggregateInput - _sum?: MapVetoStepSumOrderByAggregateInput + _count?: MapVoteStepCountOrderByAggregateInput + _avg?: MapVoteStepAvgOrderByAggregateInput + _max?: MapVoteStepMaxOrderByAggregateInput + _min?: MapVoteStepMinOrderByAggregateInput + _sum?: MapVoteStepSumOrderByAggregateInput } - export type MapVetoStepScalarWhereWithAggregatesInput = { - AND?: MapVetoStepScalarWhereWithAggregatesInput | MapVetoStepScalarWhereWithAggregatesInput[] - OR?: MapVetoStepScalarWhereWithAggregatesInput[] - NOT?: MapVetoStepScalarWhereWithAggregatesInput | MapVetoStepScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"MapVetoStep"> | string - vetoId?: StringWithAggregatesFilter<"MapVetoStep"> | string - order?: IntWithAggregatesFilter<"MapVetoStep"> | number - action?: EnumMapVetoActionWithAggregatesFilter<"MapVetoStep"> | $Enums.MapVetoAction - teamId?: StringNullableWithAggregatesFilter<"MapVetoStep"> | string | null - map?: StringNullableWithAggregatesFilter<"MapVetoStep"> | string | null - chosenAt?: DateTimeNullableWithAggregatesFilter<"MapVetoStep"> | Date | string | null - chosenBy?: StringNullableWithAggregatesFilter<"MapVetoStep"> | string | null + export type MapVoteStepScalarWhereWithAggregatesInput = { + AND?: MapVoteStepScalarWhereWithAggregatesInput | MapVoteStepScalarWhereWithAggregatesInput[] + OR?: MapVoteStepScalarWhereWithAggregatesInput[] + NOT?: MapVoteStepScalarWhereWithAggregatesInput | MapVoteStepScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"MapVoteStep"> | string + voteId?: StringWithAggregatesFilter<"MapVoteStep"> | string + order?: IntWithAggregatesFilter<"MapVoteStep"> | number + action?: EnumMapVoteActionWithAggregatesFilter<"MapVoteStep"> | $Enums.MapVoteAction + teamId?: StringNullableWithAggregatesFilter<"MapVoteStep"> | string | null + map?: StringNullableWithAggregatesFilter<"MapVoteStep"> | string | null + chosenAt?: DateTimeNullableWithAggregatesFilter<"MapVoteStep"> | Date | string | null + chosenBy?: StringNullableWithAggregatesFilter<"MapVoteStep"> | string | null } export type UserCreateInput = { @@ -20170,7 +20182,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateInput = { @@ -20196,7 +20208,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserUpdateInput = { @@ -20222,7 +20234,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateInput = { @@ -20248,7 +20260,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserCreateManyInput = { @@ -20307,7 +20319,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateInput = { @@ -20325,7 +20337,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamUpdateInput = { @@ -20343,7 +20355,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateInput = { @@ -20361,7 +20373,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type TeamCreateManyInput = { @@ -20555,7 +20567,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -20584,7 +20596,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -20613,7 +20625,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -20642,7 +20654,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -21327,161 +21339,175 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoCreateInput = { + export type MapVoteCreateInput = { id?: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - match: MatchCreateNestedOneWithoutMapVetoInput - steps?: MapVetoStepCreateNestedManyWithoutVetoInput + match: MatchCreateNestedOneWithoutMapVoteInput + steps?: MapVoteStepCreateNestedManyWithoutVoteInput } - export type MapVetoUncheckedCreateInput = { + export type MapVoteUncheckedCreateInput = { id?: string matchId: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - steps?: MapVetoStepUncheckedCreateNestedManyWithoutVetoInput + steps?: MapVoteStepUncheckedCreateNestedManyWithoutVoteInput } - export type MapVetoUpdateInput = { + export type MapVoteUpdateInput = { id?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - match?: MatchUpdateOneRequiredWithoutMapVetoNestedInput - steps?: MapVetoStepUpdateManyWithoutVetoNestedInput + match?: MatchUpdateOneRequiredWithoutMapVoteNestedInput + steps?: MapVoteStepUpdateManyWithoutVoteNestedInput } - export type MapVetoUncheckedUpdateInput = { + export type MapVoteUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string matchId?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - steps?: MapVetoStepUncheckedUpdateManyWithoutVetoNestedInput + steps?: MapVoteStepUncheckedUpdateManyWithoutVoteNestedInput } - export type MapVetoCreateManyInput = { + export type MapVoteCreateManyInput = { id?: string matchId: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string } - export type MapVetoUpdateManyMutationInput = { + export type MapVoteUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoUncheckedUpdateManyInput = { + export type MapVoteUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string matchId?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoStepCreateInput = { + export type MapVoteStepCreateInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null - team?: TeamCreateNestedOneWithoutMapVetoStepsInput - chooser?: UserCreateNestedOneWithoutMapVetoChoicesInput - veto: MapVetoCreateNestedOneWithoutStepsInput + team?: TeamCreateNestedOneWithoutMapVoteStepsInput + chooser?: UserCreateNestedOneWithoutMapVoteChoicesInput + vote: MapVoteCreateNestedOneWithoutStepsInput } - export type MapVetoStepUncheckedCreateInput = { + export type MapVoteStepUncheckedCreateInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null chosenBy?: string | null } - export type MapVetoStepUpdateInput = { + export type MapVoteStepUpdateInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - team?: TeamUpdateOneWithoutMapVetoStepsNestedInput - chooser?: UserUpdateOneWithoutMapVetoChoicesNestedInput - veto?: MapVetoUpdateOneRequiredWithoutStepsNestedInput + team?: TeamUpdateOneWithoutMapVoteStepsNestedInput + chooser?: UserUpdateOneWithoutMapVoteChoicesNestedInput + vote?: MapVoteUpdateOneRequiredWithoutStepsNestedInput } - export type MapVetoStepUncheckedUpdateInput = { + export type MapVoteStepUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null chosenBy?: NullableStringFieldUpdateOperationsInput | string | null } - export type MapVetoStepCreateManyInput = { + export type MapVoteStepCreateManyInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null chosenBy?: string | null } - export type MapVetoStepUpdateManyMutationInput = { + export type MapVoteStepUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } - export type MapVetoStepUncheckedUpdateManyInput = { + export type MapVoteStepUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null @@ -21609,10 +21635,10 @@ export namespace Prisma { none?: ScheduleWhereInput } - export type MapVetoStepListRelationFilter = { - every?: MapVetoStepWhereInput - some?: MapVetoStepWhereInput - none?: MapVetoStepWhereInput + export type MapVoteStepListRelationFilter = { + every?: MapVoteStepWhereInput + some?: MapVoteStepWhereInput + none?: MapVoteStepWhereInput } export type SortOrderInput = { @@ -21652,7 +21678,7 @@ export namespace Prisma { _count?: SortOrder } - export type MapVetoStepOrderByRelationAggregateInput = { + export type MapVoteStepOrderByRelationAggregateInput = { _count?: SortOrder } @@ -21952,9 +21978,9 @@ export namespace Prisma { isNot?: DemoFileWhereInput | null } - export type MapVetoNullableScalarRelationFilter = { - is?: MapVetoWhereInput | null - isNot?: MapVetoWhereInput | null + export type MapVoteNullableScalarRelationFilter = { + is?: MapVoteWhereInput | null + isNot?: MapVoteWhereInput | null } export type ScheduleNullableScalarRelationFilter = { @@ -22542,7 +22568,7 @@ export namespace Prisma { _max?: NestedBigIntFilter<$PrismaModel> } - export type MapVetoCountOrderByAggregateInput = { + export type MapVoteCountOrderByAggregateInput = { id?: SortOrder matchId?: SortOrder bestOf?: SortOrder @@ -22550,62 +22576,68 @@ export namespace Prisma { currentIdx?: SortOrder locked?: SortOrder opensAt?: SortOrder + adminEditingBy?: SortOrder + adminEditingSince?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } - export type MapVetoAvgOrderByAggregateInput = { + export type MapVoteAvgOrderByAggregateInput = { bestOf?: SortOrder currentIdx?: SortOrder } - export type MapVetoMaxOrderByAggregateInput = { + export type MapVoteMaxOrderByAggregateInput = { id?: SortOrder matchId?: SortOrder bestOf?: SortOrder currentIdx?: SortOrder locked?: SortOrder opensAt?: SortOrder + adminEditingBy?: SortOrder + adminEditingSince?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } - export type MapVetoMinOrderByAggregateInput = { + export type MapVoteMinOrderByAggregateInput = { id?: SortOrder matchId?: SortOrder bestOf?: SortOrder currentIdx?: SortOrder locked?: SortOrder opensAt?: SortOrder + adminEditingBy?: SortOrder + adminEditingSince?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } - export type MapVetoSumOrderByAggregateInput = { + export type MapVoteSumOrderByAggregateInput = { bestOf?: SortOrder currentIdx?: SortOrder } - export type EnumMapVetoActionFilter<$PrismaModel = never> = { - equals?: $Enums.MapVetoAction | EnumMapVetoActionFieldRefInput<$PrismaModel> - in?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - notIn?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - not?: NestedEnumMapVetoActionFilter<$PrismaModel> | $Enums.MapVetoAction + export type EnumMapVoteActionFilter<$PrismaModel = never> = { + equals?: $Enums.MapVoteAction | EnumMapVoteActionFieldRefInput<$PrismaModel> + in?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + notIn?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + not?: NestedEnumMapVoteActionFilter<$PrismaModel> | $Enums.MapVoteAction } - export type MapVetoScalarRelationFilter = { - is?: MapVetoWhereInput - isNot?: MapVetoWhereInput + export type MapVoteScalarRelationFilter = { + is?: MapVoteWhereInput + isNot?: MapVoteWhereInput } - export type MapVetoStepVetoIdOrderCompoundUniqueInput = { - vetoId: string + export type MapVoteStepVoteIdOrderCompoundUniqueInput = { + voteId: string order: number } - export type MapVetoStepCountOrderByAggregateInput = { + export type MapVoteStepCountOrderByAggregateInput = { id?: SortOrder - vetoId?: SortOrder + voteId?: SortOrder order?: SortOrder action?: SortOrder teamId?: SortOrder @@ -22614,13 +22646,13 @@ export namespace Prisma { chosenBy?: SortOrder } - export type MapVetoStepAvgOrderByAggregateInput = { + export type MapVoteStepAvgOrderByAggregateInput = { order?: SortOrder } - export type MapVetoStepMaxOrderByAggregateInput = { + export type MapVoteStepMaxOrderByAggregateInput = { id?: SortOrder - vetoId?: SortOrder + voteId?: SortOrder order?: SortOrder action?: SortOrder teamId?: SortOrder @@ -22629,9 +22661,9 @@ export namespace Prisma { chosenBy?: SortOrder } - export type MapVetoStepMinOrderByAggregateInput = { + export type MapVoteStepMinOrderByAggregateInput = { id?: SortOrder - vetoId?: SortOrder + voteId?: SortOrder order?: SortOrder action?: SortOrder teamId?: SortOrder @@ -22640,18 +22672,18 @@ export namespace Prisma { chosenBy?: SortOrder } - export type MapVetoStepSumOrderByAggregateInput = { + export type MapVoteStepSumOrderByAggregateInput = { order?: SortOrder } - export type EnumMapVetoActionWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MapVetoAction | EnumMapVetoActionFieldRefInput<$PrismaModel> - in?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - notIn?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - not?: NestedEnumMapVetoActionWithAggregatesFilter<$PrismaModel> | $Enums.MapVetoAction + export type EnumMapVoteActionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MapVoteAction | EnumMapVoteActionFieldRefInput<$PrismaModel> + in?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + notIn?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + not?: NestedEnumMapVoteActionWithAggregatesFilter<$PrismaModel> | $Enums.MapVoteAction _count?: NestedIntFilter<$PrismaModel> - _min?: NestedEnumMapVetoActionFilter<$PrismaModel> - _max?: NestedEnumMapVetoActionFilter<$PrismaModel> + _min?: NestedEnumMapVoteActionFilter<$PrismaModel> + _max?: NestedEnumMapVoteActionFilter<$PrismaModel> } export type TeamCreateNestedOneWithoutMembersInput = { @@ -22734,11 +22766,11 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput | ScheduleWhereUniqueInput[] } - export type MapVetoStepCreateNestedManyWithoutChooserInput = { - create?: XOR | MapVetoStepCreateWithoutChooserInput[] | MapVetoStepUncheckedCreateWithoutChooserInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutChooserInput | MapVetoStepCreateOrConnectWithoutChooserInput[] - createMany?: MapVetoStepCreateManyChooserInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepCreateNestedManyWithoutChooserInput = { + create?: XOR | MapVoteStepCreateWithoutChooserInput[] | MapVoteStepUncheckedCreateWithoutChooserInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutChooserInput | MapVoteStepCreateOrConnectWithoutChooserInput[] + createMany?: MapVoteStepCreateManyChooserInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } export type TeamUncheckedCreateNestedOneWithoutLeaderInput = { @@ -22815,11 +22847,11 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput | ScheduleWhereUniqueInput[] } - export type MapVetoStepUncheckedCreateNestedManyWithoutChooserInput = { - create?: XOR | MapVetoStepCreateWithoutChooserInput[] | MapVetoStepUncheckedCreateWithoutChooserInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutChooserInput | MapVetoStepCreateOrConnectWithoutChooserInput[] - createMany?: MapVetoStepCreateManyChooserInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepUncheckedCreateNestedManyWithoutChooserInput = { + create?: XOR | MapVoteStepCreateWithoutChooserInput[] | MapVoteStepUncheckedCreateWithoutChooserInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutChooserInput | MapVoteStepCreateOrConnectWithoutChooserInput[] + createMany?: MapVoteStepCreateManyChooserInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } export type StringFieldUpdateOperationsInput = { @@ -23008,18 +23040,18 @@ export namespace Prisma { deleteMany?: ScheduleScalarWhereInput | ScheduleScalarWhereInput[] } - export type MapVetoStepUpdateManyWithoutChooserNestedInput = { - create?: XOR | MapVetoStepCreateWithoutChooserInput[] | MapVetoStepUncheckedCreateWithoutChooserInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutChooserInput | MapVetoStepCreateOrConnectWithoutChooserInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutChooserInput | MapVetoStepUpsertWithWhereUniqueWithoutChooserInput[] - createMany?: MapVetoStepCreateManyChooserInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutChooserInput | MapVetoStepUpdateWithWhereUniqueWithoutChooserInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutChooserInput | MapVetoStepUpdateManyWithWhereWithoutChooserInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUpdateManyWithoutChooserNestedInput = { + create?: XOR | MapVoteStepCreateWithoutChooserInput[] | MapVoteStepUncheckedCreateWithoutChooserInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutChooserInput | MapVoteStepCreateOrConnectWithoutChooserInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutChooserInput | MapVoteStepUpsertWithWhereUniqueWithoutChooserInput[] + createMany?: MapVoteStepCreateManyChooserInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutChooserInput | MapVoteStepUpdateWithWhereUniqueWithoutChooserInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutChooserInput | MapVoteStepUpdateManyWithWhereWithoutChooserInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } export type TeamUncheckedUpdateOneWithoutLeaderNestedInput = { @@ -23170,18 +23202,18 @@ export namespace Prisma { deleteMany?: ScheduleScalarWhereInput | ScheduleScalarWhereInput[] } - export type MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput = { - create?: XOR | MapVetoStepCreateWithoutChooserInput[] | MapVetoStepUncheckedCreateWithoutChooserInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutChooserInput | MapVetoStepCreateOrConnectWithoutChooserInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutChooserInput | MapVetoStepUpsertWithWhereUniqueWithoutChooserInput[] - createMany?: MapVetoStepCreateManyChooserInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutChooserInput | MapVetoStepUpdateWithWhereUniqueWithoutChooserInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutChooserInput | MapVetoStepUpdateManyWithWhereWithoutChooserInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput = { + create?: XOR | MapVoteStepCreateWithoutChooserInput[] | MapVoteStepUncheckedCreateWithoutChooserInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutChooserInput | MapVoteStepCreateOrConnectWithoutChooserInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutChooserInput | MapVoteStepUpsertWithWhereUniqueWithoutChooserInput[] + createMany?: MapVoteStepCreateManyChooserInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutChooserInput | MapVoteStepUpdateWithWhereUniqueWithoutChooserInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutChooserInput | MapVoteStepUpdateManyWithWhereWithoutChooserInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } export type TeamCreateactivePlayersInput = { @@ -23247,11 +23279,11 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput | ScheduleWhereUniqueInput[] } - export type MapVetoStepCreateNestedManyWithoutTeamInput = { - create?: XOR | MapVetoStepCreateWithoutTeamInput[] | MapVetoStepUncheckedCreateWithoutTeamInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutTeamInput | MapVetoStepCreateOrConnectWithoutTeamInput[] - createMany?: MapVetoStepCreateManyTeamInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepCreateNestedManyWithoutTeamInput = { + create?: XOR | MapVoteStepCreateWithoutTeamInput[] | MapVoteStepUncheckedCreateWithoutTeamInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutTeamInput | MapVoteStepCreateOrConnectWithoutTeamInput[] + createMany?: MapVoteStepCreateManyTeamInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } export type UserUncheckedCreateNestedManyWithoutTeamInput = { @@ -23303,11 +23335,11 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput | ScheduleWhereUniqueInput[] } - export type MapVetoStepUncheckedCreateNestedManyWithoutTeamInput = { - create?: XOR | MapVetoStepCreateWithoutTeamInput[] | MapVetoStepUncheckedCreateWithoutTeamInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutTeamInput | MapVetoStepCreateOrConnectWithoutTeamInput[] - createMany?: MapVetoStepCreateManyTeamInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepUncheckedCreateNestedManyWithoutTeamInput = { + create?: XOR | MapVoteStepCreateWithoutTeamInput[] | MapVoteStepUncheckedCreateWithoutTeamInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutTeamInput | MapVoteStepCreateOrConnectWithoutTeamInput[] + createMany?: MapVoteStepCreateManyTeamInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } export type TeamUpdateactivePlayersInput = { @@ -23428,18 +23460,18 @@ export namespace Prisma { deleteMany?: ScheduleScalarWhereInput | ScheduleScalarWhereInput[] } - export type MapVetoStepUpdateManyWithoutTeamNestedInput = { - create?: XOR | MapVetoStepCreateWithoutTeamInput[] | MapVetoStepUncheckedCreateWithoutTeamInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutTeamInput | MapVetoStepCreateOrConnectWithoutTeamInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutTeamInput | MapVetoStepUpsertWithWhereUniqueWithoutTeamInput[] - createMany?: MapVetoStepCreateManyTeamInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutTeamInput | MapVetoStepUpdateWithWhereUniqueWithoutTeamInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutTeamInput | MapVetoStepUpdateManyWithWhereWithoutTeamInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUpdateManyWithoutTeamNestedInput = { + create?: XOR | MapVoteStepCreateWithoutTeamInput[] | MapVoteStepUncheckedCreateWithoutTeamInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutTeamInput | MapVoteStepCreateOrConnectWithoutTeamInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutTeamInput | MapVoteStepUpsertWithWhereUniqueWithoutTeamInput[] + createMany?: MapVoteStepCreateManyTeamInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutTeamInput | MapVoteStepUpdateWithWhereUniqueWithoutTeamInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutTeamInput | MapVoteStepUpdateManyWithWhereWithoutTeamInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } export type UserUncheckedUpdateManyWithoutTeamNestedInput = { @@ -23540,18 +23572,18 @@ export namespace Prisma { deleteMany?: ScheduleScalarWhereInput | ScheduleScalarWhereInput[] } - export type MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput = { - create?: XOR | MapVetoStepCreateWithoutTeamInput[] | MapVetoStepUncheckedCreateWithoutTeamInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutTeamInput | MapVetoStepCreateOrConnectWithoutTeamInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutTeamInput | MapVetoStepUpsertWithWhereUniqueWithoutTeamInput[] - createMany?: MapVetoStepCreateManyTeamInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutTeamInput | MapVetoStepUpdateWithWhereUniqueWithoutTeamInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutTeamInput | MapVetoStepUpdateManyWithWhereWithoutTeamInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput = { + create?: XOR | MapVoteStepCreateWithoutTeamInput[] | MapVoteStepUncheckedCreateWithoutTeamInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutTeamInput | MapVoteStepCreateOrConnectWithoutTeamInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutTeamInput | MapVoteStepUpsertWithWhereUniqueWithoutTeamInput[] + createMany?: MapVoteStepCreateManyTeamInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutTeamInput | MapVoteStepUpdateWithWhereUniqueWithoutTeamInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutTeamInput | MapVoteStepUpdateManyWithWhereWithoutTeamInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } export type UserCreateNestedOneWithoutInvitesInput = { @@ -23640,10 +23672,10 @@ export namespace Prisma { connect?: RankHistoryWhereUniqueInput | RankHistoryWhereUniqueInput[] } - export type MapVetoCreateNestedOneWithoutMatchInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutMatchInput - connect?: MapVetoWhereUniqueInput + export type MapVoteCreateNestedOneWithoutMatchInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutMatchInput + connect?: MapVoteWhereUniqueInput } export type ScheduleCreateNestedOneWithoutLinkedMatchInput = { @@ -23684,10 +23716,10 @@ export namespace Prisma { connect?: RankHistoryWhereUniqueInput | RankHistoryWhereUniqueInput[] } - export type MapVetoUncheckedCreateNestedOneWithoutMatchInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutMatchInput - connect?: MapVetoWhereUniqueInput + export type MapVoteUncheckedCreateNestedOneWithoutMatchInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutMatchInput + connect?: MapVoteWhereUniqueInput } export type ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput = { @@ -23788,14 +23820,14 @@ export namespace Prisma { deleteMany?: RankHistoryScalarWhereInput | RankHistoryScalarWhereInput[] } - export type MapVetoUpdateOneWithoutMatchNestedInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutMatchInput - upsert?: MapVetoUpsertWithoutMatchInput - disconnect?: MapVetoWhereInput | boolean - delete?: MapVetoWhereInput | boolean - connect?: MapVetoWhereUniqueInput - update?: XOR, MapVetoUncheckedUpdateWithoutMatchInput> + export type MapVoteUpdateOneWithoutMatchNestedInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutMatchInput + upsert?: MapVoteUpsertWithoutMatchInput + disconnect?: MapVoteWhereInput | boolean + delete?: MapVoteWhereInput | boolean + connect?: MapVoteWhereUniqueInput + update?: XOR, MapVoteUncheckedUpdateWithoutMatchInput> } export type ScheduleUpdateOneWithoutLinkedMatchNestedInput = { @@ -23872,14 +23904,14 @@ export namespace Prisma { deleteMany?: RankHistoryScalarWhereInput | RankHistoryScalarWhereInput[] } - export type MapVetoUncheckedUpdateOneWithoutMatchNestedInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutMatchInput - upsert?: MapVetoUpsertWithoutMatchInput - disconnect?: MapVetoWhereInput | boolean - delete?: MapVetoWhereInput | boolean - connect?: MapVetoWhereUniqueInput - update?: XOR, MapVetoUncheckedUpdateWithoutMatchInput> + export type MapVoteUncheckedUpdateOneWithoutMatchNestedInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutMatchInput + upsert?: MapVoteUpsertWithoutMatchInput + disconnect?: MapVoteWhereInput | boolean + delete?: MapVoteWhereInput | boolean + connect?: MapVoteWhereUniqueInput + update?: XOR, MapVoteUncheckedUpdateWithoutMatchInput> } export type ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput = { @@ -24152,119 +24184,119 @@ export namespace Prisma { update?: XOR, UserUncheckedUpdateWithoutServerRequestsInput> } - export type MapVetoCreatemapPoolInput = { + export type MapVoteCreatemapPoolInput = { set: string[] } - export type MatchCreateNestedOneWithoutMapVetoInput = { - create?: XOR - connectOrCreate?: MatchCreateOrConnectWithoutMapVetoInput + export type MatchCreateNestedOneWithoutMapVoteInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutMapVoteInput connect?: MatchWhereUniqueInput } - export type MapVetoStepCreateNestedManyWithoutVetoInput = { - create?: XOR | MapVetoStepCreateWithoutVetoInput[] | MapVetoStepUncheckedCreateWithoutVetoInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutVetoInput | MapVetoStepCreateOrConnectWithoutVetoInput[] - createMany?: MapVetoStepCreateManyVetoInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepCreateNestedManyWithoutVoteInput = { + create?: XOR | MapVoteStepCreateWithoutVoteInput[] | MapVoteStepUncheckedCreateWithoutVoteInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutVoteInput | MapVoteStepCreateOrConnectWithoutVoteInput[] + createMany?: MapVoteStepCreateManyVoteInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } - export type MapVetoStepUncheckedCreateNestedManyWithoutVetoInput = { - create?: XOR | MapVetoStepCreateWithoutVetoInput[] | MapVetoStepUncheckedCreateWithoutVetoInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutVetoInput | MapVetoStepCreateOrConnectWithoutVetoInput[] - createMany?: MapVetoStepCreateManyVetoInputEnvelope - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] + export type MapVoteStepUncheckedCreateNestedManyWithoutVoteInput = { + create?: XOR | MapVoteStepCreateWithoutVoteInput[] | MapVoteStepUncheckedCreateWithoutVoteInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutVoteInput | MapVoteStepCreateOrConnectWithoutVoteInput[] + createMany?: MapVoteStepCreateManyVoteInputEnvelope + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } - export type MapVetoUpdatemapPoolInput = { + export type MapVoteUpdatemapPoolInput = { set?: string[] push?: string | string[] } - export type MatchUpdateOneRequiredWithoutMapVetoNestedInput = { - create?: XOR - connectOrCreate?: MatchCreateOrConnectWithoutMapVetoInput - upsert?: MatchUpsertWithoutMapVetoInput + export type MatchUpdateOneRequiredWithoutMapVoteNestedInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutMapVoteInput + upsert?: MatchUpsertWithoutMapVoteInput connect?: MatchWhereUniqueInput - update?: XOR, MatchUncheckedUpdateWithoutMapVetoInput> + update?: XOR, MatchUncheckedUpdateWithoutMapVoteInput> } - export type MapVetoStepUpdateManyWithoutVetoNestedInput = { - create?: XOR | MapVetoStepCreateWithoutVetoInput[] | MapVetoStepUncheckedCreateWithoutVetoInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutVetoInput | MapVetoStepCreateOrConnectWithoutVetoInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutVetoInput | MapVetoStepUpsertWithWhereUniqueWithoutVetoInput[] - createMany?: MapVetoStepCreateManyVetoInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutVetoInput | MapVetoStepUpdateWithWhereUniqueWithoutVetoInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutVetoInput | MapVetoStepUpdateManyWithWhereWithoutVetoInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUpdateManyWithoutVoteNestedInput = { + create?: XOR | MapVoteStepCreateWithoutVoteInput[] | MapVoteStepUncheckedCreateWithoutVoteInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutVoteInput | MapVoteStepCreateOrConnectWithoutVoteInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutVoteInput | MapVoteStepUpsertWithWhereUniqueWithoutVoteInput[] + createMany?: MapVoteStepCreateManyVoteInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutVoteInput | MapVoteStepUpdateWithWhereUniqueWithoutVoteInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutVoteInput | MapVoteStepUpdateManyWithWhereWithoutVoteInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } - export type MapVetoStepUncheckedUpdateManyWithoutVetoNestedInput = { - create?: XOR | MapVetoStepCreateWithoutVetoInput[] | MapVetoStepUncheckedCreateWithoutVetoInput[] - connectOrCreate?: MapVetoStepCreateOrConnectWithoutVetoInput | MapVetoStepCreateOrConnectWithoutVetoInput[] - upsert?: MapVetoStepUpsertWithWhereUniqueWithoutVetoInput | MapVetoStepUpsertWithWhereUniqueWithoutVetoInput[] - createMany?: MapVetoStepCreateManyVetoInputEnvelope - set?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - disconnect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - delete?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - connect?: MapVetoStepWhereUniqueInput | MapVetoStepWhereUniqueInput[] - update?: MapVetoStepUpdateWithWhereUniqueWithoutVetoInput | MapVetoStepUpdateWithWhereUniqueWithoutVetoInput[] - updateMany?: MapVetoStepUpdateManyWithWhereWithoutVetoInput | MapVetoStepUpdateManyWithWhereWithoutVetoInput[] - deleteMany?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] + export type MapVoteStepUncheckedUpdateManyWithoutVoteNestedInput = { + create?: XOR | MapVoteStepCreateWithoutVoteInput[] | MapVoteStepUncheckedCreateWithoutVoteInput[] + connectOrCreate?: MapVoteStepCreateOrConnectWithoutVoteInput | MapVoteStepCreateOrConnectWithoutVoteInput[] + upsert?: MapVoteStepUpsertWithWhereUniqueWithoutVoteInput | MapVoteStepUpsertWithWhereUniqueWithoutVoteInput[] + createMany?: MapVoteStepCreateManyVoteInputEnvelope + set?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + disconnect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + delete?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] + update?: MapVoteStepUpdateWithWhereUniqueWithoutVoteInput | MapVoteStepUpdateWithWhereUniqueWithoutVoteInput[] + updateMany?: MapVoteStepUpdateManyWithWhereWithoutVoteInput | MapVoteStepUpdateManyWithWhereWithoutVoteInput[] + deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } - export type TeamCreateNestedOneWithoutMapVetoStepsInput = { - create?: XOR - connectOrCreate?: TeamCreateOrConnectWithoutMapVetoStepsInput + export type TeamCreateNestedOneWithoutMapVoteStepsInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutMapVoteStepsInput connect?: TeamWhereUniqueInput } - export type UserCreateNestedOneWithoutMapVetoChoicesInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutMapVetoChoicesInput + export type UserCreateNestedOneWithoutMapVoteChoicesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMapVoteChoicesInput connect?: UserWhereUniqueInput } - export type MapVetoCreateNestedOneWithoutStepsInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutStepsInput - connect?: MapVetoWhereUniqueInput + export type MapVoteCreateNestedOneWithoutStepsInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutStepsInput + connect?: MapVoteWhereUniqueInput } - export type EnumMapVetoActionFieldUpdateOperationsInput = { - set?: $Enums.MapVetoAction + export type EnumMapVoteActionFieldUpdateOperationsInput = { + set?: $Enums.MapVoteAction } - export type TeamUpdateOneWithoutMapVetoStepsNestedInput = { - create?: XOR - connectOrCreate?: TeamCreateOrConnectWithoutMapVetoStepsInput - upsert?: TeamUpsertWithoutMapVetoStepsInput + export type TeamUpdateOneWithoutMapVoteStepsNestedInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutMapVoteStepsInput + upsert?: TeamUpsertWithoutMapVoteStepsInput disconnect?: TeamWhereInput | boolean delete?: TeamWhereInput | boolean connect?: TeamWhereUniqueInput - update?: XOR, TeamUncheckedUpdateWithoutMapVetoStepsInput> + update?: XOR, TeamUncheckedUpdateWithoutMapVoteStepsInput> } - export type UserUpdateOneWithoutMapVetoChoicesNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutMapVetoChoicesInput - upsert?: UserUpsertWithoutMapVetoChoicesInput + export type UserUpdateOneWithoutMapVoteChoicesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMapVoteChoicesInput + upsert?: UserUpsertWithoutMapVoteChoicesInput disconnect?: UserWhereInput | boolean delete?: UserWhereInput | boolean connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutMapVetoChoicesInput> + update?: XOR, UserUncheckedUpdateWithoutMapVoteChoicesInput> } - export type MapVetoUpdateOneRequiredWithoutStepsNestedInput = { - create?: XOR - connectOrCreate?: MapVetoCreateOrConnectWithoutStepsInput - upsert?: MapVetoUpsertWithoutStepsInput - connect?: MapVetoWhereUniqueInput - update?: XOR, MapVetoUncheckedUpdateWithoutStepsInput> + export type MapVoteUpdateOneRequiredWithoutStepsNestedInput = { + create?: XOR + connectOrCreate?: MapVoteCreateOrConnectWithoutStepsInput + upsert?: MapVoteUpsertWithoutStepsInput + connect?: MapVoteWhereUniqueInput + update?: XOR, MapVoteUncheckedUpdateWithoutStepsInput> } export type NestedStringFilter<$PrismaModel = never> = { @@ -24551,21 +24583,21 @@ export namespace Prisma { _max?: NestedBigIntFilter<$PrismaModel> } - export type NestedEnumMapVetoActionFilter<$PrismaModel = never> = { - equals?: $Enums.MapVetoAction | EnumMapVetoActionFieldRefInput<$PrismaModel> - in?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - notIn?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - not?: NestedEnumMapVetoActionFilter<$PrismaModel> | $Enums.MapVetoAction + export type NestedEnumMapVoteActionFilter<$PrismaModel = never> = { + equals?: $Enums.MapVoteAction | EnumMapVoteActionFieldRefInput<$PrismaModel> + in?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + notIn?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + not?: NestedEnumMapVoteActionFilter<$PrismaModel> | $Enums.MapVoteAction } - export type NestedEnumMapVetoActionWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MapVetoAction | EnumMapVetoActionFieldRefInput<$PrismaModel> - in?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - notIn?: $Enums.MapVetoAction[] | ListEnumMapVetoActionFieldRefInput<$PrismaModel> - not?: NestedEnumMapVetoActionWithAggregatesFilter<$PrismaModel> | $Enums.MapVetoAction + export type NestedEnumMapVoteActionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MapVoteAction | EnumMapVoteActionFieldRefInput<$PrismaModel> + in?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + notIn?: $Enums.MapVoteAction[] | ListEnumMapVoteActionFieldRefInput<$PrismaModel> + not?: NestedEnumMapVoteActionWithAggregatesFilter<$PrismaModel> | $Enums.MapVoteAction _count?: NestedIntFilter<$PrismaModel> - _min?: NestedEnumMapVetoActionFilter<$PrismaModel> - _max?: NestedEnumMapVetoActionFilter<$PrismaModel> + _min?: NestedEnumMapVoteActionFilter<$PrismaModel> + _max?: NestedEnumMapVoteActionFilter<$PrismaModel> } export type TeamCreateWithoutMembersInput = { @@ -24582,7 +24614,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutMembersInput = { @@ -24599,7 +24631,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutMembersInput = { @@ -24621,7 +24653,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutLeaderInput = { @@ -24638,7 +24670,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutLeaderInput = { @@ -24670,7 +24702,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -24698,7 +24730,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -24731,7 +24763,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -24759,7 +24791,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -25018,33 +25050,33 @@ export namespace Prisma { skipDuplicates?: boolean } - export type MapVetoStepCreateWithoutChooserInput = { + export type MapVoteStepCreateWithoutChooserInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null - team?: TeamCreateNestedOneWithoutMapVetoStepsInput - veto: MapVetoCreateNestedOneWithoutStepsInput + team?: TeamCreateNestedOneWithoutMapVoteStepsInput + vote: MapVoteCreateNestedOneWithoutStepsInput } - export type MapVetoStepUncheckedCreateWithoutChooserInput = { + export type MapVoteStepUncheckedCreateWithoutChooserInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null } - export type MapVetoStepCreateOrConnectWithoutChooserInput = { - where: MapVetoStepWhereUniqueInput - create: XOR + export type MapVoteStepCreateOrConnectWithoutChooserInput = { + where: MapVoteStepWhereUniqueInput + create: XOR } - export type MapVetoStepCreateManyChooserInputEnvelope = { - data: MapVetoStepCreateManyChooserInput | MapVetoStepCreateManyChooserInput[] + export type MapVoteStepCreateManyChooserInputEnvelope = { + data: MapVoteStepCreateManyChooserInput | MapVoteStepCreateManyChooserInput[] skipDuplicates?: boolean } @@ -25073,7 +25105,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutMembersInput = { @@ -25090,7 +25122,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type TeamUpsertWithoutLeaderInput = { @@ -25118,7 +25150,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutLeaderInput = { @@ -25135,7 +25167,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type MatchUpsertWithWhereUniqueWithoutTeamAUsersInput = { @@ -25420,34 +25452,34 @@ export namespace Prisma { data: XOR } - export type MapVetoStepUpsertWithWhereUniqueWithoutChooserInput = { - where: MapVetoStepWhereUniqueInput - update: XOR - create: XOR + export type MapVoteStepUpsertWithWhereUniqueWithoutChooserInput = { + where: MapVoteStepWhereUniqueInput + update: XOR + create: XOR } - export type MapVetoStepUpdateWithWhereUniqueWithoutChooserInput = { - where: MapVetoStepWhereUniqueInput - data: XOR + export type MapVoteStepUpdateWithWhereUniqueWithoutChooserInput = { + where: MapVoteStepWhereUniqueInput + data: XOR } - export type MapVetoStepUpdateManyWithWhereWithoutChooserInput = { - where: MapVetoStepScalarWhereInput - data: XOR + export type MapVoteStepUpdateManyWithWhereWithoutChooserInput = { + where: MapVoteStepScalarWhereInput + data: XOR } - export type MapVetoStepScalarWhereInput = { - AND?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] - OR?: MapVetoStepScalarWhereInput[] - NOT?: MapVetoStepScalarWhereInput | MapVetoStepScalarWhereInput[] - id?: StringFilter<"MapVetoStep"> | string - vetoId?: StringFilter<"MapVetoStep"> | string - order?: IntFilter<"MapVetoStep"> | number - action?: EnumMapVetoActionFilter<"MapVetoStep"> | $Enums.MapVetoAction - teamId?: StringNullableFilter<"MapVetoStep"> | string | null - map?: StringNullableFilter<"MapVetoStep"> | string | null - chosenAt?: DateTimeNullableFilter<"MapVetoStep"> | Date | string | null - chosenBy?: StringNullableFilter<"MapVetoStep"> | string | null + export type MapVoteStepScalarWhereInput = { + AND?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] + OR?: MapVoteStepScalarWhereInput[] + NOT?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] + id?: StringFilter<"MapVoteStep"> | string + voteId?: StringFilter<"MapVoteStep"> | string + order?: IntFilter<"MapVoteStep"> | number + action?: EnumMapVoteActionFilter<"MapVoteStep"> | $Enums.MapVoteAction + teamId?: StringNullableFilter<"MapVoteStep"> | string | null + map?: StringNullableFilter<"MapVoteStep"> | string | null + chosenAt?: DateTimeNullableFilter<"MapVoteStep"> | Date | string | null + chosenBy?: StringNullableFilter<"MapVoteStep"> | string | null } export type UserCreateWithoutLedTeamInput = { @@ -25472,7 +25504,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutLedTeamInput = { @@ -25497,7 +25529,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutLedTeamInput = { @@ -25527,7 +25559,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutTeamInput = { @@ -25552,7 +25584,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutTeamInput = { @@ -25639,7 +25671,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -25667,7 +25699,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -25705,7 +25737,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -25733,7 +25765,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -25827,33 +25859,33 @@ export namespace Prisma { skipDuplicates?: boolean } - export type MapVetoStepCreateWithoutTeamInput = { + export type MapVoteStepCreateWithoutTeamInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null - chooser?: UserCreateNestedOneWithoutMapVetoChoicesInput - veto: MapVetoCreateNestedOneWithoutStepsInput + chooser?: UserCreateNestedOneWithoutMapVoteChoicesInput + vote: MapVoteCreateNestedOneWithoutStepsInput } - export type MapVetoStepUncheckedCreateWithoutTeamInput = { + export type MapVoteStepUncheckedCreateWithoutTeamInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null chosenBy?: string | null } - export type MapVetoStepCreateOrConnectWithoutTeamInput = { - where: MapVetoStepWhereUniqueInput - create: XOR + export type MapVoteStepCreateOrConnectWithoutTeamInput = { + where: MapVoteStepWhereUniqueInput + create: XOR } - export type MapVetoStepCreateManyTeamInputEnvelope = { - data: MapVetoStepCreateManyTeamInput | MapVetoStepCreateManyTeamInput[] + export type MapVoteStepCreateManyTeamInputEnvelope = { + data: MapVoteStepCreateManyTeamInput | MapVoteStepCreateManyTeamInput[] skipDuplicates?: boolean } @@ -25890,7 +25922,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutLedTeamInput = { @@ -25915,7 +25947,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserUpsertWithWhereUniqueWithoutTeamInput = { @@ -26047,20 +26079,20 @@ export namespace Prisma { data: XOR } - export type MapVetoStepUpsertWithWhereUniqueWithoutTeamInput = { - where: MapVetoStepWhereUniqueInput - update: XOR - create: XOR + export type MapVoteStepUpsertWithWhereUniqueWithoutTeamInput = { + where: MapVoteStepWhereUniqueInput + update: XOR + create: XOR } - export type MapVetoStepUpdateWithWhereUniqueWithoutTeamInput = { - where: MapVetoStepWhereUniqueInput - data: XOR + export type MapVoteStepUpdateWithWhereUniqueWithoutTeamInput = { + where: MapVoteStepWhereUniqueInput + data: XOR } - export type MapVetoStepUpdateManyWithWhereWithoutTeamInput = { - where: MapVetoStepScalarWhereInput - data: XOR + export type MapVoteStepUpdateManyWithWhereWithoutTeamInput = { + where: MapVoteStepScalarWhereInput + data: XOR } export type UserCreateWithoutInvitesInput = { @@ -26085,7 +26117,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutInvitesInput = { @@ -26110,7 +26142,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutInvitesInput = { @@ -26132,7 +26164,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutInvitesInput = { @@ -26149,7 +26181,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutInvitesInput = { @@ -26190,7 +26222,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutInvitesInput = { @@ -26215,7 +26247,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type TeamUpsertWithoutInvitesInput = { @@ -26243,7 +26275,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutInvitesInput = { @@ -26260,7 +26292,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type UserCreateWithoutNotificationsInput = { @@ -26285,7 +26317,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutNotificationsInput = { @@ -26310,7 +26342,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutNotificationsInput = { @@ -26351,7 +26383,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutNotificationsInput = { @@ -26376,7 +26408,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type TeamCreateWithoutMatchesAsTeamAInput = { @@ -26393,7 +26425,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutMatchesAsTeamAInput = { @@ -26410,7 +26442,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutMatchesAsTeamAInput = { @@ -26432,7 +26464,7 @@ export namespace Prisma { matchesAsTeamA?: MatchCreateNestedManyWithoutTeamAInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutMatchesAsTeamBInput = { @@ -26449,7 +26481,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutMatchesAsTeamBInput = { @@ -26479,7 +26511,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutMatchesAsTeamAInput = { @@ -26504,7 +26536,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutMatchesAsTeamAInput = { @@ -26534,7 +26566,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutMatchesAsTeamBInput = { @@ -26559,7 +26591,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutMatchesAsTeamBInput = { @@ -26646,33 +26678,37 @@ export namespace Prisma { skipDuplicates?: boolean } - export type MapVetoCreateWithoutMatchInput = { + export type MapVoteCreateWithoutMatchInput = { id?: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - steps?: MapVetoStepCreateNestedManyWithoutVetoInput + steps?: MapVoteStepCreateNestedManyWithoutVoteInput } - export type MapVetoUncheckedCreateWithoutMatchInput = { + export type MapVoteUncheckedCreateWithoutMatchInput = { id?: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - steps?: MapVetoStepUncheckedCreateNestedManyWithoutVetoInput + steps?: MapVoteStepUncheckedCreateNestedManyWithoutVoteInput } - export type MapVetoCreateOrConnectWithoutMatchInput = { - where: MapVetoWhereUniqueInput - create: XOR + export type MapVoteCreateOrConnectWithoutMatchInput = { + where: MapVoteWhereUniqueInput + create: XOR } export type ScheduleCreateWithoutLinkedMatchInput = { @@ -26735,7 +26771,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutMatchesAsTeamAInput = { @@ -26752,7 +26788,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type TeamUpsertWithoutMatchesAsTeamBInput = { @@ -26780,7 +26816,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUpdateManyWithoutTeamANestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutMatchesAsTeamBInput = { @@ -26797,7 +26833,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type UserUpsertWithWhereUniqueWithoutMatchesAsTeamAInput = { @@ -26893,39 +26929,43 @@ export namespace Prisma { data: XOR } - export type MapVetoUpsertWithoutMatchInput = { - update: XOR - create: XOR - where?: MapVetoWhereInput + export type MapVoteUpsertWithoutMatchInput = { + update: XOR + create: XOR + where?: MapVoteWhereInput } - export type MapVetoUpdateToOneWithWhereWithoutMatchInput = { - where?: MapVetoWhereInput - data: XOR + export type MapVoteUpdateToOneWithWhereWithoutMatchInput = { + where?: MapVoteWhereInput + data: XOR } - export type MapVetoUpdateWithoutMatchInput = { + export type MapVoteUpdateWithoutMatchInput = { id?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - steps?: MapVetoStepUpdateManyWithoutVetoNestedInput + steps?: MapVoteStepUpdateManyWithoutVoteNestedInput } - export type MapVetoUncheckedUpdateWithoutMatchInput = { + export type MapVoteUncheckedUpdateWithoutMatchInput = { id?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - steps?: MapVetoStepUncheckedUpdateManyWithoutVetoNestedInput + steps?: MapVoteStepUncheckedUpdateManyWithoutVoteNestedInput } export type ScheduleUpsertWithoutLinkedMatchInput = { @@ -26983,7 +27023,7 @@ export namespace Prisma { matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutMatchPlayersInput = { @@ -27000,7 +27040,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutMatchPlayersInput = { @@ -27032,7 +27072,7 @@ export namespace Prisma { teamBUsers?: UserCreateNestedManyWithoutMatchesAsTeamBInput demoFile?: DemoFileCreateNestedOneWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -27060,7 +27100,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedCreateNestedManyWithoutMatchesAsTeamBInput demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -27091,7 +27131,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutMatchPlayersInput = { @@ -27116,7 +27156,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutMatchPlayersInput = { @@ -27218,7 +27258,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutMatchPlayersInput = { @@ -27235,7 +27275,7 @@ export namespace Prisma { matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type MatchUpsertWithoutPlayersInput = { @@ -27273,7 +27313,7 @@ export namespace Prisma { teamBUsers?: UserUpdateManyWithoutMatchesAsTeamBNestedInput demoFile?: DemoFileUpdateOneWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -27301,7 +27341,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedUpdateManyWithoutMatchesAsTeamBNestedInput demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -27338,7 +27378,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutMatchPlayersInput = { @@ -27363,7 +27403,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type PlayerStatsUpsertWithoutMatchPlayerInput = { @@ -27511,7 +27551,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutRankHistoryInput = { @@ -27536,7 +27576,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutRankHistoryInput = { @@ -27568,7 +27608,7 @@ export namespace Prisma { teamBUsers?: UserCreateNestedManyWithoutMatchesAsTeamBInput demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -27596,7 +27636,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedCreateNestedManyWithoutMatchesAsTeamBInput demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -27638,7 +27678,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutRankHistoryInput = { @@ -27663,7 +27703,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type MatchUpsertWithoutRankUpdatesInput = { @@ -27701,7 +27741,7 @@ export namespace Prisma { teamBUsers?: UserUpdateManyWithoutMatchesAsTeamBNestedInput demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -27729,7 +27769,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedUpdateManyWithoutMatchesAsTeamBNestedInput demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -27747,7 +27787,7 @@ export namespace Prisma { matchesAsTeamA?: MatchCreateNestedManyWithoutTeamAInput matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutSchedulesAsTeamAInput = { @@ -27764,7 +27804,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedCreateNestedManyWithoutTeamAInput matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutSchedulesAsTeamAInput = { @@ -27786,7 +27826,7 @@ export namespace Prisma { matchesAsTeamA?: MatchCreateNestedManyWithoutTeamAInput matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleCreateNestedManyWithoutTeamAInput - mapVetoSteps?: MapVetoStepCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepCreateNestedManyWithoutTeamInput } export type TeamUncheckedCreateWithoutSchedulesAsTeamBInput = { @@ -27803,7 +27843,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedCreateNestedManyWithoutTeamAInput matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBInput schedulesAsTeamA?: ScheduleUncheckedCreateNestedManyWithoutTeamAInput - mapVetoSteps?: MapVetoStepUncheckedCreateNestedManyWithoutTeamInput + mapVoteSteps?: MapVoteStepUncheckedCreateNestedManyWithoutTeamInput } export type TeamCreateOrConnectWithoutSchedulesAsTeamBInput = { @@ -27833,7 +27873,7 @@ export namespace Prisma { rankHistory?: RankHistoryCreateNestedManyWithoutUserInput demoFiles?: DemoFileCreateNestedManyWithoutUserInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutCreatedSchedulesInput = { @@ -27858,7 +27898,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedCreateNestedManyWithoutUserInput demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutCreatedSchedulesInput = { @@ -27888,7 +27928,7 @@ export namespace Prisma { rankHistory?: RankHistoryCreateNestedManyWithoutUserInput demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutConfirmedSchedulesInput = { @@ -27913,7 +27953,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedCreateNestedManyWithoutUserInput demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutConfirmedSchedulesInput = { @@ -27946,7 +27986,7 @@ export namespace Prisma { demoFile?: DemoFileCreateNestedOneWithoutMatchInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput } export type MatchUncheckedCreateWithoutScheduleInput = { @@ -27974,7 +28014,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput } export type MatchCreateOrConnectWithoutScheduleInput = { @@ -28007,7 +28047,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUpdateManyWithoutTeamANestedInput matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutSchedulesAsTeamAInput = { @@ -28024,7 +28064,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedUpdateManyWithoutTeamANestedInput matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type TeamUpsertWithoutSchedulesAsTeamBInput = { @@ -28052,7 +28092,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUpdateManyWithoutTeamANestedInput matchesAsTeamB?: MatchUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUpdateManyWithoutTeamANestedInput - mapVetoSteps?: MapVetoStepUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUpdateManyWithoutTeamNestedInput } export type TeamUncheckedUpdateWithoutSchedulesAsTeamBInput = { @@ -28069,7 +28109,7 @@ export namespace Prisma { matchesAsTeamA?: MatchUncheckedUpdateManyWithoutTeamANestedInput matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBNestedInput schedulesAsTeamA?: ScheduleUncheckedUpdateManyWithoutTeamANestedInput - mapVetoSteps?: MapVetoStepUncheckedUpdateManyWithoutTeamNestedInput + mapVoteSteps?: MapVoteStepUncheckedUpdateManyWithoutTeamNestedInput } export type UserUpsertWithoutCreatedSchedulesInput = { @@ -28105,7 +28145,7 @@ export namespace Prisma { rankHistory?: RankHistoryUpdateManyWithoutUserNestedInput demoFiles?: DemoFileUpdateManyWithoutUserNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutCreatedSchedulesInput = { @@ -28130,7 +28170,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedUpdateManyWithoutUserNestedInput demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserUpsertWithoutConfirmedSchedulesInput = { @@ -28166,7 +28206,7 @@ export namespace Prisma { rankHistory?: RankHistoryUpdateManyWithoutUserNestedInput demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutConfirmedSchedulesInput = { @@ -28191,7 +28231,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedUpdateManyWithoutUserNestedInput demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type MatchUpsertWithoutScheduleInput = { @@ -28230,7 +28270,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutScheduleInput = { @@ -28258,7 +28298,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput } export type MatchCreateWithoutDemoFileInput = { @@ -28285,7 +28325,7 @@ export namespace Prisma { teamBUsers?: UserCreateNestedManyWithoutMatchesAsTeamBInput players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoCreateNestedOneWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } @@ -28313,7 +28353,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedCreateNestedManyWithoutMatchesAsTeamBInput players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput - mapVeto?: MapVetoUncheckedCreateNestedOneWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } @@ -28344,7 +28384,7 @@ export namespace Prisma { rankHistory?: RankHistoryCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutDemoFilesInput = { @@ -28369,7 +28409,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutDemoFilesInput = { @@ -28412,7 +28452,7 @@ export namespace Prisma { teamBUsers?: UserUpdateManyWithoutMatchesAsTeamBNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -28440,7 +28480,7 @@ export namespace Prisma { teamBUsers?: UserUncheckedUpdateManyWithoutMatchesAsTeamBNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -28477,7 +28517,7 @@ export namespace Prisma { rankHistory?: RankHistoryUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutDemoFilesInput = { @@ -28502,7 +28542,7 @@ export namespace Prisma { rankHistory?: RankHistoryUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserCreateWithoutServerRequestsInput = { @@ -28527,7 +28567,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput } export type UserUncheckedCreateWithoutServerRequestsInput = { @@ -28552,7 +28592,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput - mapVetoChoices?: MapVetoStepUncheckedCreateNestedManyWithoutChooserInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput } export type UserCreateOrConnectWithoutServerRequestsInput = { @@ -28593,7 +28633,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutServerRequestsInput = { @@ -28618,10 +28658,10 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } - export type MatchCreateWithoutMapVetoInput = { + export type MatchCreateWithoutMapVoteInput = { id?: string title: string matchType?: string @@ -28649,7 +28689,7 @@ export namespace Prisma { schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput } - export type MatchUncheckedCreateWithoutMapVetoInput = { + export type MatchUncheckedCreateWithoutMapVoteInput = { id?: string title: string matchType?: string @@ -28677,53 +28717,53 @@ export namespace Prisma { schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput } - export type MatchCreateOrConnectWithoutMapVetoInput = { + export type MatchCreateOrConnectWithoutMapVoteInput = { where: MatchWhereUniqueInput - create: XOR + create: XOR } - export type MapVetoStepCreateWithoutVetoInput = { + export type MapVoteStepCreateWithoutVoteInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null - team?: TeamCreateNestedOneWithoutMapVetoStepsInput - chooser?: UserCreateNestedOneWithoutMapVetoChoicesInput + team?: TeamCreateNestedOneWithoutMapVoteStepsInput + chooser?: UserCreateNestedOneWithoutMapVoteChoicesInput } - export type MapVetoStepUncheckedCreateWithoutVetoInput = { + export type MapVoteStepUncheckedCreateWithoutVoteInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null chosenBy?: string | null } - export type MapVetoStepCreateOrConnectWithoutVetoInput = { - where: MapVetoStepWhereUniqueInput - create: XOR + export type MapVoteStepCreateOrConnectWithoutVoteInput = { + where: MapVoteStepWhereUniqueInput + create: XOR } - export type MapVetoStepCreateManyVetoInputEnvelope = { - data: MapVetoStepCreateManyVetoInput | MapVetoStepCreateManyVetoInput[] + export type MapVoteStepCreateManyVoteInputEnvelope = { + data: MapVoteStepCreateManyVoteInput | MapVoteStepCreateManyVoteInput[] skipDuplicates?: boolean } - export type MatchUpsertWithoutMapVetoInput = { - update: XOR - create: XOR + export type MatchUpsertWithoutMapVoteInput = { + update: XOR + create: XOR where?: MatchWhereInput } - export type MatchUpdateToOneWithWhereWithoutMapVetoInput = { + export type MatchUpdateToOneWithWhereWithoutMapVoteInput = { where?: MatchWhereInput - data: XOR + data: XOR } - export type MatchUpdateWithoutMapVetoInput = { + export type MatchUpdateWithoutMapVoteInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string matchType?: StringFieldUpdateOperationsInput | string @@ -28751,7 +28791,7 @@ export namespace Prisma { schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } - export type MatchUncheckedUpdateWithoutMapVetoInput = { + export type MatchUncheckedUpdateWithoutMapVoteInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string matchType?: StringFieldUpdateOperationsInput | string @@ -28779,23 +28819,23 @@ export namespace Prisma { schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } - export type MapVetoStepUpsertWithWhereUniqueWithoutVetoInput = { - where: MapVetoStepWhereUniqueInput - update: XOR - create: XOR + export type MapVoteStepUpsertWithWhereUniqueWithoutVoteInput = { + where: MapVoteStepWhereUniqueInput + update: XOR + create: XOR } - export type MapVetoStepUpdateWithWhereUniqueWithoutVetoInput = { - where: MapVetoStepWhereUniqueInput - data: XOR + export type MapVoteStepUpdateWithWhereUniqueWithoutVoteInput = { + where: MapVoteStepWhereUniqueInput + data: XOR } - export type MapVetoStepUpdateManyWithWhereWithoutVetoInput = { - where: MapVetoStepScalarWhereInput - data: XOR + export type MapVoteStepUpdateManyWithWhereWithoutVoteInput = { + where: MapVoteStepScalarWhereInput + data: XOR } - export type TeamCreateWithoutMapVetoStepsInput = { + export type TeamCreateWithoutMapVoteStepsInput = { id?: string name: string logo?: string | null @@ -28812,7 +28852,7 @@ export namespace Prisma { schedulesAsTeamB?: ScheduleCreateNestedManyWithoutTeamBInput } - export type TeamUncheckedCreateWithoutMapVetoStepsInput = { + export type TeamUncheckedCreateWithoutMapVoteStepsInput = { id?: string name: string logo?: string | null @@ -28829,12 +28869,12 @@ export namespace Prisma { schedulesAsTeamB?: ScheduleUncheckedCreateNestedManyWithoutTeamBInput } - export type TeamCreateOrConnectWithoutMapVetoStepsInput = { + export type TeamCreateOrConnectWithoutMapVoteStepsInput = { where: TeamWhereUniqueInput - create: XOR + create: XOR } - export type UserCreateWithoutMapVetoChoicesInput = { + export type UserCreateWithoutMapVoteChoicesInput = { steamId: string name?: string | null avatar?: string | null @@ -28859,7 +28899,7 @@ export namespace Prisma { confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput } - export type UserUncheckedCreateWithoutMapVetoChoicesInput = { + export type UserUncheckedCreateWithoutMapVoteChoicesInput = { steamId: string name?: string | null avatar?: string | null @@ -28884,52 +28924,56 @@ export namespace Prisma { confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput } - export type UserCreateOrConnectWithoutMapVetoChoicesInput = { + export type UserCreateOrConnectWithoutMapVoteChoicesInput = { where: UserWhereUniqueInput - create: XOR + create: XOR } - export type MapVetoCreateWithoutStepsInput = { + export type MapVoteCreateWithoutStepsInput = { id?: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - match: MatchCreateNestedOneWithoutMapVetoInput + match: MatchCreateNestedOneWithoutMapVoteInput } - export type MapVetoUncheckedCreateWithoutStepsInput = { + export type MapVoteUncheckedCreateWithoutStepsInput = { id?: string matchId: string bestOf?: number - mapPool?: MapVetoCreatemapPoolInput | string[] + mapPool?: MapVoteCreatemapPoolInput | string[] currentIdx?: number locked?: boolean opensAt?: Date | string | null + adminEditingBy?: string | null + adminEditingSince?: Date | string | null createdAt?: Date | string updatedAt?: Date | string } - export type MapVetoCreateOrConnectWithoutStepsInput = { - where: MapVetoWhereUniqueInput - create: XOR + export type MapVoteCreateOrConnectWithoutStepsInput = { + where: MapVoteWhereUniqueInput + create: XOR } - export type TeamUpsertWithoutMapVetoStepsInput = { - update: XOR - create: XOR + export type TeamUpsertWithoutMapVoteStepsInput = { + update: XOR + create: XOR where?: TeamWhereInput } - export type TeamUpdateToOneWithWhereWithoutMapVetoStepsInput = { + export type TeamUpdateToOneWithWhereWithoutMapVoteStepsInput = { where?: TeamWhereInput - data: XOR + data: XOR } - export type TeamUpdateWithoutMapVetoStepsInput = { + export type TeamUpdateWithoutMapVoteStepsInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string logo?: NullableStringFieldUpdateOperationsInput | string | null @@ -28946,7 +28990,7 @@ export namespace Prisma { schedulesAsTeamB?: ScheduleUpdateManyWithoutTeamBNestedInput } - export type TeamUncheckedUpdateWithoutMapVetoStepsInput = { + export type TeamUncheckedUpdateWithoutMapVoteStepsInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string logo?: NullableStringFieldUpdateOperationsInput | string | null @@ -28963,18 +29007,18 @@ export namespace Prisma { schedulesAsTeamB?: ScheduleUncheckedUpdateManyWithoutTeamBNestedInput } - export type UserUpsertWithoutMapVetoChoicesInput = { - update: XOR - create: XOR + export type UserUpsertWithoutMapVoteChoicesInput = { + update: XOR + create: XOR where?: UserWhereInput } - export type UserUpdateToOneWithWhereWithoutMapVetoChoicesInput = { + export type UserUpdateToOneWithWhereWithoutMapVoteChoicesInput = { where?: UserWhereInput - data: XOR + data: XOR } - export type UserUpdateWithoutMapVetoChoicesInput = { + export type UserUpdateWithoutMapVoteChoicesInput = { steamId?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null @@ -28999,7 +29043,7 @@ export namespace Prisma { confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput } - export type UserUncheckedUpdateWithoutMapVetoChoicesInput = { + export type UserUncheckedUpdateWithoutMapVoteChoicesInput = { steamId?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null @@ -29024,37 +29068,41 @@ export namespace Prisma { confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput } - export type MapVetoUpsertWithoutStepsInput = { - update: XOR - create: XOR - where?: MapVetoWhereInput + export type MapVoteUpsertWithoutStepsInput = { + update: XOR + create: XOR + where?: MapVoteWhereInput } - export type MapVetoUpdateToOneWithWhereWithoutStepsInput = { - where?: MapVetoWhereInput - data: XOR + export type MapVoteUpdateToOneWithWhereWithoutStepsInput = { + where?: MapVoteWhereInput + data: XOR } - export type MapVetoUpdateWithoutStepsInput = { + export type MapVoteUpdateWithoutStepsInput = { id?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - match?: MatchUpdateOneRequiredWithoutMapVetoNestedInput + match?: MatchUpdateOneRequiredWithoutMapVoteNestedInput } - export type MapVetoUncheckedUpdateWithoutStepsInput = { + export type MapVoteUncheckedUpdateWithoutStepsInput = { id?: StringFieldUpdateOperationsInput | string matchId?: StringFieldUpdateOperationsInput | string bestOf?: IntFieldUpdateOperationsInput | number - mapPool?: MapVetoUpdatemapPoolInput | string[] + mapPool?: MapVoteUpdatemapPoolInput | string[] currentIdx?: IntFieldUpdateOperationsInput | number locked?: BoolFieldUpdateOperationsInput | boolean opensAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + adminEditingBy?: NullableStringFieldUpdateOperationsInput | string | null + adminEditingSince?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -29143,11 +29191,11 @@ export namespace Prisma { updatedAt?: Date | string } - export type MapVetoStepCreateManyChooserInput = { + export type MapVoteStepCreateManyChooserInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null @@ -29177,7 +29225,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -29205,7 +29253,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -29255,7 +29303,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -29283,7 +29331,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -29563,31 +29611,31 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoStepUpdateWithoutChooserInput = { + export type MapVoteStepUpdateWithoutChooserInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - team?: TeamUpdateOneWithoutMapVetoStepsNestedInput - veto?: MapVetoUpdateOneRequiredWithoutStepsNestedInput + team?: TeamUpdateOneWithoutMapVoteStepsNestedInput + vote?: MapVoteUpdateOneRequiredWithoutStepsNestedInput } - export type MapVetoStepUncheckedUpdateWithoutChooserInput = { + export type MapVoteStepUncheckedUpdateWithoutChooserInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } - export type MapVetoStepUncheckedUpdateManyWithoutChooserInput = { + export type MapVoteStepUncheckedUpdateManyWithoutChooserInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null @@ -29692,11 +29740,11 @@ export namespace Prisma { updatedAt?: Date | string } - export type MapVetoStepCreateManyTeamInput = { + export type MapVoteStepCreateManyTeamInput = { id?: string - vetoId: string + voteId: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction map?: string | null chosenAt?: Date | string | null chosenBy?: string | null @@ -29724,7 +29772,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutTeamInput = { @@ -29749,7 +29797,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateManyWithoutTeamInput = { @@ -29833,7 +29881,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -29861,7 +29909,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -29910,7 +29958,7 @@ export namespace Prisma { demoFile?: DemoFileUpdateOneWithoutMatchNestedInput players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput } @@ -29938,7 +29986,7 @@ export namespace Prisma { demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput - mapVeto?: MapVetoUncheckedUpdateOneWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput } @@ -30053,31 +30101,31 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoStepUpdateWithoutTeamInput = { + export type MapVoteStepUpdateWithoutTeamInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - chooser?: UserUpdateOneWithoutMapVetoChoicesNestedInput - veto?: MapVetoUpdateOneRequiredWithoutStepsNestedInput + chooser?: UserUpdateOneWithoutMapVoteChoicesNestedInput + vote?: MapVoteUpdateOneRequiredWithoutStepsNestedInput } - export type MapVetoStepUncheckedUpdateWithoutTeamInput = { + export type MapVoteStepUncheckedUpdateWithoutTeamInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null chosenBy?: NullableStringFieldUpdateOperationsInput | string | null } - export type MapVetoStepUncheckedUpdateManyWithoutTeamInput = { + export type MapVoteStepUncheckedUpdateManyWithoutTeamInput = { id?: StringFieldUpdateOperationsInput | string - vetoId?: StringFieldUpdateOperationsInput | string + voteId?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null chosenBy?: NullableStringFieldUpdateOperationsInput | string | null @@ -30122,7 +30170,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutMatchesAsTeamAInput = { @@ -30147,7 +30195,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateManyWithoutMatchesAsTeamAInput = { @@ -30186,7 +30234,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateWithoutMatchesAsTeamBInput = { @@ -30211,7 +30259,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput - mapVetoChoices?: MapVetoStepUncheckedUpdateManyWithoutChooserNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput } export type UserUncheckedUpdateManyWithoutMatchesAsTeamBInput = { @@ -30281,40 +30329,40 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type MapVetoStepCreateManyVetoInput = { + export type MapVoteStepCreateManyVoteInput = { id?: string order: number - action: $Enums.MapVetoAction + action: $Enums.MapVoteAction teamId?: string | null map?: string | null chosenAt?: Date | string | null chosenBy?: string | null } - export type MapVetoStepUpdateWithoutVetoInput = { + export type MapVoteStepUpdateWithoutVoteInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - team?: TeamUpdateOneWithoutMapVetoStepsNestedInput - chooser?: UserUpdateOneWithoutMapVetoChoicesNestedInput + team?: TeamUpdateOneWithoutMapVoteStepsNestedInput + chooser?: UserUpdateOneWithoutMapVoteChoicesNestedInput } - export type MapVetoStepUncheckedUpdateWithoutVetoInput = { + export type MapVoteStepUncheckedUpdateWithoutVoteInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null chosenBy?: NullableStringFieldUpdateOperationsInput | string | null } - export type MapVetoStepUncheckedUpdateManyWithoutVetoInput = { + export type MapVoteStepUncheckedUpdateManyWithoutVoteInput = { id?: StringFieldUpdateOperationsInput | string order?: IntFieldUpdateOperationsInput | number - action?: EnumMapVetoActionFieldUpdateOperationsInput | $Enums.MapVetoAction + action?: EnumMapVoteActionFieldUpdateOperationsInput | $Enums.MapVoteAction teamId?: NullableStringFieldUpdateOperationsInput | string | null map?: NullableStringFieldUpdateOperationsInput | string | null chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null diff --git a/src/generated/prisma/index.js b/src/generated/prisma/index.js index e731cd8..04e0183 100644 --- a/src/generated/prisma/index.js +++ b/src/generated/prisma/index.js @@ -35,12 +35,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd + * Prisma Client JS version: 6.14.0 + * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 */ Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" + client: "6.14.0", + engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -249,7 +249,7 @@ exports.Prisma.ServerRequestScalarFieldEnum = { createdAt: 'createdAt' }; -exports.Prisma.MapVetoScalarFieldEnum = { +exports.Prisma.MapVoteScalarFieldEnum = { id: 'id', matchId: 'matchId', bestOf: 'bestOf', @@ -257,13 +257,15 @@ exports.Prisma.MapVetoScalarFieldEnum = { currentIdx: 'currentIdx', locked: 'locked', opensAt: 'opensAt', + adminEditingBy: 'adminEditingBy', + adminEditingSince: 'adminEditingSince', createdAt: 'createdAt', updatedAt: 'updatedAt' }; -exports.Prisma.MapVetoStepScalarFieldEnum = { +exports.Prisma.MapVoteStepScalarFieldEnum = { id: 'id', - vetoId: 'vetoId', + voteId: 'voteId', order: 'order', action: 'action', teamId: 'teamId', @@ -305,7 +307,7 @@ exports.ScheduleStatus = exports.$Enums.ScheduleStatus = { COMPLETED: 'COMPLETED' }; -exports.MapVetoAction = exports.$Enums.MapVetoAction = { +exports.MapVoteAction = exports.$Enums.MapVoteAction = { BAN: 'BAN', PICK: 'PICK', DECIDER: 'DECIDER' @@ -323,8 +325,8 @@ exports.Prisma.ModelName = { Schedule: 'Schedule', DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', - MapVeto: 'MapVeto', - MapVetoStep: 'MapVetoStep' + MapVote: 'MapVote', + MapVoteStep: 'MapVoteStep' }; /** * Create the Client @@ -337,7 +339,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "C:\\Users\\Chris\\fork\\ironie-nextjs\\src\\generated\\prisma", + "value": "C:\\Users\\Rother\\fork\\ironie-nextjs\\src\\generated\\prisma", "fromEnvVar": null }, "config": { @@ -351,7 +353,7 @@ const config = { } ], "previewFeatures": [], - "sourceFilePath": "C:\\Users\\Chris\\fork\\ironie-nextjs\\prisma\\schema.prisma", + "sourceFilePath": "C:\\Users\\Rother\\fork\\ironie-nextjs\\prisma\\schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -359,13 +361,12 @@ const config = { "schemaEnvPath": "../../../.env" }, "relativePath": "../../../prisma", - "clientVersion": "6.13.0", - "engineVersion": "361e86d0ea4987e9f53a565309b3eed797a6bcbd", + "clientVersion": "6.14.0", + "engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49", "datasourceNames": [ "db" ], "activeProvider": "postgresql", - "postinstall": false, "inlineDatasources": { "db": { "url": { @@ -374,8 +375,8 @@ const config = { } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVetoChoices MapVetoStep[] @relation(\"VetoStepChooser\")\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVetoSteps MapVetoStep[] @relation(\"VetoStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVeto MapVeto? // 1:1 Map-Vote-Status\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVetoAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVeto {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n // Basiszustand\n bestOf Int @default(3)\n mapPool String[] // z.B. [\"de_inferno\",\"de_mirage\",...]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n\n // Optional: serverseitig speichern, statt im UI zu berechnen\n opensAt DateTime?\n\n steps MapVetoStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVetoStep {\n id String @id @default(uuid())\n vetoId String\n order Int\n action MapVetoAction\n\n // Team, das am Zug ist (kann bei DECIDER null sein)\n teamId String?\n team Team? @relation(\"VetoStepTeam\", fields: [teamId], references: [id])\n\n // Ergebnis & wer gewählt hat\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VetoStepChooser\", fields: [chosenBy], references: [steamId])\n\n veto MapVeto @relation(fields: [vetoId], references: [id])\n\n @@unique([vetoId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", - "inlineSchemaHash": "ab45ee8d931acf77b08baacd1dff66a5afff9bab089d755c2341727c18cad5ee", + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", + "inlineSchemaHash": "6a3173f8873b8732ce0374e908c46c28a2f778a9616d63160597fb24c88535e2", "copyEngine": true } @@ -396,7 +397,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVetoChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"VetoStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVetoSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"VetoStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVeto\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVeto\",\"nativeType\":null,\"relationName\":\"MapVetoToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVeto\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVetoToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoStep\",\"nativeType\":null,\"relationName\":\"MapVetoToMapVetoStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVetoStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vetoId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVetoAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VetoStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VetoStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"veto\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVeto\",\"nativeType\":null,\"relationName\":\"MapVetoToMapVetoStep\",\"relationFromFields\":[\"vetoId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"vetoId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"vetoId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVetoAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/src/generated/prisma/package.json b/src/generated/prisma/package.json index e5596d6..4e7bb13 100644 --- a/src/generated/prisma/package.json +++ b/src/generated/prisma/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-client-c63ea7016e1a1ac5fd312c9d5648426292d519ae426c4dfab5e695d19cc61ccb", + "name": "prisma-client-d6ee9e0758cbf84308223ad2add52d1ebc187831f60d22da54a3cc72e384b3c6", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", @@ -145,6 +145,6 @@ }, "./*": "./*" }, - "version": "6.13.0", + "version": "6.14.0", "sideEffects": false } \ No newline at end of file diff --git a/src/generated/prisma/query_engine-windows.dll.node b/src/generated/prisma/query_engine-windows.dll.node index 5e24303..894b041 100644 Binary files a/src/generated/prisma/query_engine-windows.dll.node and b/src/generated/prisma/query_engine-windows.dll.node differ diff --git a/src/generated/prisma/runtime/edge-esm.js b/src/generated/prisma/runtime/edge-esm.js index 82dafa7..324dc2a 100644 --- a/src/generated/prisma/runtime/edge-esm.js +++ b/src/generated/prisma/runtime/edge-esm.js @@ -1,34 +1,34 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -var da=Object.create;var on=Object.defineProperty;var fa=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sr=(e,t)=>{for(var r in t)on(e,r,{get:t[r],enumerable:!0})},wa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ga(t))!ya.call(e,i)&&i!==r&&on(e,i,{get:()=>t[i],enumerable:!(n=fa(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?da(ha(e)):{},wa(t||!e||!e.__esModule?on(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=de(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=de(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=de(()=>{"use strict";E=()=>{};E.prototype=E});var m=de(()=>{"use strict"});var Ti=Re(ze=>{"use strict";d();u();c();p();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ea=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=C.indexOf("=");M===-1&&(M=S);var _=M===S?0:4-M%4;return[M,_]}function l(C){var S=a(C),M=S[0],_=S[1];return(M+_)*3/4-_}function f(C,S,M){return(S+M)*3/4-M}function g(C){var S,M=a(C),_=M[0],B=M[1],I=new n(f(C,_,B)),L=0,oe=B>0?_-4:_,Q;for(Q=0;Q>16&255,I[L++]=S>>8&255,I[L++]=S&255;return B===2&&(S=r[C.charCodeAt(Q)]<<2|r[C.charCodeAt(Q+1)]>>4,I[L++]=S&255),B===1&&(S=r[C.charCodeAt(Q)]<<10|r[C.charCodeAt(Q+1)]<<4|r[C.charCodeAt(Q+2)]>>2,I[L++]=S>>8&255,I[L++]=S&255),I}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,M){for(var _,B=[],I=S;Ioe?oe:L+I));return _===1?(S=C[M-1],B.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[M-2]<<8)+C[M-1],B.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),B.join("")}}),ba=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,C=t[r+T];for(T+=k,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+T>=1?r+=k/f:r+=k*Math.pow(2,1-T),r*f>=2&&(a++,f/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*f-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=M*128}}),sn=Ea(),Ke=ba(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ca;ze.INSPECT_MAX_BYTES=50;var ar=2147483647;ze.kMaxLength=ar;A.TYPED_ARRAY_SUPPORT=xa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function xa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ar)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return un(e)}return pi(e,t,r)}A.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return va(e,t);if(ArrayBuffer.isView(e))return Ta(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(fe(e,ArrayBuffer)||e&&fe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(e,SharedArrayBuffer)||e&&fe(e.buffer,SharedArrayBuffer)))return di(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function mi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Pa(e,t,r){return mi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Pa(e,t,r)};function un(e){return mi(e),xe(e<0?0:cn(e)|0)}A.allocUnsafe=function(e){return un(e)};A.allocUnsafeSlow=function(e){return un(e)};function va(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function an(e){let t=e.length<0?0:cn(e.length)|0,r=xe(t);for(let n=0;n=ar)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ar.toString(16)+" bytes");return e|0}function Ca(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),fe(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||fe(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ln(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:ln(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function Ra(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return La(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Na(this,t,r);case"latin1":case"binary":return Fa(this,t,r);case"base64":return Ma(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(A.prototype[si]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,mn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Sa(this,e,t,r);case"utf8":case"utf-8":return ka(this,e,t,r);case"ascii":case"latin1":case"binary":return Ia(this,e,t,r);case"base64":return Oa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ma(e,t,r){return t===0&&r===e.length?sn.fromByteArray(e):sn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return _a(n)}var li=4096;function _a(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),Ke.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),Ke.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Se(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Se(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Se(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Se(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ba(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Pt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ba(n,i,o)}function He(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Pt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var qa=/[^+/0-9A-Za-z-_]/g;function $a(e){if(e=e.split("=")[0],e=e.trim().replace(qa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ln(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Va(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return sn.toByteArray($a(e))}function lr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function fe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function mn(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?Qa:e}function Qa(){throw new Error("BigInt not supported")}});var w,d=de(()=>{"use strict";w=Ue(Ti())});function Ya(){return!1}function gn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Za(){return gn()}function Xa(){return[]}function el(e){e(null,[])}function tl(){return""}function rl(){return""}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){}function ul(){}function cl(){}function pl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ml(e,t){t(null,gn())}var dl,fl,ji,Gi=de(()=>{"use strict";d();u();c();p();m();dl={},fl={existsSync:Ya,lstatSync:gn,stat:ml,statSync:Za,readdirSync:Xa,readdir:el,readlinkSync:tl,realpathSync:rl,chmodSync:nl,renameSync:il,mkdirSync:ol,rmdirSync:sl,rmSync:al,unlinkSync:ll,watchFile:ul,unwatchFile:cl,watch:pl,promises:dl},ji=fl});function gl(...e){return e.join("/")}function hl(...e){return e.join("/")}function yl(e){let t=Qi(e),r=Ji(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Qi(e){let t=e.split("/");return t[t.length-1]}function Ji(e){return e.split("/").slice(0,-1).join("/")}function El(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Wi,wl,bl,xl,mr,Ki=de(()=>{"use strict";d();u();c();p();m();Wi="/",wl=":";bl={sep:Wi},xl={basename:Qi,delimiter:wl,dirname:Ji,join:hl,normalize:El,parse:yl,posix:bl,resolve:gl,sep:Wi},mr=xl});var Hi=Re((Ed,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var yn=Re((Dd,Cl)=>{Cl.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zi=Re(dr=>{"use strict";d();u();c();p();m();Object.defineProperty(dr,"__esModule",{value:!0});dr.enginesVersion=void 0;dr.enginesVersion=yn().prisma.enginesVersion});var Xi=Re((Qd,Zi)=>{"use strict";d();u();c();p();m();Zi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var ro=Re((nf,to)=>{"use strict";d();u();c();p();m();to.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var io=Re((cf,no)=>{"use strict";d();u();c();p();m();var Ol=ro();no.exports=e=>typeof e=="string"?e.replace(Ol(),""):e});var Sn=Re((Zy,vo)=>{"use strict";d();u();c();p();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";d();u();c();p();m()});var ko=de(()=>{"use strict";d();u();c();p();m()});var $r,zo=de(()=>{"use strict";d();u();c();p();m();$r=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});d();u();c();p();m();var Ri={};sr(Ri,{defineExtension:()=>Ai,getExtensionContext:()=>Ci});d();u();c();p();m();d();u();c();p();m();function Ai(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ci(e){return e}var ki={};sr(ki,{validator:()=>Si});d();u();c();p();m();d();u();c();p();m();function Si(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var dn,Ii,Oi,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:dn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var Ja={enabled:!Ii&&Oi==null&&Di!=="dumb"&&(dn!=null&&dn!=="0"||Mi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Pm=j(0,0),ur=j(1,22),cr=j(2,22),vm=j(3,23),_i=j(4,24),Tm=j(7,27),Am=j(8,28),Cm=j(9,29),Rm=j(30,39),Ye=j(31,39),Ni=j(32,39),Fi=j(33,39),Li=j(34,39),Sm=j(35,39),Ui=j(36,39),km=j(37,39),Bi=j(90,39),Im=j(90,39),Om=j(40,49),Dm=j(41,49),Mm=j(42,49),_m=j(43,49),Nm=j(44,49),Fm=j(45,49),Lm=j(46,49),Um=j(47,49);d();u();c();p();m();var Wa=100,qi=["green","yellow","blue","magenta","cyan","red"],pr=[],$i=Date.now(),Ka=0,fn=typeof y<"u"?y.env:{};globalThis.DEBUG??=fn.DEBUG??"";globalThis.DEBUG_COLORS??=fn.DEBUG_COLORS?fn.DEBUG_COLORS==="true":!0;var vt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ha(e){let t={color:qi[Ka++%qi.length],enabled:vt.enabled(e),namespace:e,log:vt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&pr.push([o,...n]),pr.length>Wa&&pr.shift(),vt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:za(g)),f=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Ha,{get:(e,t)=>vt[t],set:(e,t,r)=>vt[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){pr.length=0}d();u();c();p();m();d();u();c();p();m();var vl=Hi(),hn=vl.version;d();u();c();p();m();function Ze(e){let t=Tl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Al(e))}function Tl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Al(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}d();u();c();p();m();var Yi="prisma+postgres",fr=`${Yi}:`;function gr(e){return e?.toString().startsWith(`${fr}//`)??!1}function wn(e){if(!gr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var At={};sr(At,{error:()=>kl,info:()=>Sl,log:()=>Rl,query:()=>Il,should:()=>eo,tags:()=>Tt,warn:()=>En});d();u();c();p();m();var Tt={error:Ye("prisma:error"),warn:Fi("prisma:warn"),info:Ui("prisma:info"),query:Li("prisma:query")},eo={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Rl(...e){console.log(...e)}function En(e,...t){eo.warn()&&console.warn(`${Tt.warn} ${e}`,...t)}function Sl(e,...t){console.info(`${Tt.info} ${e}`,...t)}function kl(e,...t){console.error(`${Tt.error} ${e}`,...t)}function Il(e,...t){console.log(`${Tt.query} ${e}`,...t)}d();u();c();p();m();function Pe(e,t){throw new Error(t)}d();u();c();p();m();function bn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function xn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{oo.has(e)||(oo.add(e),En(t,...r))};var J=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};F(J,"PrismaClientInitializationError");d();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};F(se,"PrismaClientKnownRequestError");d();u();c();p();m();var ke=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};F(ke,"PrismaClientRustPanicError");d();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};F(ae,"PrismaClientUnknownRequestError");d();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};F(ee,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var et=9e15,Me=1e9,Pn="0123456789abcdef",Er="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",br="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},co,ve,N=!0,Pr="[DecimalError] ",De=Pr+"Invalid argument: ",po=Pr+"Precision limit exceeded",mo=Pr+"crypto unavailable",fo="[object Decimal]",X=Math.floor,W=Math.pow,Dl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ml=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,_l=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Nl=9007199254740991,Fl=Er.length-1,Tn=br.length-1,R={toStringTag:fo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ll(n,bo(n,r)),n.precision=e,n.rounding=t,O(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=$(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return $(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Tr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Tr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?ge(t,n,i):new t(0):new t(NaN):e.isZero()?ge(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=Tn)return s=ge(g,h+4,T).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=Tn)return s=ge(g,h+4,T).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/D),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+k,s=Oe(f,a),n=t?xr(g,a+10):Oe(e,a),l=$(s,n,a,1),Ct(l.d,i=h,T))do if(a+=10,s=Oe(f,a),n=t?xr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(Ct(l.d,i+=10,T));return N=!0,O(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.constructor;if(e=new C(e),!k.d||!e.d)return!k.s||!e.s?e=new C(NaN):k.d?e.s=-e.s:e=new C(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(f=k.d,T=e.d,a=C.precision,l=C.rounding,!f[0]||!T[0]){if(T[0])e.s=-e.s;else if(f[0])e=new C(k);else return new C(l===3?-0:0);return N?O(e,a,l):e}if(r=X(e.e/D),g=X(k.e/D),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=T.length):(t=T,r=g,s=f.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=T.length,h=n0;--n)f[s++]=0;for(n=T.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=vr(f,n),N?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ho(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Bl(n,bo(n,r)),n.precision=e,n.rounding=t,O(ve>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,f=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=vr(o,r),N?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Cn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=O(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.d,S=k.constructor;if(!C)return new S(k);if(f=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=ho(C)-k.e-1,s=o%D,t.d[0]=W(10,s<0?D+s:s),e==null)e=o>0?t:f;else{if(a=new S(e),!a.isInt()||a.lt(f))throw Error(De+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new S(z(C)),g=S.precision,S.precision=o=C.length*D*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=k.s,T=$(f,n,o,1).minus(k).abs().cmp($(l,r,o,1).minus(k).abs())<1?[f,n]:[l,r],S.precision=g,N=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Cn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=$(r,e,0,t,1).times(e),N=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Cn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/D),t>=e.d.length-1&&(r=f<0?-f:f)<=Nl)return i=yo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=An(e.times(Oe(a,n+r)),n),i.d&&(i=O(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=O(An(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=W(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function yr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Ll(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Tr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,T,k,C,S,M,_,B,I,L,oe,Q,tn,nr,xt,rn,ce,ir,or=n.constructor,nn=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new or(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?nn*0:nn/0);for(l?(k=1,g=n.e-i.e):(l=pe,k=D,g=X(n.e/k)-X(i.e/k)),ce=V.length,xt=Y.length,_=new or(nn),B=_.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(Q=o=or.precision,s=or.rounding):a?Q=o+(n.e-i.e)+1:Q=o,Q<0)B.push(1),C=!0;else{if(Q=Q/k+2|0,h=0,ce==1){for(T=0,V=V[0],Q++;(h1&&(V=e(V,T,l),Y=e(Y,T,l),ce=V.length,xt=Y.length),nr=ce,I=Y.slice(0,ce),L=I.length;L=l/2&&++rn;do T=0,f=t(V,I,ce,L),f<0?(oe=I[0],ce!=L&&(oe=oe*l+(I[1]||0)),T=oe/rn|0,T>1?(T>=l&&(T=l-1),S=e(V,T,l),M=S.length,L=I.length,f=t(S,I,M,L),f==1&&(T--,r(S,ce=10;T/=10)h++;_.e=h+g*k-1,O(_,a?o+_.e+1:o,s,C)}return _}}();function O(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,D-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function vr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function xr(e,t,r){if(t>Fl)throw N=!0,r&&(e.precision=r),Error(po);return O(new e(Er),t,1,!0)}function ge(e,t,r){if(t>Tn)throw Error(po);return O(new e(br),t,r,!0)}function ho(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function yo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(N=!1;;){if(r%2&&(o=o.times(t),lo(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),lo(t.d,s)}return N=!0,o}function ao(e){return e.d[e.d.length-1]&1}function wo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(f<3&&Ct(s.d,l-n,k,f))T.precision=l+=10,r=o=a=new T(1),g=0,f++;else return O(s,T.precision=C,k,N=!0);else return T.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,T,k=1,C=10,S=e,M=S.d,_=S.constructor,B=_.rounding,I=_.precision;if(S.s<0||!M||!M[0]||!S.e&&M[0]==1&&M.length==1)return new _(M&&!M[0]?-1/0:S.s!=1?NaN:M?0:S);if(t==null?(N=!1,g=I):g=t,_.precision=g+=C,r=z(M),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return f=xr(_,g+2,I).times(o+""),S=Oe(new _(n+"."+r.slice(1)),g-C).plus(f),_.precision=I,t==null?O(S,I,B,N=!0):S;for(h=S,l=s=S=$(S.minus(1),S.plus(1),g,1),T=O(S.times(S),g,1),i=3;;){if(s=O(s.times(T),g,1),f=l.plus($(s,new _(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(xr(_,g+2,I).times(o+""))),l=$(l,new _(k),g,1),t==null)if(Ct(l.d,g-C,B,a))_.precision=g+=C,f=s=S=$(h.minus(1),h.plus(1),g,1),T=O(S.times(S),g,1),i=a=1;else return O(l,_.precision=I,B,N=!0);else return _.precision=I,l;l=f,i+=2}}function Eo(e){return String(e.s*e.s/0)}function wr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),go.test(t))return wr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ml.test(t))r=16,t=t.toLowerCase();else if(Dl.test(t))r=2;else if(_l.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=yo(n,new n(r),o,o*2)),f=yr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=vr(f,g),e.d=f,N=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):qe.pow(2,l))),N=!0,e)}function Bl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Tr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/D);for(N=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Tr(e,t){for(var r=e;--t;)r*=e;return r}function bo(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=ao(r)?n?2:3:n?4:1,t;ve=ao(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor,C=r!==void 0;if(C?(ne(r,1,Me),n===void 0?n=k.rounding:ne(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=Eo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=yr(he(T),10,i),T.e=T.d.length),h=yr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=$(e,T,r,n,0,i),h=e.d,o=e.e,f=co),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=yr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function ql(e){return new this(e).abs()}function $l(e){return new this(e).acos()}function Vl(e){return new this(e).acosh()}function jl(e,t){return new this(e).plus(t)}function Gl(e){return new this(e).asin()}function Ql(e){return new this(e).asinh()}function Jl(e){return new this(e).atan()}function Wl(e){return new this(e).atanh()}function Kl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function Hl(e){return new this(e).cbrt()}function zl(e){return O(e=new this(e),e.e+1,2)}function Yl(e,t,r){return new this(e).clamp(t,r)}function Zl(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=vn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(mo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Xl(e){return new this(e).cos()}function eu(e){return new this(e).cosh()}function xo(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,uo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(mo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Su});d();u();c();p();m();d();u();c();p();m();function Su(e){return{name:e.name,values:e.values.map(t=>t.name)}}d();u();c();p();m();var kt=(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.updateManyAndReturn="updateManyAndReturn",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw",I))(kt||{});var ku=Ue(Xi());var Iu={red:Ye,gray:Bi,dim:cr,bold:ur,underline:_i,highlightSource:e=>e.highlight()},Ou={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Du({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Mu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(_u(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function _u(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Rr(e){let t=e.showColors?Iu:Ou,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Du(e),Mu(r,t)}d();u();c();p();m();var Oo=Ue(Sn());d();u();c();p();m();function Co(e,t,r){let n=Ro(e),i=Nu(n),o=Lu(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ro(e){return e.errors.flatMap(t=>t.kind==="Union"?Ro(t):[t])}function Nu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Fu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Fu(e,t){return[...new Set(e.concat(t))]}function Lu(e){return xn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Ao(t)-Ao(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ao(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();ko();d();u();c();p();m();var it=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};So();d();u();c();p();m();d();u();c();p();m();var kr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Ir=e=>e,Or={bold:Ir,red:Ir,green:Ir,dim:Ir,enabled:!1},Io={bold:ur,red:Ye,green:Ni,dim:cr,enabled:!0},ot={write(e){e.writeLine(",")}};d();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var st=class extends Ne{items=[];addItem(t){return this.items.push(new kr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(ot,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var at=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof st&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(ot,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var It=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(ot,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Uu(e,t);break;case"IncludeOnScalar":Bu(e,t);break;case"EmptySelection":qu(e,t,r);break;case"UnknownSelectionField":Gu(e,t);break;case"InvalidSelectionValue":Qu(e,t);break;case"UnknownArgument":Ju(e,t);break;case"UnknownInputField":Wu(e,t);break;case"RequiredArgumentMissing":Ku(e,t);break;case"InvalidArgumentType":Hu(e,t);break;case"InvalidArgumentValue":zu(e,t);break;case"ValueTooLarge":Yu(e,t);break;case"SomeFieldsMissing":Zu(e,t);break;case"TooManyFieldsGiven":Xu(e,t);break;case"Union":Co(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Uu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Bu(e,t){let[r,n]=lt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Ot(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function qu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){$u(e,t,i);return}if(n.hasField("select")){Vu(e,t);return}}if(r?.[_e(e.outputType.name)]){ju(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function $u(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Vu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Ot(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ju(e,t){let r=new It;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=lt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new at;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Gu(e,t){let r=No(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":ec(n,e.outputType);break;case"omit":tc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Ot(n)),i.join(" ")})}function Qu(e,t){let r=No(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ju(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),rc(n,e.arguments)),t.addErrorMessage(i=>Do(i,r,e.arguments.map(o=>o.name)))}function Wu(e,t){let[r,n]=lt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Fo(o,e.inputType)}t.addErrorMessage(o=>Do(o,n,e.inputType.fields.map(s=>s.name)))}function Do(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ic(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Ot(e)),n.join(" ")}function Ku(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=lt(e.argumentPath),s=new It,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=lt(e.dependentArgumentPath);t.addErrorMessage(f=>`Argument \`${f.green(o)}\` is required because argument \`${f.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Hu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Dr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function zu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Yu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Zu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Fo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Dr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Ot(i)),o.join(" ")})}function Xu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function ec(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function tc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function rc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function No(e,t){let[r,n]=lt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Fo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function lt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ot({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var nc=3;function ic(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>nc||o`}};function ut(e){return e instanceof Dt}d();u();c();p();m();var Mr=Symbol(),In=new WeakMap,Ae=class{constructor(t){t===Mr?In.set(this,`Prisma.${this._getName()}`):In.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return In.get(this)}},Mt=class extends Ae{_getNamespace(){return"NullTypes"}},_t=class extends Mt{#e};Dn(_t,"DbNull");var Nt=class extends Mt{#e};Dn(Nt,"JsonNull");var Ft=class extends Mt{#e};Dn(Ft,"AnyNull");var On={classes:{DbNull:_t,JsonNull:Nt,AnyNull:Ft},instances:{DbNull:new _t(Mr),JsonNull:new Nt(Mr),AnyNull:new Ft(Mr)}};function Dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Lo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Mn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function ct(e){return new Mn(Uo(e))}function Uo(e){let t=new at;for(let[r,n]of Object.entries(e)){let i=new _r(r,Bo(n));t.addField(i)}return t}function Bo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(nt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Ar(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ae?new H(`Prisma.${e._getName()}`):ut(e)?new H(`prisma.${_e(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?oc(e):typeof e=="object"?Uo(e):new H(Object.prototype.toString.call(e))}function oc(e){let t=new st;for(let r of e)t.addItem(Bo(r));return t}function Nr(e,t){let r=t==="pretty"?Io:Or,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ct(e);for(let h of t)Sr(h,a,s);let{message:l,args:f}=Nr(a,r),g=Rr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new ee(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function $o(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:sc({...e,...qo(t.name,e,t.result.$allModels),...qo(t.name,e,t.result[n])})}function sc(e){let t=new ye,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function qo(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ac(t,o,i)})):{}}function ac(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Vo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ye;modelExtensionsCache=new ye;queryCallbacksCache=new ye;clientExtensions=St(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=St(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>$o(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},pt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function Go(e){return e instanceof Ur}function lc(e){return new Ur(e)}d();u();c();p();m();d();u();c();p();m();var Qo=Symbol(),Lt=class{constructor(t){if(t!==Qo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_n:t}},_n=new Lt(Qo);function be(e){return e instanceof Lt}var uc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Jo="explicitly `undefined` values are not allowed";function Fn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=pt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:uc[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:cc(e,t,i,n)}}function cc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),fc(e,n)):pc(n,t,r)}function pc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&mc(n,t,e),dc(n,r,e),n}function mc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Ln(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function dc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=jo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Ln(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function fc(e,t){let r={},n=t.getComputedFields(),i=Vo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Ln(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(rt(e)){if(Ar(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Go(e))return{$type:"Param",value:e.name};if(ut(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return gc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(hc(e))return e.values;if(nt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ae){if(e!==On.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(yc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Jo}))}return r}function gc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[_e(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();function Ho(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Bt=class{_client;constructor(t){this._client=t}prometheus(t){return Ho(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Ho(this._client),this._client._engine.metrics({format:"json",...t})}};d();u();c();p();m();function wc(e,t){let r=St(()=>Ec(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ec(e){return{datamodel:{models:Un(e.models),enums:Un(e.enums),types:Un(e.types)}}}function Un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Bn=new WeakMap,Br="$$PrismaTypedSql",qt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function bc(e){return(...t)=>new qt(e,t)}function qr(e){return e!=null&&e[Br]===Br}d();u();c();p();m();var ma=Ue(yn());d();u();c();p();m();zo();Gi();Ki();d();u();c();p();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Vr={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Vr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Xo=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=vc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=es(Reflect.ownKeys(o),r),a=es(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Vr,...l?.getPropertyDescriptor(s)}:Vr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Xo]=function(){let o={...this};return delete o[Xo],o},i}function vc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function es(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function ts(e){if(e===void 0)return"";let t=ct(e);return new it(0,{colors:Or}).write(t).toString()}d();u();c();p();m();var Tc="P2037";function Qr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Ac(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Ac(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Tc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var qn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var rs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Rc(e);return Object.entries(t).reduce((n,[i,o])=>(rs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Rc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ns(e,t){let r=Jr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}d();u();c();p();m();function Sc(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function kc(e={}){return typeof e.select=="object"?t=>Jr(e)(t)._count:t=>Jr(e)(t)._count._all}function is(e,t){return t({action:"count",unpacker:kc(e),argsMapper:Sc})(e)}d();u();c();p();m();function Ic(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function os(e,t){return t({action:"groupBy",unpacker:Oc(e),argsMapper:Ic})(e)}function ss(e,t,r){if(t==="aggregate")return n=>ns(n,r);if(t==="count")return n=>is(n,r);if(t==="groupBy")return n=>os(n,r)}d();u();c();p();m();function as(e,t){let r=t.fields.filter(i=>!i.relationName),n=Po(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Dt(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var ls=e=>Array.isArray(e)?e:e.split("."),$n=(e,t)=>ls(t).reduce((r,n)=>r&&r[n],e),us=(e,t,r)=>ls(t).reduceRight((n,i,o,s)=>Object.assign({},$n(e,s.slice(0,o)),{[i]:n}),r);function Dc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Mc(e,t,r){return t===void 0?e??{}:us(t,r,e||!0)}function Vn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Fe(e._errorFormat),g=Dc(n,i),h=Mc(l,o,g),T=r({dataPath:g,callsite:f})(h),k=_c(e,t);return new Proxy(T,{get(C,S){if(!k.includes(S))return C[S];let _=[a[S].type,r,S],B=[g,h];return Vn(e,..._,...B)},...jr([...k,...Object.getOwnPropertyNames(T)])})}}function _c(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Nc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fc=["aggregate","count","groupBy"];function jn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Lc(e,t),Bc(e,t),$t(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Lc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})},{action:o,args:l,model:t})};return Nc.includes(o)?Vn(e,t,s):Uc(i)?ss(e,i,s):s({})}}}function Uc(e){return Fc.includes(e)}function Bc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return as(t,r)}))}d();u();c();p();m();function cs(e){return e.replace(/^./,t=>t.toUpperCase())}var Gn=Symbol();function Vt(e){let t=[qc(e),$c(e),te(Gn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),me(e,t)}function qc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function $c(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=cs(i);if(e._runtimeDataModel.models[o]!==void 0)return jn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return jn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ps(e){return e[Gn]?e[Gn]:e}function ms(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Vt(t)}d();u();c();p();m();d();u();c();p();m();function ds({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(mt(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(mt(f))}Vc(e,l.needs)&&s.push(jc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Vc(e,t){return t.every(r=>bn(e,r))}function jc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Wr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Wr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function gs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Wr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=Ee(l);return ds({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Gc=["$connect","$disconnect","$on","$transaction","$use","$extends"],hs=Gc;function ys(e){if(e instanceof ue)return Qc(e);if(qr(e))return Jc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ys(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(o,l),a.args=s,Es(e,a,r,n+1)}})})}function bs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Es(e,t,s)}function xs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ps(r,n,0,e):e(r)}}function Ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(i,l),Ps(a,t,r+1,n)}})}var ws=e=>e;function vs(e=ws,t=ws){return r=>e(t(r))}d();u();c();p();m();var Ts=Z("prisma:client"),As={Vercel:"vercel","Netlify CI":"netlify"};function Cs({postinstall:e,ciName:t,clientVersion:r}){if(Ts("checkPlatformCaching:postinstall",e),Ts("checkPlatformCaching:ciName",t),e===!0&&t&&t in As){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +var fa=Object.create;var nn=Object.defineProperty;var da=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)nn(e,r,{get:t[r],enumerable:!0})},wa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ga(t))!ya.call(e,i)&&i!==r&&nn(e,i,{get:()=>t[i],enumerable:!(n=da(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?fa(ha(e)):{},wa(t||!e||!e.__esModule?nn(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var vi=Ce(ze=>{"use strict";f();u();c();p();m();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ea=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,oe=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ooe?oe:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),ba=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),on=Ea(),We=ba(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ca;ze.INSPECT_MAX_BYTES=50;var sr=2147483647;ze.kMaxLength=sr;A.TYPED_ARRAY_SUPPORT=xa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function xa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>sr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ln(e)}return ci(e,t,r)}A.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return va(e,t);if(ArrayBuffer.isView(e))return Ta(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function pi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Pa(e,t,r){return pi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Pa(e,t,r)};function ln(e){return pi(e),xe(e<0?0:un(e)|0)}A.allocUnsafe=function(e){return ln(e)};A.allocUnsafeSlow=function(e){return ln(e)};function va(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function sn(e){let t=e.length<0?0:un(e.length)|0,r=xe(t);for(let n=0;n=sr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sr.toString(16)+" bytes");return e|0}function Ca(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return an(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:an(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function Ra(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return La(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return Na(this,t,r);case"latin1":case"binary":return Fa(this,t,r);case"base64":return Ma(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};oi&&(A.prototype[oi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,pn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:si(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Sa(this,e,t,r);case"utf8":case"utf-8":return Ia(this,e,t,r);case"ascii":case"latin1":case"binary":return Oa(this,e,t,r);case"base64":return ka(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ma(e,t,r){return t===0&&r===e.length?on.fromByteArray(e):on.fromByteArray(e.slice(t,r))}function gi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return _a(n)}var ai=4096;function _a(e){let t=e.length;if(t<=ai)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function hi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function yi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Re(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Re(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Re(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Re(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ba(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function xi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Ba(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var qa=/[^+/0-9A-Za-z-_]/g;function Va(e){if(e=e.split("=")[0],e=e.trim().replace(qa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function an(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function $a(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return on.toByteArray(Va(e))}function ar(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function pn(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?Ja:e}function Ja(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(vi())});function Ya(){return!1}function dn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Za(){return dn()}function Xa(){return[]}function el(e){e(null,[])}function tl(){return""}function rl(){return""}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){}function ul(){}function cl(){}function pl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ml(e,t){t(null,dn())}var fl,dl,$i,ji=fe(()=>{"use strict";f();u();c();p();m();fl={},dl={existsSync:Ya,lstatSync:dn,stat:ml,statSync:Za,readdirSync:Xa,readdir:el,readlinkSync:tl,realpathSync:rl,chmodSync:nl,renameSync:il,mkdirSync:ol,rmdirSync:sl,rmSync:al,unlinkSync:ll,watchFile:ul,unwatchFile:cl,watch:pl,promises:fl},$i=dl});function gl(...e){return e.join("/")}function hl(...e){return e.join("/")}function yl(e){let t=Gi(e),r=Ji(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Gi(e){let t=e.split("/");return t[t.length-1]}function Ji(e){return e.split("/").slice(0,-1).join("/")}function El(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Qi,wl,bl,xl,pr,Ki=fe(()=>{"use strict";f();u();c();p();m();Qi="/",wl=":";bl={sep:Qi},xl={basename:Gi,delimiter:wl,dirname:Ji,join:hl,normalize:El,parse:yl,posix:bl,resolve:gl,sep:Qi},pr=xl});var Wi=Ce((xf,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var hn=Ce((_f,Cl)=>{Cl.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Hi=Ce(mr=>{"use strict";f();u();c();p();m();Object.defineProperty(mr,"__esModule",{value:!0});mr.enginesVersion=void 0;mr.enginesVersion=hn().prisma.enginesVersion});var Zi=Ce((Kf,Yi)=>{"use strict";f();u();c();p();m();Yi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var to=Ce((od,eo)=>{"use strict";f();u();c();p();m();eo.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var no=Ce((pd,ro)=>{"use strict";f();u();c();p();m();var kl=to();ro.exports=e=>typeof e=="string"?e.replace(kl(),""):e});var Rn=Ce((Jy,Po)=>{"use strict";f();u();c();p();m();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var So=fe(()=>{"use strict";f();u();c();p();m()});var Vr,Ho=fe(()=>{"use strict";f();u();c();p();m();Vr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});f();u();c();p();m();var Ci={};or(Ci,{defineExtension:()=>Ti,getExtensionContext:()=>Ai});f();u();c();p();m();f();u();c();p();m();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Ai(e){return e}var Si={};or(Si,{validator:()=>Ri});f();u();c();p();m();f();u();c();p();m();function Ri(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var mn,Ii,Oi,ki,Di=!0;typeof y<"u"&&({FORCE_COLOR:mn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:ki}=y.env||{},Di=y.stdout&&y.stdout.isTTY);var Qa={enabled:!Ii&&Oi==null&&ki!=="dumb"&&(mn!=null&&mn!=="0"||Di)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Qa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var vm=j(0,0),lr=j(1,22),ur=j(2,22),Tm=j(3,23),Mi=j(4,24),Am=j(7,27),Cm=j(8,28),Rm=j(9,29),Sm=j(30,39),Ye=j(31,39),_i=j(32,39),Ni=j(33,39),Fi=j(34,39),Im=j(35,39),Li=j(36,39),Om=j(37,39),Ui=j(90,39),km=j(90,39),Dm=j(40,49),Mm=j(41,49),_m=j(42,49),Nm=j(43,49),Fm=j(44,49),Lm=j(45,49),Um=j(46,49),Bm=j(47,49);f();u();c();p();m();var Ka=100,Bi=["green","yellow","blue","magenta","cyan","red"],cr=[],qi=Date.now(),Wa=0,fn=typeof y<"u"?y.env:{};globalThis.DEBUG??=fn.DEBUG??"";globalThis.DEBUG_COLORS??=fn.DEBUG_COLORS?fn.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ha(e){let t={color:Bi[Wa++%Bi.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&cr.push([o,...n]),cr.length>Ka&&cr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:za(g)),d=`+${Date.now()-qi}ms`;qi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Ha,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){cr.length=0}f();u();c();p();m();f();u();c();p();m();var vl=Wi(),gn=vl.version;f();u();c();p();m();function Ze(e){let t=Tl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Al(e))}function Tl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Al(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var zi="prisma+postgres",fr=`${zi}:`;function dr(e){return e?.toString().startsWith(`${fr}//`)??!1}function yn(e){if(!dr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Tt={};or(Tt,{error:()=>Il,info:()=>Sl,log:()=>Rl,query:()=>Ol,should:()=>Xi,tags:()=>vt,warn:()=>wn});f();u();c();p();m();var vt={error:Ye("prisma:error"),warn:Ni("prisma:warn"),info:Li("prisma:info"),query:Fi("prisma:query")},Xi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Rl(...e){console.log(...e)}function wn(e,...t){Xi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Sl(e,...t){console.info(`${vt.info} ${e}`,...t)}function Il(e,...t){console.error(`${vt.error} ${e}`,...t)}function Ol(e,...t){console.log(`${vt.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function En(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function gr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function bn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{io.has(e)||(io.add(e),wn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(se,"PrismaClientKnownRequestError");f();u();c();p();m();var Se=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Se,"PrismaClientRustPanicError");f();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ae,"PrismaClientUnknownRequestError");f();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(ee,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Ie(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function so(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function At(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function Dl(e){return{models:xn(e.models),enums:xn(e.enums),types:xn(e.types)}}function xn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yr(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,Me=1e9,Pn="0123456789abcdef",br="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},co,Pe,_=!0,vr="[DecimalError] ",De=vr+"Invalid argument: ",po=vr+"Precision limit exceeded",mo=vr+"crypto unavailable",fo="[object Decimal]",X=Math.floor,K=Math.pow,Ml=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_l=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Fl=9007199254740991,Ll=br.length-1,Tn=xr.length-1,C={toStringTag:fo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ul(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Ar(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Ar(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=Tn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=Tn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),Ct(l.d,i=h,T))do if(a+=10,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ct(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=X(e.e/D),g=X(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Tr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ho(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=ql(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Tr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Cn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=ho(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(De+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(z(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Cn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Cn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=X(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Fl)return i=yo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=An(e.times(ke(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=k(An(e.times(ke(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Ul(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Ar(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,R,M,F,B,O,L,oe,J,en,rr,bt,tn,ce,nr,ir=n.constructor,rn=n.s==i.s?1:-1,Y=n.d,$=i.d;if(!Y||!Y[0]||!$||!$[0])return new ir(!n.s||!i.s||(Y?$&&Y[0]==$[0]:!$)?NaN:Y&&Y[0]==0||!$?rn*0:rn/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=X(n.e/I)-X(i.e/I)),ce=$.length,bt=Y.length,F=new ir(rn),B=F.d=[],h=0;$[h]==(Y[h]||0);h++);if($[h]>(Y[h]||0)&&g--,o==null?(J=o=ir.precision,s=ir.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Y=e(Y,T,l),ce=$.length,bt=Y.length),rr=ce,O=Y.slice(0,ce),L=O.length;L=l/2&&++tn;do T=0,d=t($,O,ce,L),d<0?(oe=O[0],ce!=L&&(oe=oe*l+(O[1]||0)),T=oe/tn|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function Tr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Pr(e,t,r){if(t>Ll)throw _=!0,r&&(e.precision=r),Error(po);return k(new e(br),t,1,!0)}function he(e,t,r){if(t>Tn)throw Error(po);return k(new e(xr),t,r,!0)}function ho(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function yo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),lo(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),lo(t.d,s)}return _=!0,o}function ao(e){return e.d[e.d.length-1]&1}function wo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ct(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=z(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=z(R.d),n=r.charAt(0),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Pr(F,g+2,O).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),z(d.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Pr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ct(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function Eo(e){return String(e.s*e.s/0)}function Er(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),go.test(t))return Er(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_l.test(t))r=16,t=t.toLowerCase();else if(Ml.test(t))r=2;else if(Nl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=yo(n,new n(r),o,o*2)),d=wr(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Tr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):ve.pow(2,l))),_=!0,e)}function ql(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ar(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Ar(e,t){for(var r=e;--t;)r*=e;return r}function bo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=ao(r)?n?2:3:n?4:1,t;Pe=ao(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(ne(r,1,Me),n===void 0?n=I.rounding:ne(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=Eo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=wr(ye(T),10,i),T.e=T.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=co),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Vl(e){return new this(e).abs()}function $l(e){return new this(e).acos()}function jl(e){return new this(e).acosh()}function Gl(e,t){return new this(e).plus(t)}function Jl(e){return new this(e).asin()}function Ql(e){return new this(e).asinh()}function Kl(e){return new this(e).atan()}function Wl(e){return new this(e).atanh()}function Hl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function zl(e){return new this(e).cbrt()}function Yl(e){return k(e=new this(e),e.e+1,2)}function Zl(e,t,r){return new this(e).clamp(t,r)}function Xl(e){if(!e||typeof e!="object")throw Error(vr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=vn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(mo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function eu(e){return new this(e).cos()}function tu(e){return new this(e).cosh()}function xo(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,uo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(mo);else for(;o=10;i/=10)n++;nRt,datamodelEnumToSchemaEnum:()=>Cu});f();u();c();p();m();f();u();c();p();m();function Cu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var Rt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(Rt||{});var Ru=Ue(Zi());var Su={red:Ye,gray:Ui,dim:ur,bold:lr,underline:Mi,highlightSource:e=>e.highlight()},Iu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ou({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ku({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Du(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Du(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Rr(e){let t=e.showColors?Su:Iu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ou(e),ku(r,t)}f();u();c();p();m();var Oo=Ue(Rn());f();u();c();p();m();function Ao(e,t,r){let n=Co(e),i=Mu(n),o=Nu(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Co(e){return e.errors.flatMap(t=>t.kind==="Union"?Co(t):[t])}function Mu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:_u(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function _u(e,t){return[...new Set(e.concat(t))]}function Nu(e){return bn(e,(t,r)=>{let n=vo(t),i=vo(r);return n!==i?n-i:To(t)-To(r)})}function vo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function To(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();So();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Ro();f();u();c();p();m();f();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var Or=e=>e,kr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},Io={bold:lr,red:Ye,green:_i,dim:ur,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends Ne{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var St=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Fu(e,t);break;case"IncludeOnScalar":Lu(e,t);break;case"EmptySelection":Uu(e,t,r);break;case"UnknownSelectionField":$u(e,t);break;case"InvalidSelectionValue":ju(e,t);break;case"UnknownArgument":Gu(e,t);break;case"UnknownInputField":Ju(e,t);break;case"RequiredArgumentMissing":Qu(e,t);break;case"InvalidArgumentType":Ku(e,t);break;case"InvalidArgumentValue":Wu(e,t);break;case"ValueTooLarge":Hu(e,t);break;case"SomeFieldsMissing":zu(e,t);break;case"TooManyFieldsGiven":Yu(e,t);break;case"Union":Ao(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Fu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Lu(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${It(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Uu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Bu(e,t,i);return}if(n.hasField("select")){qu(e,t);return}}if(r?.[Ie(e.outputType.name)]){Vu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Bu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function qu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Mo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Vu(e,t){let r=new St;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function $u(e,t){let r=_o(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Mo(n,e.outputType);break;case"include":Zu(n,e.outputType);break;case"omit":Xu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function ju(e,t){let r=_o(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Gu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),ec(n,e.arguments)),t.addErrorMessage(i=>ko(i,r,e.arguments.map(o=>o.name)))}function Ju(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&No(o,e.inputType)}t.addErrorMessage(o=>ko(o,n,e.inputType.fields.map(s=>s.name)))}function ko(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=rc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function Qu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new St,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Do).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Do(e){return e.kind==="list"?`${Do(e.elementType)}[]`:e.name}function Ku(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Dr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Wu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Hu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function zu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&No(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Dr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(It(i)),o.join(" ")})}function Yu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Mo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Zu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Xu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function ec(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function _o(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function No(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var tc=3;function rc(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>tc||o`}};function lt(e){return e instanceof Ot}f();u();c();p();m();var Mr=Symbol(),In=new WeakMap,Te=class{constructor(t){t===Mr?In.set(this,`Prisma.${this._getName()}`):In.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return In.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{#e};kn(Dt,"DbNull");var Mt=class extends kt{#e};kn(Mt,"JsonNull");var _t=class extends kt{#e};kn(_t,"AnyNull");var On={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:_t},instances:{DbNull:new Dt(Mr),JsonNull:new Mt(Mr),AnyNull:new _t(Mr)}};function kn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Fo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Fo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Fo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Dn(Lo(e))}function Lo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new _r(r,Uo(n));t.addField(i)}return t}function Uo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=yr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Te?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Ie(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?nc(e):typeof e=="object"?Lo(e):new H(Object.prototype.toString.call(e))}function nc(e){let t=new ot;for(let r of e)t.addItem(Uo(r));return t}function Nr(e,t){let r=t==="pretty"?Io:kr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Sr(h,a,s);let{message:l,args:d}=Nr(a,r),g=Rr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new ee(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function qo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:ic({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function ic(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return gr(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?gr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:oc(t,o,i)})):{}}function oc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Vo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=At(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=At(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function jo(e){return e instanceof Ur}function sc(e){return new Ur(e)}f();u();c();p();m();f();u();c();p();m();var Go=Symbol(),Nt=class{constructor(t){if(t!==Go)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Mn:t}},Mn=new Nt(Go);function be(e){return e instanceof Nt}var ac={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Jo="explicitly `undefined` values are not allowed";function Nn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new _n({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:ac[t],query:Ft(r,h)}}function Ft({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:lc(e,t,i,n)}}function lc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),mc(e,n)):uc(n,t,r)}function uc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&cc(n,t,e),pc(n,r,e),n}function cc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Fn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ft(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ft(i,o)}}function pc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=$o(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Fn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function mc(e,t){let r={},n=t.getComputedFields(),i=Vo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Fn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ft({},a):r[o]=!0;continue}r[o]=Ft(s,a)}}return r}function Qo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(yr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(jo(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return fc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(dc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==On.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(gc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Qo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Jo}))}return r}function fc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ie(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:qe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Wo(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Lt=class{_client;constructor(t){this._client=t}prometheus(t){return Wo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Wo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function hc(e,t){let r=At(()=>yc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function yc(e){return{datamodel:{models:Ln(e.models),enums:Ln(e.enums),types:Ln(e.types)}}}function Ln(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var Un=new WeakMap,Br="$$PrismaTypedSql",Ut=class{constructor(t,r){Un.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Un.get(this).sql}get values(){return Un.get(this).values}};function wc(e){return(...t)=>new Ut(e,t)}function qr(e){return e!=null&&e[Br]===Br}f();u();c();p();m();var ma=Ue(hn());f();u();c();p();m();Ho();ji();Ki();f();u();c();p();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var $r={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>$r,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zo=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=xc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Xo(Reflect.ownKeys(o),r),a=Xo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...$r,...l?.getPropertyDescriptor(s)}:$r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Zo]=function(){let o={...this};return delete o[Zo],o},i}function xc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Xo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function pt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function es(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:kr}).write(t).toString()}f();u();c();p();m();var Pc="P2037";function Jr({error:e,user_facing_error:t},r,n){return t.error_code?new se(vc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function vc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Pc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Bn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Bn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ts={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=Ac(e);return Object.entries(t).reduce((n,[i,o])=>(ts[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ac(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function rs(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}f();u();c();p();m();function Cc(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Rc(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function ns(e,t){return t({action:"count",unpacker:Rc(e),argsMapper:Cc})(e)}f();u();c();p();m();function Sc(e={}){let t=mt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Ic(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function is(e,t){return t({action:"groupBy",unpacker:Ic(e),argsMapper:Sc})(e)}function os(e,t,r){if(t==="aggregate")return n=>rs(n,r);if(t==="count")return n=>ns(n,r);if(t==="groupBy")return n=>is(n,r)}f();u();c();p();m();function ss(e,t){let r=t.fields.filter(i=>!i.relationName),n=so(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ot(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var as=e=>Array.isArray(e)?e:e.split("."),qn=(e,t)=>as(t).reduce((r,n)=>r&&r[n],e),ls=(e,t,r)=>as(t).reduceRight((n,i,o,s)=>Object.assign({},qn(e,s.slice(0,o)),{[i]:n}),r);function Oc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function kc(e,t,r){return t===void 0?e??{}:ls(t,r,e||!0)}function Vn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Fe(e._errorFormat),g=Oc(n,i),h=kc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Dc(e,t);return new Proxy(T,{get(S,R){if(!I.includes(R))return S[R];let F=[a[R].type,r,R],B=[g,h];return Vn(e,...F,...B)},...jr([...I,...Object.getOwnPropertyNames(T)])})}}function Dc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Mc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],_c=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Nc(e,t),Lc(e,t),Bt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Nc(e,t){let r=Ee(t),n=Object.keys(Rt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Mc.includes(o)?Vn(e,t,s):Fc(i)?os(e,i,s):s({})}}}function Fc(e){return _c.includes(e)}function Lc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ss(t,r)}))}f();u();c();p();m();function us(e){return e.replace(/^./,t=>t.toUpperCase())}var jn=Symbol();function qt(e){let t=[Uc(e),Bc(e),te(jn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Bt(r)),me(e,t)}function Uc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Bc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=us(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function cs(e){return e[jn]?e[jn]:e}function ps(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return qt(t)}f();u();c();p();m();f();u();c();p();m();function ms({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(pt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(pt(d))}qc(e,l.needs)&&s.push(Vc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function qc(e,t){return t.every(r=>En(e,r))}function Vc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Kr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Kr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ds({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return ms({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var $c=["$connect","$disconnect","$on","$transaction","$extends"],gs=$c;function hs(e){if(e instanceof ue)return jc(e);if(qr(e))return Gc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:hs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ps(o,l),a.args=s,ws(e,a,r,n+1)}})})}function Es(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ws(e,t,s)}function bs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?xs(r,n,0,e):e(r)}}function xs(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ps(i,l),xs(a,t,r+1,n)}})}var ys=e=>e;function Ps(e=ys,t=ys){return r=>e(t(r))}f();u();c();p();m();var vs=Z("prisma:client"),Ts={Vercel:"vercel","Netlify CI":"netlify"};function As({postinstall:e,ciName:t,clientVersion:r}){if(vs("checkPlatformCaching:postinstall",e),vs("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ts){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${As[t]}-build`;throw console.error(n),new J(n,r)}}d();u();c();p();m();function Rs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();var Wc=()=>globalThis.process?.release?.name==="node",Kc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Hc=()=>!!globalThis.Deno,zc=()=>typeof globalThis.Netlify=="object",Yc=()=>typeof globalThis.EdgeRuntime=="object",Zc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Xc(){return[[zc,"netlify"],[Yc,"edge-light"],[Zc,"workerd"],[Hc,"deno"],[Kc,"bun"],[Wc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var ep={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Qn(){let e=Xc();return{id:e,prettyName:ep[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();var Ss="6.13.0";d();u();c();p();m();d();u();c();p();m();function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Qn().id==="workerd"?new J(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Ts[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Cs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Jc=()=>globalThis.process?.release?.name==="node",Qc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Kc=()=>!!globalThis.Deno,Wc=()=>typeof globalThis.Netlify=="object",Hc=()=>typeof globalThis.EdgeRuntime=="object",zc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Yc(){return[[Wc,"netlify"],[Hc,"edge-light"],[zc,"workerd"],[Kc,"deno"],[Qc,"bun"],[Jc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Zc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=Yc();return{id:e,prettyName:Zc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function Rs(e,t){throw new Error(t)}function Xc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ep(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function $t(e){return e===null?e:Array.isArray(e)?e.map($t):typeof e=="object"?Xc(e)?tp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ep(e,$t):e}function tp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Rs(t,"Unknown tagged value")}}var Ss="6.14.0";f();u();c();p();m();f();u();c();p();m();function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Gn().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Kr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Kr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var Ve=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};F(Ve,"InvalidDatasourceError");function ks(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new Ve(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=wn(i)?"http:":"https:",f=new URL(i.href.replace(o,l));return{apiKey:a,url:f}}d();u();c();p();m();var Is=Ue(zi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Is.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};d();u();c();p();m();function rp(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(rp(e))}d();u();c();p();m();d();u();c();p();m();var gt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};F(gt,"ForcedRetryError");d();u();c();p();m();var je=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};F(je,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var G=class extends ie{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};F(Ge,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Wn="This request could not be understood by the server",Gt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Wn,U(t,!1)),n&&(this.code=n)}};F(Gt,"BadRequestError");d();u();c();p();m();var Qt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};F(Qt,"HealthcheckTimeoutError");d();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};F(Jt,"EngineStartupError");d();u();c();p();m();var Wt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};F(Wt,"EngineVersionNotSupportedError");d();u();c();p();m();var Kn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Kn){super(r,U(t,!1))}};F(Kt,"GatewayTimeoutError");d();u();c();p();m();var np="Interactive transaction error",Ht=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=np){super(r,U(t,!1))}};F(Ht,"InteractiveTransactionError");d();u();c();p();m();var ip="Request parameters are invalid",zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=ip){super(r,U(t,!1))}};F(zt,"InvalidRequestError");d();u();c();p();m();var Hn="Requested resource does not exist",Yt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Hn){super(r,U(t,!1))}};F(Yt,"NotFoundError");d();u();c();p();m();var zn="Unknown server error",ht=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||zn,U(t,!0)),this.logs=n}};F(ht,"ServerError");d();u();c();p();m();var Yn="Unauthorized, check your connection string",Zt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=Yn){super(r,U(t,!1))}};F(Zt,"UnauthorizedError");d();u();c();p();m();var Zn="Usage exceeded, retry again later",Xt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Zn){super(r,U(t,!0))}};F(Xt,"UsageExceededError");async function op(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function er(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await op(e);if(n.type==="QueryEngineError")throw new se(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Wt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Qt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Zt(r,yt(Yn,n));if(e.status===404)return new Yt(r,yt(Hn,n));if(e.status===429)throw new Xt(r,yt(Zn,n));if(e.status===504)throw new Kt(r,yt(Kn,n));if(e.status>=500)throw new ht(r,yt(zn,n));if(e.status>=400)throw new Gt(r,yt(Wn,n))}function yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function Os(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ds(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}d();u();c();p();m();function Ms(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();var _s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var tr=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,U(r,!0))}};F(tr,"RequestError");async function Qe(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new tr(a,{clientVersion:n,cause:s})}}var ap=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ns=Z("prisma:client:dataproxyEngine");async function lp(e,t){let r=_s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&ap.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=up(`<=${a}.${l}.${f}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Ns("length of body fetched from unpkg.com",T.length);let k;try{k=JSON.parse(T)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),C}return k.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Fs(e,t){let r=await lp(e,t);return Ns("version",r),r}function up(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ls=3,rr=Z("prisma:client:dataproxyEngine"),wt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ms(t),this.config=t,this.env=t.env,this.inlineSchema=Ds(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Fs(this.host,this.config),rr("host",this.host),rr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":rr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||rr("schema response status",r.status);let n=await er(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Gr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||rr("graphql response status",a.status),await this.handleError(await er(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await er(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,T=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await er(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}getURLAndAPIKey(){return ks({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=Ls)throw i instanceof gt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ls} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Os(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new gt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Qr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};d();u();c();p();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let M=S.join(` -`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),f=gr(e),g=!!t,h=l||f;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:f,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Bs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",f=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new wt(t):(i.driverAdapters,i.accelerate,new wt(t))}d();u();c();p();m();function zr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var qs=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var $s=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function Et(e){try{return Vs(e,"fast")}catch{return Vs(e,"slow")}}function Vs(e,t){return JSON.stringify(e.map(r=>Gs(r,t)))}function Gs(e,t){if(Array.isArray(e))return e.map(r=>Gs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(rt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Te.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(cp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Qs(e):e}function cp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Qs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(js);let t={};for(let r of Object.keys(e))t[r]=js(e[r]);return t}function js(e){return typeof e=="bigint"?e.toString():Qs(e)}var pp=/^(\s*alter\s)/i,Js=Z("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&pp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Wr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Wr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Is(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=yn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Os=Ue(Hi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Os.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function np(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(np(e))}f();u();c();p();m();f();u();c();p();m();var dt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(dt,"ForcedRetryError");f();u();c();p();m();var je=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ie{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Qn="This request could not be understood by the server",jt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Qn,U(t,!1)),n&&(this.code=n)}};N(jt,"BadRequestError");f();u();c();p();m();var Gt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Gt,"HealthcheckTimeoutError");f();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Jt,"EngineStartupError");f();u();c();p();m();var Qt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Qt,"EngineVersionNotSupportedError");f();u();c();p();m();var Kn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Kn){super(r,U(t,!1))}};N(Kt,"GatewayTimeoutError");f();u();c();p();m();var ip="Interactive transaction error",Wt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=ip){super(r,U(t,!1))}};N(Wt,"InteractiveTransactionError");f();u();c();p();m();var op="Request parameters are invalid",Ht=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=op){super(r,U(t,!1))}};N(Ht,"InvalidRequestError");f();u();c();p();m();var Wn="Requested resource does not exist",zt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Wn){super(r,U(t,!1))}};N(zt,"NotFoundError");f();u();c();p();m();var Hn="Unknown server error",gt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Hn,U(t,!0)),this.logs=n}};N(gt,"ServerError");f();u();c();p();m();var zn="Unauthorized, check your connection string",Yt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=zn){super(r,U(t,!1))}};N(Yt,"UnauthorizedError");f();u();c();p();m();var Yn="Usage exceeded, retry again later",Zt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Yn){super(r,U(t,!0))}};N(Zt,"UsageExceededError");async function sp(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await sp(e);if(n.type==="QueryEngineError")throw new se(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new gt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Wt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,ht(zn,n));if(e.status===404)return new zt(r,ht(Wn,n));if(e.status===429)throw new Zt(r,ht(Yn,n));if(e.status===504)throw new Kt(r,ht(Kn,n));if(e.status>=500)throw new gt(r,ht(Hn,n));if(e.status>=400)throw new jt(r,ht(Qn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function ks(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ds(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}f();u();c();p();m();function Ms(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var _s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var er=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(er,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var lp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ns=Z("prisma:client:dataproxyEngine");async function up(e,t){let r=_s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&lp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=cp(`<=${a}.${l}.${d}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Ns("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Fs(e,t){let r=await up(e,t);return Ns("version",r),r}function cp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ls=3,tr=Z("prisma:client:dataproxyEngine"),yt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ms(t),this.config=t,this.env=t.env,this.inlineSchema=Ds(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Fs(this.host,this.config),tr("host",this.host),tr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":tr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||tr("schema response status",r.status);let n=await Xt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Gr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||tr("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Xt(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Is({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=Ls)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ls} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ks(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Jr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=R=>{i.push({_tag:"warning",value:R})},a=R=>{let M=R.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=dr(e),g=!!t,h=l||d;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(R){return R.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Bs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new yt(t):(i.driverAdapters,i.accelerate,new yt(t))}f();u();c();p();m();function zr({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var qs=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Vs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function wt(e){try{return $s(e,"fast")}catch{return $s(e,"slow")}}function $s(e,t){return JSON.stringify(e.map(r=>Gs(r,t)))}function Gs(e,t){if(Array.isArray(e))return e.map(r=>Gs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(_e.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(pp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Js(e):e}function pp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Js(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(js);let t={};for(let r of Object.keys(e))t[r]=js(e[r]);return t}function js(e){return typeof e=="bigint"?e.toString():Js(e)}var mp=/^(\s*alter\s)/i,Qs=Z("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&mp.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=$s(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Js(`prisma.${e}(${n}, ${i.values})`):Js(`prisma.${e}(${n})`),{query:n,parameters:i}},Ws={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},Ks={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Hs(r(s)):Hs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Hs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var mp=hn.split(".")[0],dp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${mp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??dp}};function zs(){return new ri}d();u();c();p();m();function Ys(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Zs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Yr=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var ea=Ue(io());d();u();c();p();m();function Zr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Xs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}d();u();c();p();m();var fp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return fp[e]}d();u();c();p();m();var Xr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iJe("bigint",r));case"bytes-array":return t.map(r=>Je("bytes",r));case"decimal-array":return t.map(r=>Je("decimal",r));case"datetime-array":return t.map(r=>Je("datetime",r));case"date-array":return t.map(r=>Je("date",r));case"time-array":return t.map(r=>Je("time",r));default:return t}}function oi(e){let t=[],r=gp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:yp(o),containsWrite:f,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ta(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Xs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(hp(t),wp(t,i))throw t;if(t instanceof se&&Ep(t)){let f=ra(t.meta);Fr({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Rr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ke(l,this.client._clientVersion);if(t instanceof ae)throw new ae(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof ke)throw new ke(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ea.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=$n(o,s),l=i==="queryRaw"?oi(a):Rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function yp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ta(e)};Pe(e,"Unknown transaction kind")}}function ta(e){return{id:e.id,payload:e.payload}}function wp(e,t){return Zr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Ep(e){return e.code==="P2009"||e.code==="P2012"}function ra(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ra)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var na=Ss;d();u();c();p();m();var la=Ue(Sn());d();u();c();p();m();var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};F(q,"PrismaClientConstructorValidationError");var ia=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],oa=["pretty","colorless","minimal"],sa=["info","query","warn","error"],bp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=bt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +`)}var Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:wt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Vs(r),i={values:wt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Qs(`prisma.${e}(${n}, ${i.values})`):Qs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ks={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},Ws={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function ei(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Hs(r(s)):Hs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Hs(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var fp=gn.split(".")[0],dp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${fp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??dp}};function zs(){return new ti}f();u();c();p();m();function Ys(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function Zs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();var ea=Ue(no());f();u();c();p();m();function Yr(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function Xs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}f();u();c();p();m();var gp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return gp[e]}f();u();c();p();m();var Zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function ii(e){let t=[],r=hp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:wp(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ta(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Xs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(yp(t),Ep(t,i))throw t;if(t instanceof se&&bp(t)){let d=ra(t.meta);Fr({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Rr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Se(l,this.client._clientVersion);if(t instanceof ae)throw new ae(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Se)throw new Se(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ea.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=qn(o,s),l=i==="queryRaw"?ii(a):$t(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function wp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ta(e)};qe(e,"Unknown transaction kind")}}function ta(e){return{id:e.id,payload:e.payload}}function Ep(e,t){return Yr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function bp(e){return e.code==="P2009"||e.code==="P2012"}function ra(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ra)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var na=Ss;f();u();c();p();m();var la=Ue(Rn());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var ia=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],oa=["pretty","colorless","minimal"],sa=["info","query","warn","error"],xp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Et(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!zr(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!oa.includes(e)){let t=bt(e,oa);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!sa.includes(r)){let n=bt(r,sa);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=bt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Pp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(vp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=bt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ua(e,t){for(let[r,n]of Object.entries(e)){if(!ia.includes(r)){let i=bt(r,ia);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}bp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function bt(e,t){if(t.length===0||typeof e!="string")return"";let r=xp(e,t);return r?` Did you mean "${r}"?`:""}function xp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,la.default)(e,i)}));r.sort((i,o)=>i.distance_e(n)===t);if(r)return e[r]}function vp(e,t){let r=ct(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!oa.includes(e)){let t=Et(e,oa);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!sa.includes(r)){let n=Et(r,sa);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Et(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=vp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Tp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Et(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ua(e,t){for(let[r,n]of Object.entries(e)){if(!ia.includes(r)){let i=Et(r,ia);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}xp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Et(e,t){if(t.length===0||typeof e!="string")return"";let r=Pp(e,t);return r?` Did you mean "${r}"?`:""}function Pp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,la.default)(e,i)}));r.sort((i,o)=>i.distanceIe(n)===t);if(r)return e[r]}function Tp(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}d();u();c();p();m();function ca(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!Zr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var Le=Z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Tp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ap=Symbol.for("prisma.client.transaction.id"),Cp={id:0,nextId(){return++this.id}};function Rp(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new Yr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Cs(e),n&&ua(n,e);let i=new $r().on("error",()=>{});this._extensions=pt.empty(),this._previewFeatures=zr(e),this._clientVersion=e.clientVersion??na,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=zs();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&mr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&mr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new J("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&Z.enable("prisma:client");let h=mr.resolve(e.dirname,e.relativePath);ji.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Zs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Rs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:Gr,prismaGraphQLToJSError:Qr,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:J,PrismaClientKnownRequestError:se,debug:Z("prisma:client:accelerateEngine"),engineVersion:ma.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Bs(e,this._engineConfig),this._requestHandler=new en(this,i),l.log)for(let k of l.log){let C=typeof k=="string"?k:k.emit==="stdout"?k.level:null;C&&this.$on(C,S=>{At.log(`${At.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Vt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=pa(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:qs,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...pa(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Cp.nextId(),s=Ys(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ca(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return me(Vt(me(ps(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(Ap,()=>n.id)])),[mt(hs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Tp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(f,_=>(M?.end(),l(_))));let{runInTransaction:h,args:T,...k}=f,C={...n,...k};T&&(C.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete C.transaction;let S=await bs(this,C);return C.model?gs({result:S,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=f?f(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Fn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return Z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${ts(n)})`),Le("Generated request:"),Le(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new Bt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ms}return t}function pa(e,t){return Sp(e)?[new ue(e,t),Ws]:[e,Ks]}function Sp(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var kp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ip(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!kp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();var export_warnEnvConflicts=void 0;export{Cr as DMMF,Z as Debug,Te as Decimal,Ri as Extensions,Bt as MetricsClient,J as PrismaClientInitializationError,se as PrismaClientKnownRequestError,ke as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,ki as Public,ue as Sql,lc as createParam,wc as defineDmmfProperty,Rt as deserializeJsonResponse,oi as deserializeRawResult,Ru as dmmfToRuntimeDataModel,Pc as empty,Rp as getPrismaClient,Qn as getRuntime,xc as join,Ip as makeStrictEnum,bc as makeTypedQueryFactory,On as objectEnumValues,Yo as raw,Fn as serializeJsonQuery,_n as skip,Zo as sqltag,export_warnEnvConflicts as warnEnvConflicts,hr as warnOnce}; +${n}`}f();u();c();p();m();function ca(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!Yr(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Le=Z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Ap={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Cp=Symbol.for("prisma.client.transaction.id"),Rp={id:0,nextId(){return++this.id}};function Sp(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ei();constructor(n){e=n?.__internal?.configOverride?.(e)??e,As(e),n&&ua(n,e);let i=new Vr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=zr(e),this._clientVersion=e.clientVersion??na,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=zs();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&Z.enable("prisma:client");let h=pr.resolve(e.dirname,e.relativePath);$i.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Zs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Cs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:Gr,prismaGraphQLToJSError:Jr,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:Z("prisma:client:accelerateEngine"),engineVersion:ma.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Bs(e,this._engineConfig),this._requestHandler=new Xr(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,R=>{Tt.log(`${Tt.tags[S]??""}`,R.message||R.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=pa(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:qs,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...pa(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Rp.nextId(),s=Ys(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ca(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(qt(me(cs(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ei(n)),te(Cp,()=>n.id)])),[pt(gs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Ap,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await Es(this,T);return T.model?ds({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},R=this._tracingHelper.runInChildSpan(S,()=>Nn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return Z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${es(n)})`),Le("Generated request:"),Le(JSON.stringify(R,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new Lt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ps}return t}function pa(e,t){return Ip(e)?[new ue(e,t),Ks]:[e,Ws]}function Ip(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Op=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function kp(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Op.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();var export_warnEnvConflicts=void 0;export{Cr as DMMF,Z as Debug,_e as Decimal,Ci as Extensions,Lt as MetricsClient,Q as PrismaClientInitializationError,se as PrismaClientKnownRequestError,Se as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,Si as Public,ue as Sql,sc as createParam,hc as defineDmmfProperty,$t as deserializeJsonResponse,ii as deserializeRawResult,Dl as dmmfToRuntimeDataModel,bc as empty,Sp as getPrismaClient,Gn as getRuntime,Ec as join,kp as makeStrictEnum,wc as makeTypedQueryFactory,On as objectEnumValues,zo as raw,Nn as serializeJsonQuery,Mn as skip,Yo as sqltag,export_warnEnvConflicts as warnEnvConflicts,hr as warnOnce}; //# sourceMappingURL=edge-esm.js.map diff --git a/src/generated/prisma/runtime/edge.js b/src/generated/prisma/runtime/edge.js index 382cce4..8d96fef 100644 --- a/src/generated/prisma/runtime/edge.js +++ b/src/generated/prisma/runtime/edge.js @@ -1,34 +1,34 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var va=Object.create;var ur=Object.defineProperty;var Ta=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var Ca=Object.getPrototypeOf,Ra=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tt=(e,t)=>{for(var r in t)ur(e,r,{get:t[r],enumerable:!0})},ci=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aa(t))!Ra.call(e,i)&&i!==r&&ur(e,i,{get:()=>t[i],enumerable:!(n=Ta(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?va(Ca(e)):{},ci(t||!e||!e.__esModule?ur(r,"default",{value:e,enumerable:!0}):r,e)),Sa=e=>ci(ur({},"__esModule",{value:!0}),e);var y,b,u=de(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=de(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=de(()=>{"use strict";E=()=>{};E.prototype=E});var m=de(()=>{"use strict"});var ki=Se(ze=>{"use strict";d();u();c();p();m();var gi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ka=gi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=C.indexOf("=");M===-1&&(M=S);var _=M===S?0:4-M%4;return[M,_]}function l(C){var S=a(C),M=S[0],_=S[1];return(M+_)*3/4-_}function f(C,S,M){return(S+M)*3/4-M}function g(C){var S,M=a(C),_=M[0],B=M[1],I=new n(f(C,_,B)),L=0,le=B>0?_-4:_,Q;for(Q=0;Q>16&255,I[L++]=S>>8&255,I[L++]=S&255;return B===2&&(S=r[C.charCodeAt(Q)]<<2|r[C.charCodeAt(Q+1)]>>4,I[L++]=S&255),B===1&&(S=r[C.charCodeAt(Q)]<<10|r[C.charCodeAt(Q+1)]<<4|r[C.charCodeAt(Q+2)]>>2,I[L++]=S>>8&255,I[L++]=S&255),I}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,M){for(var _,B=[],I=S;Ile?le:L+I));return _===1?(S=C[M-1],B.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[M-2]<<8)+C[M-1],B.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),B.join("")}}),Ia=gi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,C=t[r+T];for(T+=k,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+T>=1?r+=k/f:r+=k*Math.pow(2,1-T),r*f>=2&&(a++,f/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*f-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=M*128}}),pn=ka(),Ke=Ia(),pi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Fa;ze.INSPECT_MAX_BYTES=50;var cr=2147483647;ze.kMaxLength=cr;A.TYPED_ARRAY_SUPPORT=Oa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Oa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function Pe(e){if(e>cr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fn(e)}return hi(e,t,r)}A.poolSize=8192;function hi(e,t,r){if(typeof e=="string")return Ma(e,t);if(ArrayBuffer.isView(e))return _a(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(fe(e,ArrayBuffer)||e&&fe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(e,SharedArrayBuffer)||e&&fe(e.buffer,SharedArrayBuffer)))return wi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Na(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return hi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function yi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Da(e,t,r){return yi(e),e<=0?Pe(e):t!==void 0?typeof r=="string"?Pe(e).fill(t,r):Pe(e).fill(t):Pe(e)}A.alloc=function(e,t,r){return Da(e,t,r)};function fn(e){return yi(e),Pe(e<0?0:gn(e)|0)}A.allocUnsafe=function(e){return fn(e)};A.allocUnsafeSlow=function(e){return fn(e)};function Ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ei(e,t)|0,n=Pe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mn(e){let t=e.length<0?0:gn(e.length)|0,r=Pe(t);for(let n=0;n=cr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+cr.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),fe(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Ei(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||fe(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return dn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Si(e).length;default:if(i)return n?-1:dn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=Ei;function La(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Wa(this,t,r);case"utf8":case"utf-8":return xi(this,t,r);case"ascii":return Qa(this,t,r);case"latin1":case"binary":return Ja(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};pi&&(A.prototype[pi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,yn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:mi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):mi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function mi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ua(this,e,t,r);case"utf8":case"utf-8":return Ba(this,e,t,r);case"ascii":case"latin1":case"binary":return qa(this,e,t,r);case"base64":return $a(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Va(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?pn.fromByteArray(e):pn.fromByteArray(e.slice(t,r))}function xi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ga(n)}var di=4096;function Ga(e){let t=e.length;if(t<=di)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=ke(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=ke(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),Ke.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),Ke.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Pi(e,t,r,n,i){Ri(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function vi(e,t,r,n,i){Ri(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=ke(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=ke(function(e,t=0){return vi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=ke(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=ke(function(e,t=0){return vi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ti(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ai(this,e,t,!1,r)};function Ci(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ci(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ci(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=fi(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=fi(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function fi(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ha(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&At(t,e.length-(r+1))}function Ri(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ha(n,i,o)}function He(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function At(e,t,r){throw Math.floor(e)!==e?(He(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var za=/[^+/0-9A-Za-z-_]/g;function Ya(e){if(e=e.split("=")[0],e=e.trim().replace(za,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function dn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Si(e){return pn.toByteArray(Ya(e))}function pr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function fe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function yn(e){return e!==e}var el=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ke(e){return typeof BigInt>"u"?tl:e}function tl(){throw new Error("BigInt not supported")}});var w,d=de(()=>{"use strict";w=Ue(ki())});function al(){return!1}function Pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ll(){return Pn()}function ul(){return[]}function cl(e){e(null,[])}function pl(){return""}function ml(){return""}function dl(){}function fl(){}function gl(){}function hl(){}function yl(){}function wl(){}function El(){}function bl(){}function xl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Pl(e,t){t(null,Pn())}var vl,Tl,Ji,Wi=de(()=>{"use strict";d();u();c();p();m();vl={},Tl={existsSync:al,lstatSync:Pn,stat:Pl,statSync:ll,readdirSync:ul,readdir:cl,readlinkSync:pl,realpathSync:ml,chmodSync:dl,renameSync:fl,mkdirSync:gl,rmdirSync:hl,rmSync:yl,unlinkSync:wl,watchFile:El,unwatchFile:bl,watch:xl,promises:vl},Ji=Tl});function Al(...e){return e.join("/")}function Cl(...e){return e.join("/")}function Rl(e){let t=Ki(e),r=Hi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ki(e){let t=e.split("/");return t[t.length-1]}function Hi(e){return e.split("/").slice(0,-1).join("/")}function kl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var zi,Sl,Il,Ol,gr,Yi=de(()=>{"use strict";d();u();c();p();m();zi="/",Sl=":";Il={sep:zi},Ol={basename:Ki,delimiter:Sl,dirname:Hi,join:Cl,normalize:kl,parse:Rl,posix:Il,resolve:Al,sep:zi},gr=Ol});var Zi=Se((xd,Dl)=>{Dl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Tn=Se((_d,Fl)=>{Fl.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xi=Se(hr=>{"use strict";d();u();c();p();m();Object.defineProperty(hr,"__esModule",{value:!0});hr.enginesVersion=void 0;hr.enginesVersion=Tn().prisma.enginesVersion});var ro=Se((Wd,to)=>{"use strict";d();u();c();p();m();to.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var oo=Se((sf,io)=>{"use strict";d();u();c();p();m();io.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var ao=Se((mf,so)=>{"use strict";d();u();c();p();m();var $l=oo();so.exports=e=>typeof e=="string"?e.replace($l(),""):e});var Nn=Se((ew,Ro)=>{"use strict";d();u();c();p();m();Ro.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";d();u();c();p();m()});var Mo=de(()=>{"use strict";d();u();c();p();m()});var Qr,ns=de(()=>{"use strict";d();u();c();p();m();Qr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Mp={};Tt(Mp,{DMMF:()=>Mt,Debug:()=>z,Decimal:()=>ye,Extensions:()=>wn,MetricsClient:()=>dt,PrismaClientInitializationError:()=>J,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Te,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>En,Sql:()=>se,createParam:()=>Ho,defineDmmfProperty:()=>ts,deserializeJsonResponse:()=>rt,deserializeRawResult:()=>sn,dmmfToRuntimeDataModel:()=>Co,empty:()=>os,getPrismaClient:()=>ba,getRuntime:()=>Zr,join:()=>is,makeStrictEnum:()=>xa,makeTypedQueryFactory:()=>rs,objectEnumValues:()=>Nr,raw:()=>Gn,serializeJsonQuery:()=>Vr,skip:()=>$r,sqltag:()=>Qn,warnEnvConflicts:()=>void 0,warnOnce:()=>kt});module.exports=Sa(Mp);d();u();c();p();m();var wn={};Tt(wn,{defineExtension:()=>Ii,getExtensionContext:()=>Oi});d();u();c();p();m();d();u();c();p();m();function Ii(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Oi(e){return e}var En={};Tt(En,{validator:()=>Di});d();u();c();p();m();d();u();c();p();m();function Di(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var bn,Mi,_i,Ni,Fi=!0;typeof y<"u"&&({FORCE_COLOR:bn,NODE_DISABLE_COLORS:Mi,NO_COLOR:_i,TERM:Ni}=y.env||{},Fi=y.stdout&&y.stdout.isTTY);var rl={enabled:!Mi&&_i==null&&Ni!=="dumb"&&(bn!=null&&bn!=="0"||Fi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rl.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Tm=j(0,0),mr=j(1,22),dr=j(2,22),Am=j(3,23),Li=j(4,24),Cm=j(7,27),Rm=j(8,28),Sm=j(9,29),km=j(30,39),Ye=j(31,39),Ui=j(32,39),Bi=j(33,39),qi=j(34,39),Im=j(35,39),$i=j(36,39),Om=j(37,39),Vi=j(90,39),Dm=j(90,39),Mm=j(40,49),_m=j(41,49),Nm=j(42,49),Fm=j(43,49),Lm=j(44,49),Um=j(45,49),Bm=j(46,49),qm=j(47,49);d();u();c();p();m();var nl=100,ji=["green","yellow","blue","magenta","cyan","red"],fr=[],Gi=Date.now(),il=0,xn=typeof y<"u"?y.env:{};globalThis.DEBUG??=xn.DEBUG??"";globalThis.DEBUG_COLORS??=xn.DEBUG_COLORS?xn.DEBUG_COLORS==="true":!0;var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ol(e){let t={color:ji[il++%ji.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>nl&&fr.shift(),Ct.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:sl(g)),f=`+${Date.now()-Gi}ms`;Gi=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ol,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function sl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Qi(){fr.length=0}d();u();c();p();m();d();u();c();p();m();var Ml=Zi(),vn=Ml.version;d();u();c();p();m();function Ze(e){let t=_l();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Nl(e))}function _l(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Nl(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}d();u();c();p();m();var eo="prisma+postgres",yr=`${eo}:`;function wr(e){return e?.toString().startsWith(`${yr}//`)??!1}function An(e){if(!wr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var St={};Tt(St,{error:()=>Bl,info:()=>Ul,log:()=>Ll,query:()=>ql,should:()=>no,tags:()=>Rt,warn:()=>Cn});d();u();c();p();m();var Rt={error:Ye("prisma:error"),warn:Bi("prisma:warn"),info:$i("prisma:info"),query:qi("prisma:query")},no={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ll(...e){console.log(...e)}function Cn(e,...t){no.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Ul(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Bl(e,...t){console.error(`${Rt.error} ${e}`,...t)}function ql(e,...t){console.log(`${Rt.query} ${e}`,...t)}d();u();c();p();m();function ve(e,t){throw new Error(t)}d();u();c();p();m();function Rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function Sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{lo.has(e)||(lo.add(e),Cn(t,...r))};var J=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};F(J,"PrismaClientInitializationError");d();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};F(ne,"PrismaClientKnownRequestError");d();u();c();p();m();var Te=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};F(Te,"PrismaClientRustPanicError");d();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};F(ie,"PrismaClientUnknownRequestError");d();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};F(X,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var et=9e15,Me=1e9,kn="0123456789abcdef",xr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",In={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},fo,Ae,N=!0,Tr="[DecimalError] ",De=Tr+"Invalid argument: ",go=Tr+"Precision limit exceeded",ho=Tr+"crypto unavailable",yo="[object Decimal]",ee=Math.floor,W=Math.pow,Vl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,jl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,wo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Ql=9007199254740991,Jl=xr.length-1,On=Pr.length-1,R={toStringTag:yo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Wl(n,vo(n,r)),n.precision=e,n.rounding=t,O(Ae==2||Ae==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=$(f.plus(g).times(a),f.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return $(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Cr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?ge(t,n,i):new t(0):new t(NaN):e.isZero()?ge(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=On)return s=ge(g,h+4,T).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=On)return s=ge(g,h+4,T).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/D),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+k,s=Oe(f,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),It(l.d,i=h,T))do if(a+=10,s=Oe(f,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(It(l.d,i+=10,T));return N=!0,O(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.constructor;if(e=new C(e),!k.d||!e.d)return!k.s||!e.s?e=new C(NaN):k.d?e.s=-e.s:e=new C(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(f=k.d,T=e.d,a=C.precision,l=C.rounding,!f[0]||!T[0]){if(T[0])e.s=-e.s;else if(f[0])e=new C(k);else return new C(l===3?-0:0);return N?O(e,a,l):e}if(r=ee(e.e/D),g=ee(k.e/D),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=T.length):(t=T,r=g,s=f.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=T.length,h=n0;--n)f[s++]=0;for(n=T.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=Ar(f,n),N?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=Eo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Hl(n,vo(n,r)),n.precision=e,n.rounding=t,O(Ae>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Ae==2||Ae==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,f=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Ar(o,r),N?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Mn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Me),t===void 0?t=n.rounding:oe(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(oe(e,0,Me),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(oe(e,0,Me),t===void 0?t=o.rounding:oe(t,0,8),n=O(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.d,S=k.constructor;if(!C)return new S(k);if(f=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=Eo(C)-k.e-1,s=o%D,t.d[0]=W(10,s<0?D+s:s),e==null)e=o>0?t:f;else{if(a=new S(e),!a.isInt()||a.lt(f))throw Error(De+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new S(Y(C)),g=S.precision,S.precision=o=C.length*D*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=k.s,T=$(f,n,o,1).minus(k).abs().cmp($(l,r,o,1).minus(k).abs())<1?[f,n]:[l,r],S.precision=g,N=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Mn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=$(r,e,0,t,1).times(e),N=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Mn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=ee(e.e/D),t>=e.d.length-1&&(r=f<0?-f:f)<=Ql)return i=bo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Dn(e.times(Oe(a,n+r)),n),i.d&&(i=O(i,n+5,1),It(i.d,n,o)&&(t=n+10,i=O(Dn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Me),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Me),t===void 0?t=n.rounding:oe(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function It(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=W(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function Er(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Wl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,T,k,C,S,M,_,B,I,L,le,Q,ln,sr,vt,un,ce,ar,lr=n.constructor,cn=n.s==i.s?1:-1,Z=n.d,V=i.d;if(!Z||!Z[0]||!V||!V[0])return new lr(!n.s||!i.s||(Z?V&&Z[0]==V[0]:!V)?NaN:Z&&Z[0]==0||!V?cn*0:cn/0);for(l?(k=1,g=n.e-i.e):(l=pe,k=D,g=ee(n.e/k)-ee(i.e/k)),ce=V.length,vt=Z.length,_=new lr(cn),B=_.d=[],h=0;V[h]==(Z[h]||0);h++);if(V[h]>(Z[h]||0)&&g--,o==null?(Q=o=lr.precision,s=lr.rounding):a?Q=o+(n.e-i.e)+1:Q=o,Q<0)B.push(1),C=!0;else{if(Q=Q/k+2|0,h=0,ce==1){for(T=0,V=V[0],Q++;(h1&&(V=e(V,T,l),Z=e(Z,T,l),ce=V.length,vt=Z.length),sr=ce,I=Z.slice(0,ce),L=I.length;L=l/2&&++un;do T=0,f=t(V,I,ce,L),f<0?(le=I[0],ce!=L&&(le=le*l+(I[1]||0)),T=le/un|0,T>1?(T>=l&&(T=l-1),S=e(V,T,l),M=S.length,L=I.length,f=t(S,I,M,L),f==1&&(T--,r(S,ce=10;T/=10)h++;_.e=h+g*k-1,O(_,a?o+_.e+1:o,s,C)}return _}}();function O(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,D-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function Ar(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function vr(e,t,r){if(t>Jl)throw N=!0,r&&(e.precision=r),Error(go);return O(new e(xr),t,1,!0)}function ge(e,t,r){if(t>On)throw Error(go);return O(new e(Pr),t,r,!0)}function Eo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function bo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(N=!1;;){if(r%2&&(o=o.times(t),po(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),po(t.d,s)}return N=!0,o}function co(e){return e.d[e.d.length-1]&1}function xo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(f<3&&It(s.d,l-n,k,f))T.precision=l+=10,r=o=a=new T(1),g=0,f++;else return O(s,T.precision=C,k,N=!0);else return T.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,T,k=1,C=10,S=e,M=S.d,_=S.constructor,B=_.rounding,I=_.precision;if(S.s<0||!M||!M[0]||!S.e&&M[0]==1&&M.length==1)return new _(M&&!M[0]?-1/0:S.s!=1?NaN:M?0:S);if(t==null?(N=!1,g=I):g=t,_.precision=g+=C,r=Y(M),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Y(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return f=vr(_,g+2,I).times(o+""),S=Oe(new _(n+"."+r.slice(1)),g-C).plus(f),_.precision=I,t==null?O(S,I,B,N=!0):S;for(h=S,l=s=S=$(S.minus(1),S.plus(1),g,1),T=O(S.times(S),g,1),i=3;;){if(s=O(s.times(T),g,1),f=l.plus($(s,new _(i),g,1)),Y(f.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(vr(_,g+2,I).times(o+""))),l=$(l,new _(k),g,1),t==null)if(It(l.d,g-C,B,a))_.precision=g+=C,f=s=S=$(h.minus(1),h.plus(1),g,1),T=O(S.times(S),g,1),i=a=1;else return O(l,_.precision=I,B,N=!0);else return _.precision=I,l;l=f,i+=2}}function Po(e){return String(e.s*e.s/0)}function br(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),wo.test(t))return br(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(jl.test(t))r=16,t=t.toLowerCase();else if(Vl.test(t))r=2;else if(Gl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=bo(n,new n(r),o,o*2)),f=Er(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=Ar(f,g),e.d=f,N=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):qe.pow(2,l))),N=!0,e)}function Hl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/D);for(N=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Cr(e,t){for(var r=e;--t;)r*=e;return r}function vo(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ae=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ae=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ae=co(r)?n?2:3:n?4:1,t;Ae=co(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Mn(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor,C=r!==void 0;if(C?(oe(r,1,Me),n===void 0?n=k.rounding:oe(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=Po(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=Er(he(T),10,i),T.e=T.d.length),h=Er(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=$(e,T,r,n,0,i),h=e.d,o=e.e,f=fo),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=Er(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function zl(e){return new this(e).abs()}function Yl(e){return new this(e).acos()}function Zl(e){return new this(e).acosh()}function Xl(e,t){return new this(e).plus(t)}function eu(e){return new this(e).asin()}function tu(e){return new this(e).asinh()}function ru(e){return new this(e).atan()}function nu(e){return new this(e).atanh()}function iu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function ou(e){return new this(e).cbrt()}function su(e){return O(e=new this(e),e.e+1,2)}function au(e,t,r){return new this(e).clamp(t,r)}function lu(e){if(!e||typeof e!="object")throw Error(Tr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=In[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ho);else this[r]=!1;else throw Error(De+r+": "+n);return this}function uu(e){return new this(e).cos()}function cu(e){return new this(e).cosh()}function To(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,mo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ho);else for(;o=10;i/=10)n++;nDt,datamodelEnumToSchemaEnum:()=>Lu});d();u();c();p();m();d();u();c();p();m();function Lu(e){return{name:e.name,values:e.values.map(t=>t.name)}}d();u();c();p();m();var Dt=(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.updateManyAndReturn="updateManyAndReturn",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw",I))(Dt||{});var Uu=Ue(ro());var Bu={red:Ye,gray:Vi,dim:dr,bold:mr,underline:Li,highlightSource:e=>e.highlight()},qu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function $u({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Vu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(ju(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function ju(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?Bu:qu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=$u(e),Vu(r,t)}d();u();c();p();m();var No=Ue(Nn());d();u();c();p();m();function Io(e,t,r){let n=Oo(e),i=Gu(n),o=Ju(i);o?kr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Oo(e){return e.errors.flatMap(t=>t.kind==="Union"?Oo(t):[t])}function Gu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Qu(e,t){return[...new Set(e.concat(t))]}function Ju(e){return Sn(e,(t,r)=>{let n=So(t),i=So(r);return n!==i?n-i:ko(t)-ko(r)})}function So(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ko(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();Mo();d();u();c();p();m();var ot=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Do();d();u();c();p();m();d();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Or=e=>e,Dr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},_o={bold:mr,red:Ye,green:Ui,dim:dr,enabled:!0},st={write(e){e.writeLine(",")}};d();u();c();p();m();var Ee=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var at=class extends Ne{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Ee("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(st,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var lt=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof at&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Ee("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(st,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ee(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var _t=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(st,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function kr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Wu(e,t);break;case"IncludeOnScalar":Ku(e,t);break;case"EmptySelection":Hu(e,t,r);break;case"UnknownSelectionField":Xu(e,t);break;case"InvalidSelectionValue":ec(e,t);break;case"UnknownArgument":tc(e,t);break;case"UnknownInputField":rc(e,t);break;case"RequiredArgumentMissing":nc(e,t);break;case"InvalidArgumentType":ic(e,t);break;case"InvalidArgumentValue":oc(e,t);break;case"ValueTooLarge":sc(e,t);break;case"SomeFieldsMissing":ac(e,t);break;case"TooManyFieldsGiven":lc(e,t);break;case"Union":Io(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Wu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ku(e,t){let[r,n]=ut(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Nt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Hu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){zu(e,t,i);return}if(n.hasField("select")){Yu(e,t);return}}if(r?.[_e(e.outputType.name)]){Zu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function zu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Yu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Uo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Nt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Zu(e,t){let r=new _t;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ut(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new lt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Xu(e,t){let r=Bo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Uo(n,e.outputType);break;case"include":uc(n,e.outputType);break;case"omit":cc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Nt(n)),i.join(" ")})}function ec(e,t){let r=Bo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function tc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),pc(n,e.arguments)),t.addErrorMessage(i=>Fo(i,r,e.arguments.map(o=>o.name)))}function rc(e,t){let[r,n]=ut(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&qo(o,e.inputType)}t.addErrorMessage(o=>Fo(o,n,e.inputType.fields.map(s=>s.name)))}function Fo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=dc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Nt(e)),n.join(" ")}function nc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ut(e.argumentPath),s=new _t,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Lo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=ut(e.dependentArgumentPath);t.addErrorMessage(f=>`Argument \`${f.green(o)}\` is required because argument \`${f.green(l)}\` was provided.`)}}}function Lo(e){return e.kind==="list"?`${Lo(e.elementType)}[]`:e.name}function ic(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Mr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function oc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function sc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function ac(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&qo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Mr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Nt(i)),o.join(" ")})}function lc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Uo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function uc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function cc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function pc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Bo(e,t){let[r,n]=ut(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function qo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function ut(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Nt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var mc=3;function dc(e,t){let r=1/0,n;for(let i of t){let o=(0,No.default)(e,i);o>mc||o`}};function ct(e){return e instanceof Ft}d();u();c();p();m();var _r=Symbol(),Ln=new WeakMap,Ce=class{constructor(t){t===_r?Ln.set(this,`Prisma.${this._getName()}`):Ln.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ln.get(this)}},Lt=class extends Ce{_getNamespace(){return"NullTypes"}},Ut=class extends Lt{#e};Un(Ut,"DbNull");var Bt=class extends Lt{#e};Un(Bt,"JsonNull");var qt=class extends Lt{#e};Un(qt,"AnyNull");var Nr={classes:{DbNull:Ut,JsonNull:Bt,AnyNull:qt},instances:{DbNull:new Ut(_r),JsonNull:new Bt(_r),AnyNull:new qt(_r)}};function Un(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var $o=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+$o.length}write(t){let r=new Ee(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write($o).write(this.value)}};var Bn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function pt(e){return new Bn(Vo(e))}function Vo(e){let t=new lt;for(let[r,n]of Object.entries(e)){let i=new Fr(r,jo(n));t.addField(i)}return t}function jo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(it(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Rr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ce?new H(`Prisma.${e._getName()}`):ct(e)?new H(`prisma.${_e(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?fc(e):typeof e=="object"?Vo(e):new H(Object.prototype.toString.call(e))}function fc(e){let t=new at;for(let r of e)t.addItem(jo(r));return t}function Lr(e,t){let r=t==="pretty"?_o:Dr,n=e.renderAllMessages(r),i=new ot(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=pt(e);for(let h of t)kr(h,a,s);let{message:l,args:f}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new X(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();function be(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Qo(e,t,r){let n=be(r);return!t.result||!(t.result.$allModels||t.result[n])?e:gc({...e,...Go(t.name,e,t.result.$allModels),...Go(t.name,e,t.result[n])})}function gc(e){let t=new we,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function Go(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:hc(t,o,i)})):{}}function hc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Wo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Ot(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Ot(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=be(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},mt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Ko(e){return e instanceof qr}function Ho(e){return new qr(e)}d();u();c();p();m();d();u();c();p();m();var zo=Symbol(),$t=class{constructor(t){if(t!==zo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?$r:t}},$r=new $t(zo);function xe(e){return e instanceof $t}var yc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Yo="explicitly `undefined` values are not allowed";function Vr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=mt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new qn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:yc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Xo(r,n),selection:wc(e,t,i,n)}}function wc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Pc(e,n)):Ec(n,t,r)}function Ec(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&bc(n,t,e),xc(n,r,e),n}function bc(e,t,r){for(let[n,i]of Object.entries(t)){if(xe(i))continue;let o=r.nestSelection(n);if($n(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function xc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Wo(i,n);for(let[s,a]of Object.entries(o)){if(xe(a))continue;$n(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Pc(e,t){let r={},n=t.getComputedFields(),i=Jo(e,n);for(let[o,s]of Object.entries(i)){if(xe(s))continue;let a=t.nestSelection(o);$n(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||xe(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Zo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(nt(e)){if(Rr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ko(e))return{$type:"Param",value:e.name};if(ct(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return vc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Tc(e))return e.values;if(it(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Ac(e))return e.toJSON();if(typeof e=="object")return Xo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Xo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);xe(i)||(i!==void 0?r[n]=Zo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Yo}))}return r}function vc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[_e(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ve(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();function es(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var dt=class{_client;constructor(t){this._client=t}prometheus(t){return es(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return es(this._client),this._client._engine.metrics({format:"json",...t})}};d();u();c();p();m();function ts(e,t){let r=Ot(()=>Cc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Cc(e){return{datamodel:{models:Vn(e.models),enums:Vn(e.enums),types:Vn(e.types)}}}function Vn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var jn=new WeakMap,jr="$$PrismaTypedSql",jt=class{constructor(t,r){jn.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return jn.get(this).sql}get values(){return jn.get(this).values}};function rs(e){return(...t)=>new jt(e,t)}function Gr(e){return e!=null&&e[jr]===jr}d();u();c();p();m();var Ea=Ue(Tn());d();u();c();p();m();ns();Wi();Yi();d();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Jr={enumerable:!0,configurable:!0,writable:!0};function Wr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Jr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ss=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Rc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=as(Reflect.ownKeys(o),r),a=as(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Jr,...l?.getPropertyDescriptor(s)}:Jr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ss]=function(){let o={...this};return delete o[ss],o},i}function Rc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function as(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function ft(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function Kr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function ls(e){if(e===void 0)return"";let t=pt(e);return new ot(0,{colors:Dr}).write(t).toString()}d();u();c();p();m();var Sc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(kc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function kc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Sc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Jn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Jn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var us={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function gt(e={}){let t=Oc(e);return Object.entries(t).reduce((n,[i,o])=>(us[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Oc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function cs(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:gt})(e)}d();u();c();p();m();function Dc(e={}){let{select:t,...r}=e;return typeof t=="object"?gt({...r,_count:t}):gt({...r,_count:{_all:!0}})}function Mc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function ps(e,t){return t({action:"count",unpacker:Mc(e),argsMapper:Dc})(e)}d();u();c();p();m();function _c(e={}){let t=gt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ms(e,t){return t({action:"groupBy",unpacker:Nc(e),argsMapper:_c})(e)}function ds(e,t,r){if(t==="aggregate")return n=>cs(n,r);if(t==="count")return n=>ps(n,r);if(t==="groupBy")return n=>ms(n,r)}d();u();c();p();m();function fs(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ao(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ft(e,o,s.type,s.isList,s.kind==="enum")},...Wr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var gs=e=>Array.isArray(e)?e:e.split("."),Wn=(e,t)=>gs(t).reduce((r,n)=>r&&r[n],e),hs=(e,t,r)=>gs(t).reduceRight((n,i,o,s)=>Object.assign({},Wn(e,s.slice(0,o)),{[i]:n}),r);function Fc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Lc(e,t,r){return t===void 0?e??{}:hs(t,r,e||!0)}function Kn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Fe(e._errorFormat),g=Fc(n,i),h=Lc(l,o,g),T=r({dataPath:g,callsite:f})(h),k=Uc(e,t);return new Proxy(T,{get(C,S){if(!k.includes(S))return C[S];let _=[a[S].type,r,S],B=[g,h];return Kn(e,..._,...B)},...Wr([...k,...Object.getOwnPropertyNames(T)])})}}function Uc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Bc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qc=["aggregate","count","groupBy"];function Hn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[$c(e,t),jc(e,t),Gt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function $c(e,t){let r=be(t),n=Object.keys(Dt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})},{action:o,args:l,model:t})};return Bc.includes(o)?Kn(e,t,s):Vc(i)?ds(e,i,s):s({})}}}function Vc(e){return qc.includes(e)}function jc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return fs(t,r)}))}d();u();c();p();m();function ys(e){return e.replace(/^./,t=>t.toUpperCase())}var zn=Symbol();function Qt(e){let t=[Gc(e),Qc(e),te(zn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Gt(r)),me(e,t)}function Gc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Qc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(be),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=ys(i);if(e._runtimeDataModel.models[o]!==void 0)return Hn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Hn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ws(e){return e[zn]?e[zn]:e}function Es(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Qt(t)}d();u();c();p();m();d();u();c();p();m();function bs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(ft(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(ft(f))}Jc(e,l.needs)&&s.push(Wc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Jc(e,t){return t.every(r=>Rn(e,r))}function Wc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Yr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function Ps({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=be(l);return bs({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Kc=["$connect","$disconnect","$on","$transaction","$use","$extends"],vs=Kc;function Ts(e){if(e instanceof se)return Hc(e);if(Gr(e))return zc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Ts(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(o,l),a.args=s,Cs(e,a,r,n+1)}})})}function Rs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Cs(e,t,s)}function Ss(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ks(r,n,0,e):e(r)}}function ks(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(i,l),ks(a,t,r+1,n)}})}var As=e=>e;function Is(e=As,t=As){return r=>e(t(r))}d();u();c();p();m();var Os=z("prisma:client"),Ds={Vercel:"vercel","Netlify CI":"netlify"};function Ms({postinstall:e,ciName:t,clientVersion:r}){if(Os("checkPlatformCaching:postinstall",e),Os("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ds){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +"use strict";var va=Object.create;var lr=Object.defineProperty;var Ta=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var Ca=Object.getPrototypeOf,Ra=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},ui=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aa(t))!Ra.call(e,i)&&i!==r&&lr(e,i,{get:()=>t[i],enumerable:!(n=Ta(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?va(Ca(e)):{},ui(t||!e||!e.__esModule?lr(r,"default",{value:e,enumerable:!0}):r,e)),Sa=e=>ui(lr({},"__esModule",{value:!0}),e);var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Si=Se(ze=>{"use strict";f();u();c();p();m();var di=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ia=di(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,le=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ole?le:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),Oa=di(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),cn=Ia(),We=Oa(),ci=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Fa;ze.INSPECT_MAX_BYTES=50;var ur=2147483647;ze.kMaxLength=ur;A.TYPED_ARRAY_SUPPORT=ka();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ka(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fn(e)}return gi(e,t,r)}A.poolSize=8192;function gi(e,t,r){if(typeof e=="string")return Ma(e,t);if(ArrayBuffer.isView(e))return _a(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return yi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Na(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return gi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function hi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Da(e,t,r){return hi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Da(e,t,r)};function fn(e){return hi(e),xe(e<0?0:dn(e)|0)}A.allocUnsafe=function(e){return fn(e)};A.allocUnsafeSlow=function(e){return fn(e)};function Ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=wi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function pn(e){let t=e.length<0?0:dn(e.length)|0,r=xe(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function wi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return mn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Ri(e).length;default:if(i)return n?-1:mn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=wi;function La(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ka(this,t,r);case"utf8":case"utf-8":return bi(this,t,r);case"ascii":return Ja(this,t,r);case"latin1":case"binary":return Qa(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wa(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};ci&&(A.prototype[ci]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,hn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:pi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):pi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function pi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ua(this,e,t,r);case"utf8":case"utf-8":return Ba(this,e,t,r);case"ascii":case"latin1":case"binary":return qa(this,e,t,r);case"base64":return Va(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?cn.fromByteArray(e):cn.fromByteArray(e.slice(t,r))}function bi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ga(n)}var mi=4096;function Ga(e){let t=e.length;if(t<=mi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function xi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function Pi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Ie(function(e,t=0){return xi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Ie(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Ie(function(e,t=0){return xi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Ie(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function vi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ti(e,t,r,n,i){return t=+t,r=r>>>0,i||vi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ti(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ti(this,e,t,!1,r)};function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||vi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ai(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=fi(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=fi(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function fi(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ha(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Ci(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Ha(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var za=/[^+/0-9A-Za-z-_]/g;function Ya(e){if(e=e.split("=")[0],e=e.trim().replace(za,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function mn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Ri(e){return cn.toByteArray(Ya(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function hn(e){return e!==e}var el=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?tl:e}function tl(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(Si())});function al(){return!1}function xn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ll(){return xn()}function ul(){return[]}function cl(e){e(null,[])}function pl(){return""}function ml(){return""}function fl(){}function dl(){}function gl(){}function hl(){}function yl(){}function wl(){}function El(){}function bl(){}function xl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Pl(e,t){t(null,xn())}var vl,Tl,Ji,Qi=fe(()=>{"use strict";f();u();c();p();m();vl={},Tl={existsSync:al,lstatSync:xn,stat:Pl,statSync:ll,readdirSync:ul,readdir:cl,readlinkSync:pl,realpathSync:ml,chmodSync:fl,renameSync:dl,mkdirSync:gl,rmdirSync:hl,rmSync:yl,unlinkSync:wl,watchFile:El,unwatchFile:bl,watch:xl,promises:vl},Ji=Tl});function Al(...e){return e.join("/")}function Cl(...e){return e.join("/")}function Rl(e){let t=Ki(e),r=Wi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ki(e){let t=e.split("/");return t[t.length-1]}function Wi(e){return e.split("/").slice(0,-1).join("/")}function Il(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Hi,Sl,Ol,kl,dr,zi=fe(()=>{"use strict";f();u();c();p();m();Hi="/",Sl=":";Ol={sep:Hi},kl={basename:Ki,delimiter:Sl,dirname:Wi,join:Cl,normalize:Il,parse:Rl,posix:Ol,resolve:Al,sep:Hi},dr=kl});var Yi=Se((vf,Dl)=>{Dl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var vn=Se((Ff,Fl)=>{Fl.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Zi=Se(gr=>{"use strict";f();u();c();p();m();Object.defineProperty(gr,"__esModule",{value:!0});gr.enginesVersion=void 0;gr.enginesVersion=vn().prisma.enginesVersion});var to=Se((Hf,eo)=>{"use strict";f();u();c();p();m();eo.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var io=Se((ad,no)=>{"use strict";f();u();c();p();m();no.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var so=Se((fd,oo)=>{"use strict";f();u();c();p();m();var Vl=io();oo.exports=e=>typeof e=="string"?e.replace(Vl(),""):e});var _n=Se((Ky,Co)=>{"use strict";f();u();c();p();m();Co.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Do=fe(()=>{"use strict";f();u();c();p();m()});var Jr,rs=fe(()=>{"use strict";f();u();c();p();m();Jr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var _p={};vt(_p,{DMMF:()=>Dt,Debug:()=>z,Decimal:()=>Ae,Extensions:()=>yn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>wn,Sql:()=>se,createParam:()=>Wo,defineDmmfProperty:()=>es,deserializeJsonResponse:()=>dt,deserializeRawResult:()=>on,dmmfToRuntimeDataModel:()=>co,empty:()=>is,getPrismaClient:()=>ba,getRuntime:()=>Zr,join:()=>ns,makeStrictEnum:()=>xa,makeTypedQueryFactory:()=>ts,objectEnumValues:()=>Nr,raw:()=>jn,serializeJsonQuery:()=>$r,skip:()=>Vr,sqltag:()=>Gn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Sa(_p);f();u();c();p();m();var yn={};vt(yn,{defineExtension:()=>Ii,getExtensionContext:()=>Oi});f();u();c();p();m();f();u();c();p();m();function Ii(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Oi(e){return e}var wn={};vt(wn,{validator:()=>ki});f();u();c();p();m();f();u();c();p();m();function ki(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var En,Di,Mi,_i,Ni=!0;typeof y<"u"&&({FORCE_COLOR:En,NODE_DISABLE_COLORS:Di,NO_COLOR:Mi,TERM:_i}=y.env||{},Ni=y.stdout&&y.stdout.isTTY);var rl={enabled:!Di&&Mi==null&&_i!=="dumb"&&(En!=null&&En!=="0"||Ni)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rl.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Am=j(0,0),pr=j(1,22),mr=j(2,22),Cm=j(3,23),Fi=j(4,24),Rm=j(7,27),Sm=j(8,28),Im=j(9,29),Om=j(30,39),Ye=j(31,39),Li=j(32,39),Ui=j(33,39),Bi=j(34,39),km=j(35,39),qi=j(36,39),Dm=j(37,39),Vi=j(90,39),Mm=j(90,39),_m=j(40,49),Nm=j(41,49),Fm=j(42,49),Lm=j(43,49),Um=j(44,49),Bm=j(45,49),qm=j(46,49),Vm=j(47,49);f();u();c();p();m();var nl=100,$i=["green","yellow","blue","magenta","cyan","red"],fr=[],ji=Date.now(),il=0,bn=typeof y<"u"?y.env:{};globalThis.DEBUG??=bn.DEBUG??"";globalThis.DEBUG_COLORS??=bn.DEBUG_COLORS?bn.DEBUG_COLORS==="true":!0;var At={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ol(e){let t={color:$i[il++%$i.length],enabled:At.enabled(e),namespace:e,log:At.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>nl&&fr.shift(),At.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:sl(g)),d=`+${Date.now()-ji}ms`;ji=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ol,{get:(e,t)=>At[t],set:(e,t,r)=>At[t]=r});function sl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Gi(){fr.length=0}f();u();c();p();m();f();u();c();p();m();var Ml=Yi(),Pn=Ml.version;f();u();c();p();m();function Ze(e){let t=_l();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Nl(e))}function _l(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Nl(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var Xi="prisma+postgres",hr=`${Xi}:`;function yr(e){return e?.toString().startsWith(`${hr}//`)??!1}function Tn(e){if(!yr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Rt={};vt(Rt,{error:()=>Bl,info:()=>Ul,log:()=>Ll,query:()=>ql,should:()=>ro,tags:()=>Ct,warn:()=>An});f();u();c();p();m();var Ct={error:Ye("prisma:error"),warn:Ui("prisma:warn"),info:qi("prisma:info"),query:Bi("prisma:query")},ro={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ll(...e){console.log(...e)}function An(e,...t){ro.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function Ul(e,...t){console.info(`${Ct.info} ${e}`,...t)}function Bl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function ql(e,...t){console.log(`${Ct.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function wr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function Rn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ao.has(e)||(ao.add(e),An(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(ne,"PrismaClientKnownRequestError");f();u();c();p();m();var Pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ie,"PrismaClientUnknownRequestError");f();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(X,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Oe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function uo(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function co(e){return{models:Sn(e.models),enums:Sn(e.enums),types:Sn(e.types)}}function Sn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,_e=1e9,In="0123456789abcdef",Pr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",On={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},go,ve,_=!0,Ar="[DecimalError] ",Me=Ar+"Invalid argument: ",ho=Ar+"Precision limit exceeded",yo=Ar+"crypto unavailable",wo="[object Decimal]",ee=Math.floor,K=Math.pow,$l=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,jl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Jl=9007199254740991,Ql=Pr.length-1,kn=vr.length-1,C={toStringTag:wo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Kl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Rr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Rr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=kn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=kn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),Ot(l.d,i=h,T))do if(a+=10,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ot(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=ee(e.e/D),g=ee(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Cr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=bo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Hl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Cr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Mn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,_e),t===void 0?t=n.rounding:oe(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(oe(e,0,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(oe(e,0,_e),t===void 0?t=o.rounding:oe(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=bo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(Me+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(Y(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Mn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Mn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=ee(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Jl)return i=xo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Dn(e.times(De(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ot(i.d,n,o)&&(t=n+10,i=k(Dn(e.times(De(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,_e),t===void 0?t=n.rounding:oe(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Me+e)}function Ot(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function br(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Kl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Rr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,R,M,F,B,O,L,le,J,an,or,Pt,ln,ce,sr,ar=n.constructor,un=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ar(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?un*0:un/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=ee(n.e/I)-ee(i.e/I)),ce=$.length,Pt=Z.length,F=new ar(un),B=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ar.precision,s=ar.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Z=e(Z,T,l),ce=$.length,Pt=Z.length),or=ce,O=Z.slice(0,ce),L=O.length;L=l/2&&++ln;do T=0,d=t($,O,ce,L),d<0?(le=O[0],ce!=L&&(le=le*l+(O[1]||0)),T=le/ln|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function Cr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Tr(e,t,r){if(t>Ql)throw _=!0,r&&(e.precision=r),Error(ho);return k(new e(Pr),t,1,!0)}function he(e,t,r){if(t>kn)throw Error(ho);return k(new e(vr),t,r,!0)}function bo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ke(e){for(var t="";e--;)t+="0";return t}function xo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),mo(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),mo(t.d,s)}return _=!0,o}function po(e){return e.d[e.d.length-1]&1}function Po(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ot(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=Y(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Y(R.d),n=r.charAt(0),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Tr(F,g+2,O).times(o+""),R=De(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),Y(d.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Tr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ot(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function vo(e){return String(e.s*e.s/0)}function xr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return xr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(jl.test(t))r=16,t=t.toLowerCase();else if($l.test(t))r=2;else if(Gl.test(t))r=8;else throw Error(Me+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=xo(n,new n(r),o,o*2)),d=br(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Cr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):Te.pow(2,l))),_=!0,e)}function Hl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Rr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Rr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=po(r)?n?2:3:n?4:1,t;ve=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Mn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(oe(r,1,_e),n===void 0?n=I.rounding:oe(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=vo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=br(ye(T),10,i),T.e=T.d.length),h=br(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=go),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=br(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function zl(e){return new this(e).abs()}function Yl(e){return new this(e).acos()}function Zl(e){return new this(e).acosh()}function Xl(e,t){return new this(e).plus(t)}function eu(e){return new this(e).asin()}function tu(e){return new this(e).asinh()}function ru(e){return new this(e).atan()}function nu(e){return new this(e).atanh()}function iu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function ou(e){return new this(e).cbrt()}function su(e){return k(e=new this(e),e.e+1,2)}function au(e,t,r){return new this(e).clamp(t,r)}function lu(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,_e,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=On[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(yo);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function uu(e){return new this(e).cos()}function cu(e){return new this(e).cosh()}function Ao(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,fo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(yo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Nu});f();u();c();p();m();f();u();c();p();m();function Nu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var kt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(kt||{});var Fu=Ue(to());var Lu={red:Ye,gray:Vi,dim:mr,bold:pr,underline:Fi,highlightSource:e=>e.highlight()},Uu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Bu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function qu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Vu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Vu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?Lu:Uu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Bu(e),qu(r,t)}f();u();c();p();m();var _o=Ue(_n());f();u();c();p();m();function Io(e,t,r){let n=Oo(e),i=$u(n),o=Gu(i);o?Ir(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Oo(e){return e.errors.flatMap(t=>t.kind==="Union"?Oo(t):[t])}function $u(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ju(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ju(e,t){return[...new Set(e.concat(t))]}function Gu(e){return Rn(e,(t,r)=>{let n=Ro(t),i=Ro(r);return n!==i?n-i:So(t)-So(r)})}function Ro(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function So(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();Do();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};ko();f();u();c();p();m();f();u();c();p();m();var Or=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var kr=e=>e,Dr={bold:kr,red:kr,green:kr,dim:kr,enabled:!1},Mo={bold:pr,red:Ye,green:Li,dim:mr,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends Ne{items=[];addItem(t){return this.items.push(new Or(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var Mt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ir(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ju(e,t);break;case"IncludeOnScalar":Qu(e,t);break;case"EmptySelection":Ku(e,t,r);break;case"UnknownSelectionField":Yu(e,t);break;case"InvalidSelectionValue":Zu(e,t);break;case"UnknownArgument":Xu(e,t);break;case"UnknownInputField":ec(e,t);break;case"RequiredArgumentMissing":tc(e,t);break;case"InvalidArgumentType":rc(e,t);break;case"InvalidArgumentValue":nc(e,t);break;case"ValueTooLarge":ic(e,t);break;case"SomeFieldsMissing":oc(e,t);break;case"TooManyFieldsGiven":sc(e,t);break;case"Union":Io(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ju(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Qu(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${_t(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ku(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Wu(e,t,i);return}if(n.hasField("select")){Hu(e,t);return}}if(r?.[Oe(e.outputType.name)]){zu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Wu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Hu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Lo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${_t(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function zu(e,t){let r=new Mt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Yu(e,t){let r=Uo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Lo(n,e.outputType);break;case"include":ac(n,e.outputType);break;case"omit":lc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(_t(n)),i.join(" ")})}function Zu(e,t){let r=Uo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Xu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),uc(n,e.arguments)),t.addErrorMessage(i=>No(i,r,e.arguments.map(o=>o.name)))}function ec(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Bo(o,e.inputType)}t.addErrorMessage(o=>No(o,n,e.inputType.fields.map(s=>s.name)))}function No(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=pc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(_t(e)),n.join(" ")}function tc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new Mt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Fo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Fo(e){return e.kind==="list"?`${Fo(e.elementType)}[]`:e.name}function rc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Mr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function nc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ic(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function oc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Bo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Mr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(_t(i)),o.join(" ")})}function sc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Lo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function ac(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function lc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function uc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Uo(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Bo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _t({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var cc=3;function pc(e,t){let r=1/0,n;for(let i of t){let o=(0,_o.default)(e,i);o>cc||o`}};function lt(e){return e instanceof Nt}f();u();c();p();m();var _r=Symbol(),Fn=new WeakMap,Ce=class{constructor(t){t===_r?Fn.set(this,`Prisma.${this._getName()}`):Fn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Fn.get(this)}},Ft=class extends Ce{_getNamespace(){return"NullTypes"}},Lt=class extends Ft{#e};Ln(Lt,"DbNull");var Ut=class extends Ft{#e};Ln(Ut,"JsonNull");var Bt=class extends Ft{#e};Ln(Bt,"AnyNull");var Nr={classes:{DbNull:Lt,JsonNull:Ut,AnyNull:Bt},instances:{DbNull:new Lt(_r),JsonNull:new Ut(_r),AnyNull:new Bt(_r)}};function Ln(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var qo=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+qo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(qo).write(this.value)}};var Un=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Un(Vo(e))}function Vo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Fr(r,$o(n));t.addField(i)}return t}function $o(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Er(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ce?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Oe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?mc(e):typeof e=="object"?Vo(e):new H(Object.prototype.toString.call(e))}function mc(e){let t=new ot;for(let r of e)t.addItem($o(r));return t}function Lr(e,t){let r=t==="pretty"?Mo:Dr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Ir(h,a,s);let{message:l,args:d}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new X(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Go(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:fc({...e,...jo(t.name,e,t.result.$allModels),...jo(t.name,e,t.result[n])})}function fc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return wr(e,n=>({...n,needs:r(n.name,new Set)}))}function jo(e,t,r){return r?wr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:dc(t,o,i)})):{}}function dc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Qo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=It(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=It(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Go(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Ko(e){return e instanceof qr}function Wo(e){return new qr(e)}f();u();c();p();m();f();u();c();p();m();var Ho=Symbol(),qt=class{constructor(t){if(t!==Ho)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Vr:t}},Vr=new qt(Ho);function be(e){return e instanceof qt}var gc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},zo="explicitly `undefined` values are not allowed";function $r({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new Bn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:gc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Zo(r,n),selection:hc(e,t,i,n)}}function hc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),bc(e,n)):yc(n,t,r)}function yc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&wc(n,t,e),Ec(n,r,e),n}function wc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(qn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function Ec(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Qo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;qn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function bc(e,t){let r={},n=t.getComputedFields(),i=Jo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);qn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Yo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(Er(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ko(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return xc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Pc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(vc(e))return e.toJSON();if(typeof e=="object")return Zo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Zo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Yo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:zo}))}return r}function xc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Oe(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:qe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Xo(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var pt=class{_client;constructor(t){this._client=t}prometheus(t){return Xo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Xo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function es(e,t){let r=It(()=>Tc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Tc(e){return{datamodel:{models:Vn(e.models),enums:Vn(e.enums),types:Vn(e.types)}}}function Vn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var $n=new WeakMap,jr="$$PrismaTypedSql",$t=class{constructor(t,r){$n.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return $n.get(this).sql}get values(){return $n.get(this).values}};function ts(e){return(...t)=>new $t(e,t)}function Gr(e){return e!=null&&e[jr]===jr}f();u();c();p();m();var Ea=Ue(vn());f();u();c();p();m();rs();Qi();zi();f();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var Qr={enumerable:!0,configurable:!0,writable:!0};function Kr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Qr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var os=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Ac(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ss(Reflect.ownKeys(o),r),a=ss(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Qr,...l?.getPropertyDescriptor(s)}:Qr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[os]=function(){let o={...this};return delete o[os],o},i}function Ac(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ss(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function as(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:Dr}).write(t).toString()}f();u();c();p();m();var Cc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Rc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Rc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Cc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Jn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Jn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ls={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=Ic(e);return Object.entries(t).reduce((n,[i,o])=>(ls[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ic(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function us(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();u();c();p();m();function Oc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function kc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function cs(e,t){return t({action:"count",unpacker:kc(e),argsMapper:Oc})(e)}f();u();c();p();m();function Dc(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Mc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ps(e,t){return t({action:"groupBy",unpacker:Mc(e),argsMapper:Dc})(e)}function ms(e,t,r){if(t==="aggregate")return n=>us(n,r);if(t==="count")return n=>cs(n,r);if(t==="groupBy")return n=>ps(n,r)}f();u();c();p();m();function fs(e,t){let r=t.fields.filter(i=>!i.relationName),n=uo(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Nt(e,o,s.type,s.isList,s.kind==="enum")},...Kr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var ds=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ds(t).reduce((r,n)=>r&&r[n],e),gs=(e,t,r)=>ds(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function _c(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nc(e,t,r){return t===void 0?e??{}:gs(t,r,e||!0)}function Kn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Fe(e._errorFormat),g=_c(n,i),h=Nc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Fc(e,t);return new Proxy(T,{get(S,R){if(!I.includes(R))return S[R];let F=[a[R].type,r,R],B=[g,h];return Kn(e,...F,...B)},...Kr([...I,...Object.getOwnPropertyNames(T)])})}}function Fc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Lc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Uc=["aggregate","count","groupBy"];function Wn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Bc(e,t),Vc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Bc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Lc.includes(o)?Kn(e,t,s):qc(i)?ms(e,i,s):s({})}}}function qc(e){return Uc.includes(e)}function Vc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return fs(t,r)}))}f();u();c();p();m();function hs(e){return e.replace(/^./,t=>t.toUpperCase())}var Hn=Symbol();function Gt(e){let t=[$c(e),jc(e),te(Hn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),me(e,t)}function $c(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function jc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=hs(i);if(e._runtimeDataModel.models[o]!==void 0)return Wn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ys(e){return e[Hn]?e[Hn]:e}function ws(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Gt(t)}f();u();c();p();m();f();u();c();p();m();function Es({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(mt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(mt(d))}Gc(e,l.needs)&&s.push(Jc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Gc(e,t){return t.every(r=>Cn(e,r))}function Jc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Yr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function xs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return Es({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qc=["$connect","$disconnect","$on","$transaction","$extends"],Ps=Qc;function vs(e){if(e instanceof se)return Kc(e);if(Gr(e))return Wc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:vs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(o,l),a.args=s,As(e,a,r,n+1)}})})}function Cs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return As(e,t,s)}function Rs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ss(r,n,0,e):e(r)}}function Ss(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(i,l),Ss(a,t,r+1,n)}})}var Ts=e=>e;function Is(e=Ts,t=Ts){return r=>e(t(r))}f();u();c();p();m();var Os=z("prisma:client"),ks={Vercel:"vercel","Netlify CI":"netlify"};function Ds({postinstall:e,ciName:t,clientVersion:r}){if(Os("checkPlatformCaching:postinstall",e),Os("checkPlatformCaching:ciName",t),e===!0&&t&&t in ks){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${Ds[t]}-build`;throw console.error(n),new J(n,r)}}d();u();c();p();m();function _s(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();var Yc=()=>globalThis.process?.release?.name==="node",Zc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Xc=()=>!!globalThis.Deno,ep=()=>typeof globalThis.Netlify=="object",tp=()=>typeof globalThis.EdgeRuntime=="object",rp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function np(){return[[ep,"netlify"],[tp,"edge-light"],[rp,"workerd"],[Xc,"deno"],[Zc,"bun"],[Yc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var ip={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Zr(){let e=np();return{id:e,prettyName:ip[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();var Ns="6.13.0";d();u();c();p();m();d();u();c();p();m();function ht({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new J(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${ks[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Ms(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Hc=()=>globalThis.process?.release?.name==="node",zc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Yc=()=>!!globalThis.Deno,Zc=()=>typeof globalThis.Netlify=="object",Xc=()=>typeof globalThis.EdgeRuntime=="object",ep=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function tp(){return[[Zc,"netlify"],[Xc,"edge-light"],[ep,"workerd"],[Yc,"deno"],[zc,"bun"],[Hc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var rp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Zr(){let e=tp();return{id:e,prettyName:rp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function _s(e,t){throw new Error(t)}function np(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ip(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function dt(e){return e===null?e:Array.isArray(e)?e.map(dt):typeof e=="object"?np(e)?op(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ip(e,dt):e}function op({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Te(t);case"Json":return JSON.parse(t);default:_s(t,"Unknown tagged value")}}var Ns="6.14.0";f();u();c();p();m();f();u();c();p();m();function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var Ve=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};F(Ve,"InvalidDatasourceError");function Fs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ht({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==yr)throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new Ve(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=An(i)?"http:":"https:",f=new URL(i.href.replace(o,l));return{apiKey:a,url:f}}d();u();c();p();m();var Ls=Ue(Xi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Ls.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};d();u();c();p();m();function sp(e){return e[0]*1e3+e[1]/1e6}function Yn(e){return new Date(sp(e))}d();u();c();p();m();d();u();c();p();m();var yt=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};F(yt,"ForcedRetryError");d();u();c();p();m();var je=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};F(je,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var G=class extends ae{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};F(Ge,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Zn="This request could not be understood by the server",Wt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Zn,U(t,!1)),n&&(this.code=n)}};F(Wt,"BadRequestError");d();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};F(Kt,"HealthcheckTimeoutError");d();u();c();p();m();var Ht=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};F(Ht,"EngineStartupError");d();u();c();p();m();var zt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};F(zt,"EngineVersionNotSupportedError");d();u();c();p();m();var Xn="Request timed out",Yt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Xn){super(r,U(t,!1))}};F(Yt,"GatewayTimeoutError");d();u();c();p();m();var ap="Interactive transaction error",Zt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=ap){super(r,U(t,!1))}};F(Zt,"InteractiveTransactionError");d();u();c();p();m();var lp="Request parameters are invalid",Xt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=lp){super(r,U(t,!1))}};F(Xt,"InvalidRequestError");d();u();c();p();m();var ei="Requested resource does not exist",er=class extends G{name="NotFoundError";code="P5003";constructor(t,r=ei){super(r,U(t,!1))}};F(er,"NotFoundError");d();u();c();p();m();var ti="Unknown server error",wt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ti,U(t,!0)),this.logs=n}};F(wt,"ServerError");d();u();c();p();m();var ri="Unauthorized, check your connection string",tr=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ri){super(r,U(t,!1))}};F(tr,"UnauthorizedError");d();u();c();p();m();var ni="Usage exceeded, retry again later",rr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ni){super(r,U(t,!0))}};F(rr,"UsageExceededError");async function up(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function nr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await up(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new wt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new zt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ht(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Zt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Xt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new tr(r,Et(ri,n));if(e.status===404)return new er(r,Et(ei,n));if(e.status===429)throw new rr(r,Et(ni,n));if(e.status===504)throw new Yt(r,Et(Xn,n));if(e.status>=500)throw new wt(r,Et(ti,n));if(e.status>=400)throw new Wt(r,Et(Zn,n))}function Et(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function Us(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Re[s]+Re[a]+Re[l]+Re[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}d();u();c();p();m();function qs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();var $s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var ir=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,U(r,!0))}};F(ir,"RequestError");async function Qe(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new ir(a,{clientVersion:n,cause:s})}}var pp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Vs=z("prisma:client:dataproxyEngine");async function mp(e,t){let r=$s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&pp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=dp(`<=${a}.${l}.${f}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Vs("length of body fetched from unpkg.com",T.length);let k;try{k=JSON.parse(T)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),C}return k.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function js(e,t){let r=await mp(e,t);return Vs("version",r),r}function dp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Gs=3,or=z("prisma:client:dataproxyEngine"),bt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){qs(t),this.config=t,this.env=t.env,this.inlineSchema=Bs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await js(this.host,this.config),or("host",this.host),or("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":or(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Yn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Yn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||or("schema response status",r.status);let n=await nr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Kr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||or("graphql response status",a.status),await this.handleError(await nr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await nr(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,T=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await nr(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}getURLAndAPIKey(){return Fs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Gs)throw i instanceof yt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Gs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Us(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new yt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};d();u();c();p();m();function Qs({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let M=S.join(` -`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),f=wr(e),g=!!t,h=l||f;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:f,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Js({copyEngine:e=!0},t){let r;try{r=ht({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Qs({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)kt(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",f=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new bt(t):(i.driverAdapters,i.accelerate,new bt(t))}d();u();c();p();m();function tn({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var Ws=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var Ks=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function xt(e){try{return Hs(e,"fast")}catch{return Hs(e,"slow")}}function Hs(e,t){return JSON.stringify(e.map(r=>Ys(r,t)))}function Ys(e,t){if(Array.isArray(e))return e.map(r=>Ys(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(nt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ye.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(fp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Zs(e):e}function fp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(zs);let t={};for(let r of Object.keys(e))t[r]=zs(e[r]);return t}function zs(e){return typeof e=="bigint"?e.toString():Zs(e)}var gp=/^(\s*alter\s)/i,Xs=z("prisma:client");function ii(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&gp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Fs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=gt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==hr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=Tn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Ls=Ue(Zi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Ls.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ap(e){return e[0]*1e3+e[1]/1e6}function zn(e){return new Date(ap(e))}f();u();c();p();m();f();u();c();p();m();var ht=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(ht,"ForcedRetryError");f();u();c();p();m();var je=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ae{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Yn="This request could not be understood by the server",Qt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Yn,U(t,!1)),n&&(this.code=n)}};N(Qt,"BadRequestError");f();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Kt,"HealthcheckTimeoutError");f();u();c();p();m();var Wt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Wt,"EngineStartupError");f();u();c();p();m();var Ht=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Ht,"EngineVersionNotSupportedError");f();u();c();p();m();var Zn="Request timed out",zt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Zn){super(r,U(t,!1))}};N(zt,"GatewayTimeoutError");f();u();c();p();m();var lp="Interactive transaction error",Yt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=lp){super(r,U(t,!1))}};N(Yt,"InteractiveTransactionError");f();u();c();p();m();var up="Request parameters are invalid",Zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=up){super(r,U(t,!1))}};N(Zt,"InvalidRequestError");f();u();c();p();m();var Xn="Requested resource does not exist",Xt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Xn){super(r,U(t,!1))}};N(Xt,"NotFoundError");f();u();c();p();m();var ei="Unknown server error",yt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ei,U(t,!0)),this.logs=n}};N(yt,"ServerError");f();u();c();p();m();var ti="Unauthorized, check your connection string",er=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ti){super(r,U(t,!1))}};N(er,"UnauthorizedError");f();u();c();p();m();var ri="Usage exceeded, retry again later",tr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ri){super(r,U(t,!0))}};N(tr,"UsageExceededError");async function cp(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await cp(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ht(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Wt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Yt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new er(r,wt(ti,n));if(e.status===404)return new Xt(r,wt(Xn,n));if(e.status===429)throw new tr(r,wt(ri,n));if(e.status===504)throw new zt(r,wt(Zn,n));if(e.status>=500)throw new yt(r,wt(ei,n));if(e.status>=400)throw new Qt(r,wt(Yn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Us(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Re[s]+Re[a]+Re[l]+Re[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}f();u();c();p();m();function qs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var Vs={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var nr=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(nr,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new nr(a,{clientVersion:n,cause:s})}}var mp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,$s=z("prisma:client:dataproxyEngine");async function fp(e,t){let r=Vs["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&mp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=dp(`<=${a}.${l}.${d}`),h=await Je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();$s("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function js(e,t){let r=await fp(e,t);return $s("version",r),r}function dp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Gs=3,ir=z("prisma:client:dataproxyEngine"),Et=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){qs(t),this.config=t,this.env=t.env,this.inlineSchema=Bs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await js(this.host,this.config),ir("host",this.host),ir("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":ir(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:zn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:zn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||ir("schema response status",r.status);let n=await rr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Wr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||ir("graphql response status",a.status),await this.handleError(await rr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await rr(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await rr(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Fs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Gs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Gs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Us(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Js({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=R=>{i.push({_tag:"warning",value:R})},a=R=>{let M=R.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=yr(e),g=!!t,h=l||d;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(R){return R.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Qs({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Js({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)St(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new Et(t):(i.driverAdapters,i.accelerate,new Et(t))}f();u();c();p();m();function tn({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Ks=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Ws=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function bt(e){try{return Hs(e,"fast")}catch{return Hs(e,"slow")}}function Hs(e,t){return JSON.stringify(e.map(r=>Ys(r,t)))}function Ys(e,t){if(Array.isArray(e))return e.map(r=>Ys(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Zs(e):e}function gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(zs);let t={};for(let r of Object.keys(e))t[r]=zs(e[r]);return t}function zs(e){return typeof e=="bigint"?e.toString():Zs(e)}var hp=/^(\s*alter\s)/i,Xs=z("prisma:client");function ni(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&hp.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var oi=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Gr(r))n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:xt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ks(r),i={values:xt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Xs(`prisma.${e}(${n}, ${i.values})`):Xs(`prisma.${e}(${n})`),{query:n,parameters:i}},ea={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},ta={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function si(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=ra(r(s)):ra(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ra(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var hp=vn.split(".")[0],yp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ai=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${hp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??yp}};function na(){return new ai}d();u();c();p();m();function ia(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function oa(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var rn=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var aa=Ue(ao());d();u();c();p();m();function nn(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function sa(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(li(e.query.arguments)),t.push(li(e.query.selection)),t.join("")}function li(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${li(n)})`:r}).join(" ")})`}d();u();c();p();m();var wp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ui(e){return wp[e]}d();u();c();p();m();var on=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iJe("bigint",r));case"bytes-array":return t.map(r=>Je("bytes",r));case"decimal-array":return t.map(r=>Je("decimal",r));case"datetime-array":return t.map(r=>Je("datetime",r));case"date-array":return t.map(r=>Je("date",r));case"time-array":return t.map(r=>Je("time",r));default:return t}}function sn(e){let t=[],r=Ep(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ui(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:xp(o),containsWrite:f,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?la(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ui(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:sa(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(bp(t),Pp(t,i))throw t;if(t instanceof ne&&vp(t)){let f=ua(t.meta);Ur({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Sr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Te(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Te)throw new Te(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,aa.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=Wn(o,s),l=i==="queryRaw"?sn(a):rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function xp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:la(e)};ve(e,"Unknown transaction kind")}}function la(e){return{id:e.id,payload:e.payload}}function Pp(e,t){return nn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function vp(e){return e.code==="P2009"||e.code==="P2012"}function ua(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ua)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var ca=Ns;d();u();c();p();m();var ga=Ue(Nn());d();u();c();p();m();var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};F(q,"PrismaClientConstructorValidationError");var pa=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ma=["pretty","colorless","minimal"],da=["info","query","warn","error"],Tp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +`)}var ii=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Gr(r))n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:bt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ws(r),i={values:bt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Xs(`prisma.${e}(${n}, ${i.values})`):Xs(`prisma.${e}(${n})`),{query:n,parameters:i}},ea={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},ta={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function oi(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=ra(r(s)):ra(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ra(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var yp=Pn.split(".")[0],wp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},si=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${yp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??wp}};function na(){return new si}f();u();c();p();m();function ia(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function oa(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();var aa=Ue(so());f();u();c();p();m();function rn(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function sa(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ai(e.query.arguments)),t.push(ai(e.query.selection)),t.join("")}function ai(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ai(n)})`:r}).join(" ")})`}f();u();c();p();m();var Ep={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function li(e){return Ep[e]}f();u();c();p();m();var nn=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function on(e){let t=[],r=bp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>li(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Pp(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?la(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:li(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:sa(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(xp(t),vp(t,i))throw t;if(t instanceof ne&&Tp(t)){let d=ua(t.meta);Ur({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Sr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Pe(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Pe)throw new Pe(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,aa.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=Qn(o,s),l=i==="queryRaw"?on(a):dt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Pp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:la(e)};qe(e,"Unknown transaction kind")}}function la(e){return{id:e.id,payload:e.payload}}function vp(e,t){return rn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Tp(e){return e.code==="P2009"||e.code==="P2012"}function ua(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ua)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var ca=Ns;f();u();c();p();m();var ga=Ue(_n());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var pa=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ma=["pretty","colorless","minimal"],fa=["info","query","warn","error"],Ap={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!tn(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ma.includes(e)){let t=Pt(e,ma);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!da.includes(r)){let n=Pt(r,da);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Cp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Rp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ha(e,t){for(let[r,n]of Object.entries(e)){if(!pa.includes(r)){let i=Pt(r,pa);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Tp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Ap(e,t);return r?` Did you mean "${r}"?`:""}function Ap(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ga.default)(e,i)}));r.sort((i,o)=>i.distance_e(n)===t);if(r)return e[r]}function Rp(e,t){let r=pt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Lr(r,"colorless");return`Error validating "omit" option: +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ma.includes(e)){let t=xt(e,ma);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!fa.includes(r)){let n=xt(r,fa);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Rp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Sp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ha(e,t){for(let[r,n]of Object.entries(e)){if(!pa.includes(r)){let i=xt(r,pa);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ap[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=Cp(e,t);return r?` Did you mean "${r}"?`:""}function Cp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ga.default)(e,i)}));r.sort((i,o)=>i.distanceOe(n)===t);if(r)return e[r]}function Sp(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Lr(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}d();u();c();p();m();function ya(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!nn(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var Le=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Sp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},kp=Symbol.for("prisma.client.transaction.id"),Ip={id:0,nextId(){return++this.id}};function ba(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new rn;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=si();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ms(e),n&&ha(n,e);let i=new Qr().on("error",()=>{});this._extensions=mt.empty(),this._previewFeatures=tn(e),this._clientVersion=e.clientVersion??ca,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=na();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&gr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&gr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new J("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&z.enable("prisma:client");let h=gr.resolve(e.dirname,e.relativePath);Ji.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&oa(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:_s(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ht,getBatchRequestPayload:Kr,prismaGraphQLToJSError:Hr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:J,PrismaClientKnownRequestError:ne,debug:z("prisma:client:accelerateEngine"),engineVersion:Ea.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Js(e,this._engineConfig),this._requestHandler=new an(this,i),l.log)for(let k of l.log){let C=typeof k=="string"?k:k.emit==="stdout"?k.level:null;C&&this.$on(C,S=>{St.log(`${St.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Qi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=wa(n,i);return ii(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(ii(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ws,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...wa(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Ip.nextId(),s=ia(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ya(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return me(Qt(me(ws(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>si(n)),te(kp,()=>n.id)])),[ft(vs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Sp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(f,_=>(M?.end(),l(_))));let{runInTransaction:h,args:T,...k}=f,C={...n,...k};T&&(C.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete C.transaction;let S=await Rs(this,C);return C.model?Ps({result:S,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=f?f(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Vr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${ls(n)})`),Le("Generated request:"),Le(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new dt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Es}return t}function wa(e,t){return Op(e)?[new se(e,t),ea]:[e,ta]}function Op(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var Dp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function xa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Dp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}f();u();c();p();m();function ya(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!rn(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Le=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Ip={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Op=Symbol.for("prisma.client.transaction.id"),kp={id:0,nextId(){return++this.id}};function ba(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=oi();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ds(e),n&&ha(n,e);let i=new Jr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=tn(e),this._clientVersion=e.clientVersion??ca,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=na();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&z.enable("prisma:client");let h=dr.resolve(e.dirname,e.relativePath);Ji.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&oa(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ms(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:gt,getBatchRequestPayload:Wr,prismaGraphQLToJSError:Hr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ne,debug:z("prisma:client:accelerateEngine"),engineVersion:Ea.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Qs(e,this._engineConfig),this._requestHandler=new sn(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,R=>{Rt.log(`${Rt.tags[S]??""}`,R.message||R.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Gi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ii({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=wa(n,i);return ni(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(ni(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ks,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ii({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...wa(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=kp.nextId(),s=ia(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ya(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(Gt(me(ys(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>oi(n)),te(Op,()=>n.id)])),[mt(Ps)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Ip,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await Cs(this,T);return T.model?xs({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},R=this._tracingHelper.runInChildSpan(S,()=>$r({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${as(n)})`),Le("Generated request:"),Le(JSON.stringify(R,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new pt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ws}return t}function wa(e,t){return Dp(e)?[new se(e,t),ea]:[e,ta]}function Dp(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Mp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function xa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Mp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=edge.js.map diff --git a/src/generated/prisma/runtime/library.d.ts b/src/generated/prisma/runtime/library.d.ts index 0dcdd30..b06b437 100644 --- a/src/generated/prisma/runtime/library.d.ts +++ b/src/generated/prisma/runtime/library.d.ts @@ -209,7 +209,7 @@ declare const ColumnTypeEnum: { declare type CompactedBatchResponse = { type: 'compacted'; - plan: {}; + plan: QueryPlanNode; arguments: Record[]; nestedSelection: string[]; keys: string[]; @@ -376,6 +376,19 @@ declare type DatamodelEnum = ReadonlyDeep_2<{ declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; +declare type DataRule = { + type: 'rowCountEq'; + args: number; +} | { + type: 'rowCountNeq'; + args: number; +} | { + type: 'affectedRowCountEq'; + args: number; +} | { + type: 'never'; +}; + declare type Datasource = { url?: string; }; @@ -709,7 +722,7 @@ export declare function defineDmmfProperty(target: object, runtimeDataModel: Run declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; -declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$extends"]; declare type Deprecation = ReadonlyDeep_2<{ sinceVersion: string; @@ -1140,114 +1153,9 @@ declare interface EnvValue { export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; -declare type Error_2 = { - kind: 'GenericJs'; - id: number; -} | { - kind: 'UnsupportedNativeDataType'; - type: string; -} | { - kind: 'InvalidIsolationLevel'; - level: string; -} | { - kind: 'LengthMismatch'; - column?: string; -} | { - kind: 'UniqueConstraintViolation'; - constraint?: { - fields: string[]; - } | { - index: string; - } | { - foreignKey: {}; - }; -} | { - kind: 'NullConstraintViolation'; - constraint?: { - fields: string[]; - } | { - index: string; - } | { - foreignKey: {}; - }; -} | { - kind: 'ForeignKeyConstraintViolation'; - constraint?: { - fields: string[]; - } | { - index: string; - } | { - foreignKey: {}; - }; -} | { - kind: 'DatabaseNotReachable'; - host?: string; - port?: number; -} | { - kind: 'DatabaseDoesNotExist'; - db?: string; -} | { - kind: 'DatabaseAlreadyExists'; - db?: string; -} | { - kind: 'DatabaseAccessDenied'; - db?: string; -} | { - kind: 'ConnectionClosed'; -} | { - kind: 'TlsConnectionError'; - reason: string; -} | { - kind: 'AuthenticationFailed'; - user?: string; -} | { - kind: 'TransactionWriteConflict'; -} | { - kind: 'TableDoesNotExist'; - table?: string; -} | { - kind: 'ColumnNotFound'; - column?: string; -} | { - kind: 'TooManyConnections'; - cause: string; -} | { - kind: 'ValueOutOfRange'; - cause: string; -} | { - kind: 'MissingFullTextSearchIndex'; -} | { - kind: 'SocketTimeout'; -} | { - kind: 'InconsistentColumnData'; - cause: string; -} | { - kind: 'TransactionAlreadyClosed'; - cause: string; -} | { - kind: 'postgres'; - code: string; - severity: string; - message: string; - detail: string | undefined; - column: string | undefined; - hint: string | undefined; -} | { - kind: 'mysql'; - code: number; - message: string; - state: string; -} | { - kind: 'sqlite'; - /** - * Sqlite extended error code: https://www.sqlite.org/rescode.html - */ - extendedCode: number; - message: string; -} | { - kind: 'mssql'; - code: number; - message: string; +declare type Error_2 = MappedError & { + originalCode?: string; + originalMessage?: string; }; declare type ErrorCapturingFunction = T extends (...args: infer A) => Promise ? (...args: A) => Promise>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4> : T; @@ -1314,7 +1222,6 @@ declare type ExtendedSpanOptions = SpanOptions & { /** The name of the span */ name: string; internal?: boolean; - middleware?: boolean; /** Whether it propagates context (?=true) */ active?: boolean; /** The context to append the span to */ @@ -1452,12 +1359,36 @@ declare type FieldDefault = ReadonlyDeep_2<{ declare type FieldDefaultScalar = string | boolean | number; +declare type FieldInitializer = { + type: 'value'; + value: PrismaValue; +} | { + type: 'lastInsertId'; +}; + declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; declare type FieldNamespace = 'model' | 'prisma'; +declare type FieldOperation = { + type: 'set'; + value: PrismaValue; +} | { + type: 'add'; + value: PrismaValue; +} | { + type: 'subtract'; + value: PrismaValue; +} | { + type: 'multiply'; + value: PrismaValue; +} | { + type: 'divide'; + value: PrismaValue; +}; + /** * A reference to a specific field of a specific model */ @@ -1483,6 +1414,21 @@ export declare interface Fn { returns: Returns; } +declare type Fragment = { + type: 'stringChunk'; + chunk: string; +} | { + type: 'parameter'; +} | { + type: 'parameterTuple'; +} | { + type: 'parameterTupleList'; + itemPrefix: string; + itemSeparator: string; + itemSuffix: string; + groupSeparator: string; +}; + declare interface GeneratorConfig { name: string; output: EnvValue | null; @@ -1576,7 +1522,6 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { _clientVersion: string; _errorFormat: ErrorFormat; _tracingHelper: TracingHelper; - _middlewares: MiddlewareHandler; _previewFeatures: string[]; _activeProvider: string; _globalOmit?: GlobalOmitOptions | undefined; @@ -1591,11 +1536,6 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { */ _appliedParent: any; _createPrismaPromise: PrismaPromiseFactory; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(middleware: QueryMiddleware): void; $on(eventType: E, callback: EventCallback): any; $connect(): Promise; /** @@ -1875,6 +1815,14 @@ declare type IndexField = ReadonlyDeep_2<{ declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; +declare type InMemoryOps = { + pagination: Pagination | null; + distinct: string[] | null; + reverse: boolean; + linkingFields: string[] | null; + nested: Record; +}; + /** * Matches a JSON array. * Unlike \`JsonArray\`, readonly arrays are assignable to this type. @@ -2021,6 +1969,13 @@ declare interface Job { */ export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; +declare type JoinExpression = { + child: QueryPlanNode; + on: [left: string, right: string][]; + parentField: string; + isRelationUnique: boolean; +}; + export declare type JsArgs = { select?: Selection_2; include?: Selection_2; @@ -2190,6 +2145,116 @@ export declare function makeStrictEnum TypedSql; +declare type MappedError = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'InvalidIsolationLevel'; + level: string; +} | { + kind: 'LengthMismatch'; + column?: string; +} | { + kind: 'UniqueConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'NullConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'ForeignKeyConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'DatabaseNotReachable'; + host?: string; + port?: number; +} | { + kind: 'DatabaseDoesNotExist'; + db?: string; +} | { + kind: 'DatabaseAlreadyExists'; + db?: string; +} | { + kind: 'DatabaseAccessDenied'; + db?: string; +} | { + kind: 'ConnectionClosed'; +} | { + kind: 'TlsConnectionError'; + reason: string; +} | { + kind: 'AuthenticationFailed'; + user?: string; +} | { + kind: 'TransactionWriteConflict'; +} | { + kind: 'TableDoesNotExist'; + table?: string; +} | { + kind: 'ColumnNotFound'; + column?: string; +} | { + kind: 'TooManyConnections'; + cause: string; +} | { + kind: 'ValueOutOfRange'; + cause: string; +} | { + kind: 'MissingFullTextSearchIndex'; +} | { + kind: 'SocketTimeout'; +} | { + kind: 'InconsistentColumnData'; + cause: string; +} | { + kind: 'TransactionAlreadyClosed'; + cause: string; +} | { + kind: 'postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +} | { + kind: 'mssql'; + code: number; + message: string; +}; + declare type Mappings = ReadonlyDeep_2<{ modelOperations: ModelMapping[]; otherOperations: { @@ -2289,14 +2354,6 @@ declare type MiddlewareArgsMapper = { middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; }; -declare class MiddlewareHandler { - private _middlewares; - use(middleware: M): void; - get(id: number): M | undefined; - has(id: number): boolean; - length(): number; -} - declare type Model = ReadonlyDeep_2<{ name: string; dbName: string | null; @@ -2378,7 +2435,7 @@ export declare type ModelQueryOptionsCbArgs = { declare type MultiBatchResponse = { type: 'multi'; - plans: object[]; + plans: QueryPlanNode[]; }; export declare type NameArgs = { @@ -2496,6 +2553,12 @@ declare type OutputType = ReadonlyDeep_2<{ declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; +declare type Pagination = { + cursor: Record | null; + take: number | null; + skip: number | null; +}; + export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; export declare type Param = { @@ -2523,6 +2586,11 @@ declare type Pick_2 = { }; export { Pick_2 as Pick } +declare interface PlaceholderFormat { + prefix: string; + hasNumbering: boolean; +} + declare type PrimaryKey = ReadonlyDeep_2<{ name: string | null; fields: string[]; @@ -2696,6 +2764,66 @@ declare type PrismaPromiseInteractiveTransaction = { declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; +declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt; + +declare type PrismaValueBigInt = { + prisma__type: 'bigint'; + prisma__value: string; +}; + +declare type PrismaValueBytes = { + prisma__type: 'bytes'; + prisma__value: string; +}; + +declare type PrismaValueGenerator = { + prisma__type: 'generatorCall'; + prisma__value: { + name: string; + args: PrismaValue[]; + }; +}; + +declare type PrismaValuePlaceholder = { + prisma__type: 'param'; + prisma__value: { + name: string; + type: string; + }; +}; + +declare type PrismaValueType = { + type: 'Any'; +} | { + type: 'String'; +} | { + type: 'Int'; +} | { + type: 'BigInt'; +} | { + type: 'Float'; +} | { + type: 'Boolean'; +} | { + type: 'Decimal'; +} | { + type: 'Date'; +} | { + type: 'Time'; +} | { + type: 'Array'; + inner: PrismaValueType; +} | { + type: 'Json'; +} | { + type: 'Object'; +} | { + type: 'Bytes'; +} | { + type: 'Enum'; + inner: string; +}; + export declare const PrivateResultType: unique symbol; declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; @@ -2822,8 +2950,6 @@ declare type QueryEventType = 'query'; declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; -declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; - declare type QueryMiddlewareParams = { /** The model this is executed on */ model?: string; @@ -2859,6 +2985,130 @@ declare type QueryOutput = ReadonlyDeep_2<{ isList: boolean; }>; +declare type QueryPlanBinding = { + name: string; + expr: QueryPlanNode; +}; + +declare type QueryPlanDbQuery = { + type: 'rawSql'; + sql: string; + params: PrismaValue[]; +} | { + type: 'templateSql'; + fragments: Fragment[]; + placeholderFormat: PlaceholderFormat; + params: PrismaValue[]; + chunkable: boolean; +}; + +declare type QueryPlanNode = { + type: 'value'; + args: PrismaValue; +} | { + type: 'seq'; + args: QueryPlanNode[]; +} | { + type: 'get'; + args: { + name: string; + }; +} | { + type: 'let'; + args: { + bindings: QueryPlanBinding[]; + expr: QueryPlanNode; + }; +} | { + type: 'getFirstNonEmpty'; + args: { + names: string[]; + }; +} | { + type: 'query'; + args: QueryPlanDbQuery; +} | { + type: 'execute'; + args: QueryPlanDbQuery; +} | { + type: 'reverse'; + args: QueryPlanNode; +} | { + type: 'sum'; + args: QueryPlanNode[]; +} | { + type: 'concat'; + args: QueryPlanNode[]; +} | { + type: 'unique'; + args: QueryPlanNode; +} | { + type: 'required'; + args: QueryPlanNode; +} | { + type: 'join'; + args: { + parent: QueryPlanNode; + children: JoinExpression[]; + }; +} | { + type: 'mapField'; + args: { + field: string; + records: QueryPlanNode; + }; +} | { + type: 'transaction'; + args: QueryPlanNode; +} | { + type: 'dataMap'; + args: { + expr: QueryPlanNode; + structure: ResultNode; + enums: Record>; + }; +} | { + type: 'validate'; + args: { + expr: QueryPlanNode; + rules: DataRule[]; + } & ValidationError; +} | { + type: 'if'; + args: { + value: QueryPlanNode; + rule: DataRule; + then: QueryPlanNode; + else: QueryPlanNode; + }; +} | { + type: 'unit'; +} | { + type: 'diff'; + args: { + from: QueryPlanNode; + to: QueryPlanNode; + }; +} | { + type: 'initializeRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'mapRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'process'; + args: { + expr: QueryPlanNode; + operations: InMemoryOps; + }; +}; + /** * Create raw SQL statement. */ @@ -3047,6 +3297,19 @@ export declare type ResultFieldDefinition = { compute: ResultArgsFieldCompute; }; +declare type ResultNode = { + type: 'AffectedRows'; +} | { + type: 'Object'; + fields: Record; + serializedName: string | null; + skipNulls: boolean; +} | { + type: 'Value'; + dbName: string; + resultType: PrismaValueType; +}; + export declare type Return = T extends (...args: any[]) => infer R ? R : T; export declare type RuntimeDataModel = { @@ -3679,6 +3942,48 @@ declare namespace Utils { } } +declare type ValidationError = { + error_identifier: 'RELATION_VIOLATION'; + context: { + relation: string; + modelA: string; + modelB: string; + }; +} | { + error_identifier: 'MISSING_RELATED_RECORD'; + context: { + model: string; + relation: string; + relationType: string; + operation: string; + neededFor?: string; + }; +} | { + error_identifier: 'MISSING_RECORD'; + context: { + operation: string; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_INPUT'; + context: { + expectedRows: number; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_OUTPUT'; + context: { + expectedRows: number; + relation: string; + relationType: string; + }; +} | { + error_identifier: 'RECORDS_NOT_CONNECTED'; + context: { + relation: string; + parent: string; + child: string; + }; +}; + declare function validator(): (select: Exact) => S; declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; diff --git a/src/generated/prisma/runtime/library.js b/src/generated/prisma/runtime/library.js index a96a351..4966c09 100644 --- a/src/generated/prisma/runtime/library.js +++ b/src/generated/prisma/runtime/library.js @@ -1,19 +1,19 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var xu=Object.create;var Vt=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Pu=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Oo=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)Vt(e,t,{get:r[t],enumerable:!0})},_o=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Pu(r))!Su.call(e,i)&&i!==t&&Vt(e,i,{get:()=>r[i],enumerable:!(n=vu(r,i))||n.enumerable});return e};var C=(e,r,t)=>(t=e!=null?xu(Tu(e)):{},_o(r||!e||!e.__esModule?Vt(t,"default",{value:e,enumerable:!0}):t,e)),Ru=e=>_o(Vt({},"__esModule",{value:!0}),e);var yi=ne((Fg,ss)=>{"use strict";ss.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var jc=require("node:os"),as=require("node:tty"),de=yi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function bi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ei(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=jc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function Vc(e){let r=Ei(e,e&&e.isTTY);return bi(r)}ls.exports={supportsColor:Vc,stdout:bi(Ei(!0,as.isatty(1))),stderr:bi(Ei(!0,as.isatty(2)))}});var ds=ne(($g,ps)=>{"use strict";var Bc=us(),br=yi();function cs(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function wi(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!Bc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=cs(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=cs(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}ps.exports={supportsHyperlink:wi,stdout:wi(process.stdout),stderr:wi(process.stderr)}});var ms=ne((zg,Uc)=>{Uc.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Si=ne((bh,Kc)=>{Kc.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var on=ne(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.enginesVersion=void 0;nn.enginesVersion=Si().prisma.enginesVersion});var bs=ne((Oh,ys)=>{"use strict";ys.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ne((Lh,xs)=>{"use strict";xs.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Ss=ne(($h,Ts)=>{"use strict";Ts.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var Li=ne((qh,Rs)=>{"use strict";var op=Ss();Rs.exports=e=>typeof e=="string"?e.replace(op(),""):e});var As=ne((Uh,sp)=>{sp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Os=ne((Gh,Le)=>{"use strict";var Mi=require("node:fs"),$i=require("node:path"),ap=require("node:os"),lp=require("node:crypto"),up=As(),Is=up.version,cp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function pp(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` +"use strict";var xu=Object.create;var Vt=Object.defineProperty;var Pu=Object.getOwnPropertyDescriptor;var vu=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Oo=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)Vt(e,t,{get:r[t],enumerable:!0})},ko=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vu(r))!Su.call(e,i)&&i!==t&&Vt(e,i,{get:()=>r[i],enumerable:!(n=Pu(r,i))||n.enumerable});return e};var A=(e,r,t)=>(t=e!=null?xu(Tu(e)):{},ko(r||!e||!e.__esModule?Vt(t,"default",{value:e,enumerable:!0}):t,e)),Ru=e=>ko(Vt({},"__esModule",{value:!0}),e);var hi=ne((Mg,os)=>{"use strict";os.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Vc=require("node:os"),ss=require("node:tty"),de=hi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function yi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bi(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function jc(e){let r=bi(e,e&&e.isTTY);return yi(r)}as.exports={supportsColor:jc,stdout:yi(bi(!0,ss.isatty(1))),stderr:yi(bi(!0,ss.isatty(2)))}});var ps=ne((qg,cs)=>{"use strict";var Bc=ls(),br=hi();function us(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function Ei(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!Bc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=us(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=us(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}cs.exports={supportsHyperlink:Ei,stdout:Ei(process.stdout),stderr:Ei(process.stderr)}});var ds=ne((Zg,Uc)=>{Uc.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ti=ne((Eh,Hc)=>{Hc.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var nn=ne(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.enginesVersion=void 0;tn.enginesVersion=Ti().prisma.enginesVersion});var ys=ne((_h,hs)=>{"use strict";hs.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ne((Fh,ws)=>{"use strict";ws.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Ts=ne((qh,vs)=>{"use strict";vs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var Ni=ne((Vh,Ss)=>{"use strict";var op=Ts();Ss.exports=e=>typeof e=="string"?e.replace(op(),""):e});var Rs=ne((Gh,sp)=>{sp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Os=ne((Qh,_e)=>{"use strict";var Fi=require("node:fs"),Mi=require("node:path"),ap=require("node:os"),lp=require("node:crypto"),up=Rs(),Cs=up.version,cp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function pp(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` `);let n;for(;(n=cp.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function dp(e){let r=Ds(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=ks(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function mp(e){console.log(`[dotenv@${Is}][WARN] ${e}`)}function ot(e){console.log(`[dotenv@${Is}][DEBUG] ${e}`)}function ks(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ds(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Mi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=$i.resolve(process.cwd(),".env.vault");return Mi.existsSync(r)?r:null}function Cs(e){return e[0]==="~"?$i.join(ap.homedir(),e.slice(1)):e}function gp(e){!!(e&&e.debug)&&ot("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function hp(e){let r=$i.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&ot("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[Cs(e.path)];else{i=[];for(let l of e.path)i.push(Cs(l))}let o,s={};for(let l of i)try{let u=B.parse(Mi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&ot(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yp(e){if(ks(e).length===0)return B.configDotenv(e);let r=Ds(e);return r?B._configVault(e):(mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function bp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=lp.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ep(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&ot(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:hp,_configVault:gp,_parseVault:dp,config:yp,decrypt:bp,parse:pp,populate:Ep};Le.exports.configDotenv=B.configDotenv;Le.exports._configVault=B._configVault;Le.exports._parseVault=B._parseVault;Le.exports.config=B.config;Le.exports.decrypt=B.decrypt;Le.exports.parse=B.parse;Le.exports.populate=B.populate;Le.exports=B});var Fs=ne((Yh,cn)=>{"use strict";cn.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};cn.exports.default=cn.exports});var Ki=ne((Ab,oa)=>{"use strict";oa.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var pa=Oo(()=>{"use strict"});var Gf={};tr(Gf,{DMMF:()=>ct,Debug:()=>N,Decimal:()=>ve,Extensions:()=>ii,MetricsClient:()=>Fr,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>j,PrismaClientValidationError:()=>Z,Public:()=>oi,Sql:()=>oe,createParam:()=>Aa,defineDmmfProperty:()=>_a,deserializeJsonResponse:()=>Tr,deserializeRawResult:()=>ei,dmmfToRuntimeDataModel:()=>Xs,empty:()=>Fa,getPrismaClient:()=>bu,getRuntime:()=>Gn,join:()=>La,makeStrictEnum:()=>Eu,makeTypedQueryFactory:()=>Na,objectEnumValues:()=>kn,raw:()=>io,serializeJsonQuery:()=>Mn,skip:()=>Fn,sqltag:()=>oo,warnEnvConflicts:()=>wu,warnOnce:()=>at});module.exports=Ru(Gf);var ii={};tr(ii,{defineExtension:()=>No,getExtensionContext:()=>Lo});function No(e){return typeof e=="function"?e:r=>r.$extends(e)}function Lo(e){return e}var oi={};tr(oi,{validator:()=>Fo});function Fo(...e){return r=>r}var Bt={};tr(Bt,{$:()=>Vo,bgBlack:()=>Fu,bgBlue:()=>ju,bgCyan:()=>Bu,bgGreen:()=>$u,bgMagenta:()=>Vu,bgRed:()=>Mu,bgWhite:()=>Uu,bgYellow:()=>qu,black:()=>Ou,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ie,gray:()=>Kr,green:()=>qe,grey:()=>Lu,hidden:()=>ku,inverse:()=>Iu,italic:()=>Cu,magenta:()=>_u,red:()=>ce,reset:()=>Au,strikethrough:()=>Du,underline:()=>Y,white:()=>Nu,yellow:()=>ke});var si,Mo,$o,qo,jo=!0;typeof process<"u"&&({FORCE_COLOR:si,NODE_DISABLE_COLORS:Mo,NO_COLOR:$o,TERM:qo}=process.env||{},jo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Mo&&$o==null&&qo!=="dumb"&&(si!=null&&si!=="0"||jo)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Au=F(0,0),W=F(1,22),Ie=F(2,22),Cu=F(3,23),Y=F(4,24),Iu=F(7,27),ku=F(8,28),Du=F(9,29),Ou=F(30,39),ce=F(31,39),qe=F(32,39),ke=F(33,39),nr=F(34,39),_u=F(35,39),De=F(36,39),Nu=F(37,39),Kr=F(90,39),Lu=F(90,39),Fu=F(40,49),Mu=F(41,49),$u=F(42,49),qu=F(43,49),ju=F(44,49),Vu=F(45,49),Bu=F(46,49),Uu=F(47,49);var Gu=100,Bo=["green","yellow","blue","magenta","cyan","red"],Yr=[],Uo=Date.now(),Qu=0,ai=typeof process<"u"?process.env:{};globalThis.DEBUG??=ai.DEBUG??"";globalThis.DEBUG_COLORS??=ai.DEBUG_COLORS?ai.DEBUG_COLORS==="true":!0;var zr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Wu(e){let r={color:Bo[Qu++%Bo.length],enabled:zr.enabled(e),namespace:e,log:zr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Yr.push([o,...n]),Yr.length>Gu&&Yr.shift(),zr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ju(c)),u=`+${Date.now()-Uo}ms`;Uo=Date.now(),globalThis.DEBUG_COLORS?a(Bt[s](W(o)),...l,Bt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Wu,{get:(e,r)=>zr[r],set:(e,r,t)=>zr[r]=t});function Ju(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Go(e=7500){let r=Yr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return r.length!!(e&&typeof e=="object"),Qt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(Qt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(ci(e)){if(!ci(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Qt(a)&&a[Hu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthEe(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||Qt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return ci(e)?Qt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?Zr(e,Ge):Zr(Object.values(e),Ge):[]},Zr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Ku(e),and:r=>q(e,r),or:r=>Yu(e,r),select:r=>r===void 0?Jo(e):Jo(r,e)})}function Ku(e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function q(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"and"})})}function Yu(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return Zr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"or"})})}function I(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Jo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Oe]:()=>({match:n=>{let i={[r??Wt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??Wt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var ng=pe(I(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.endsWith(t)))));var t},minLength:r=>Be(q(e,(t=>I(n=>je(n)&&n.length>=t))(r))),length:r=>Be(q(e,(t=>I(n=>je(n)&&n.length===t))(r))),maxLength:r=>Be(q(e,(t=>I(n=>je(n)&&n.length<=t))(r))),includes:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.includes(t)))));var t},regex:r=>{return Be(q(e,(t=r,I(n=>je(n)&&!!n.match(t)))));var t}}),ig=Be(I(je)),be=e=>Object.assign(pe(e),{between:(r,t)=>be(q(e,((n,i)=>I(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(q(e,(t=>I(n=>ye(n)&&nbe(q(e,(t=>I(n=>ye(n)&&n>t))(r))),lte:r=>be(q(e,(t=>I(n=>ye(n)&&n<=t))(r))),gte:r=>be(q(e,(t=>I(n=>ye(n)&&n>=t))(r))),int:()=>be(q(e,I(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be(q(e,I(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be(q(e,I(r=>ye(r)&&r>0))),negative:()=>be(q(e,I(r=>ye(r)&&r<0)))}),og=be(I(ye)),Ue=e=>Object.assign(pe(e),{between:(r,t)=>Ue(q(e,((n,i)=>I(o=>Ve(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue(q(e,(t=>I(n=>Ve(n)&&nUe(q(e,(t=>I(n=>Ve(n)&&n>t))(r))),lte:r=>Ue(q(e,(t=>I(n=>Ve(n)&&n<=t))(r))),gte:r=>Ue(q(e,(t=>I(n=>Ve(n)&&n>=t))(r))),positive:()=>Ue(q(e,I(r=>Ve(r)&&r>0))),negative:()=>Ue(q(e,I(r=>Ve(r)&&r<0)))}),sg=Ue(I(Ve)),ag=pe(I(function(e){return typeof e=="boolean"})),lg=pe(I(function(e){return typeof e=="symbol"})),ug=pe(I(function(e){return e==null})),cg=pe(I(function(e){return e!=null}));var pi=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},di={matched:!1,value:void 0};function hr(e){return new mi(e,di)}var mi=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?di:{matched:!0,value:t(o?Wt in s?s[Wt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:di)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new pi(this.input)}run(){return this.exhaustive()}returnType(){return this}};var zo=require("node:util");var zu={warn:ke("prisma:warn")},Zu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Jt(e,...r){Zu.warn()&&console.warn(`${zu.warn} ${e}`,...r)}var Xu=(0,zo.promisify)(Yo.default.exec),ee=gr("prisma:get-platform"),ec=["1.0.x","1.1.x","3.0.x"];async function Zo(){let e=Kt.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Yt("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await tc(),n=await cc(),i=ic({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await oc(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function rc(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=hr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ee(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function tc(){let e="/etc/os-release";try{let r=await fi.default.readFile(e,{encoding:"utf-8"});return rc(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function nc(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return Xo(t)}}function Ho(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return Xo(t)}}function Xo(e){let r=(()=>{if(rs(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(ec.includes(r))return r}function ic(e){return hr(e).with({familyDistro:"musl"},()=>(ee('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(ee('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ee('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function oc(e){let r='grep -v "libssl.so.0"',t=await Ko(e);if(t){ee(`Found libssl.so file using platform-specific paths: ${t}`);let o=Ho(t);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ee('Falling back to "ldconfig" and other generic paths');let n=await Yt(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Ko(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Ho(n);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Yt("openssl version -v");if(i){ee(`Found openssl binary with version: ${i}`);let o=nc(i);if(ee(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ee("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Ko(e){for(let r of e){let t=await sc(r);if(t)return t}}async function sc(e){try{return(await fi.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ir(){let{binaryTarget:e}=await es();return e}function ac(e){return e.binaryTarget!==void 0}async function gi(){let{memoized:e,...r}=await es();return r}var Ht={};async function es(){if(ac(Ht))return Promise.resolve({...Ht,memoized:!0});let e=await Zo(),r=lc(e);return Ht={...e,binaryTarget:r},{...Ht,memoized:!1}}function lc(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Jt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=hr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Jt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||rs(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Jt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function uc(e){try{return await e()}catch{return}}function Yt(e){return uc(async()=>{let r=await Xu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function cc(){return typeof Kt.default.machine=="function"?Kt.default.machine():(await Yt("uname -m"))?.trim()}function rs(e){return e.startsWith("1.")}var Xt={};tr(Xt,{beep:()=>Fc,clearScreen:()=>Oc,clearTerminal:()=>_c,cursorBackward:()=>yc,cursorDown:()=>gc,cursorForward:()=>hc,cursorGetPosition:()=>wc,cursorHide:()=>Pc,cursorLeft:()=>is,cursorMove:()=>fc,cursorNextLine:()=>xc,cursorPrevLine:()=>vc,cursorRestorePosition:()=>Ec,cursorSavePosition:()=>bc,cursorShow:()=>Tc,cursorTo:()=>mc,cursorUp:()=>ns,enterAlternativeScreen:()=>Nc,eraseDown:()=>Cc,eraseEndLine:()=>Rc,eraseLine:()=>os,eraseLines:()=>Sc,eraseScreen:()=>hi,eraseStartLine:()=>Ac,eraseUp:()=>Ic,exitAlternativeScreen:()=>Lc,iTerm:()=>qc,image:()=>$c,link:()=>Mc,scrollDown:()=>Dc,scrollUp:()=>kc});var Zt=C(require("node:process"),1);var zt=globalThis.window?.document!==void 0,bg=globalThis.process?.versions?.node!==void 0,Eg=globalThis.process?.versions?.bun!==void 0,wg=globalThis.Deno?.version?.deno!==void 0,xg=globalThis.process?.versions?.electron!==void 0,vg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Pg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Tg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Sg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Rg=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Xr=globalThis.navigator?.userAgentData?.platform,Ag=Xr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Cg=Xr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Ig=Xr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",kg=Xr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Dg=Xr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var k="\x1B[",rt="\x1B]",yr="\x07",et=";",ts=!zt&&Zt.default.env.TERM_PROGRAM==="Apple_Terminal",pc=!zt&&Zt.default.platform==="win32",dc=zt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Zt.default.cwd,mc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?k+(e+1)+"G":k+(r+1)+et+(e+1)+"H"},fc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=k+-e+"D":e>0&&(t+=k+e+"C"),r<0?t+=k+-r+"A":r>0&&(t+=k+r+"B"),t},ns=(e=1)=>k+e+"A",gc=(e=1)=>k+e+"B",hc=(e=1)=>k+e+"C",yc=(e=1)=>k+e+"D",is=k+"G",bc=ts?"\x1B7":k+"s",Ec=ts?"\x1B8":k+"u",wc=k+"6n",xc=k+"E",vc=k+"F",Pc=k+"?25l",Tc=k+"?25h",Sc=e=>{let r="";for(let t=0;t[rt,"8",et,et,r,yr,e,rt,"8",et,et,yr].join(""),$c=(e,r={})=>{let t=`${rt}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},qc={setCwd:(e=dc())=>`${rt}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${rt}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var en=C(ds(),1);function or(e,r,{target:t="stdout",...n}={}){return en.default[t]?Xt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=en.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=en.default.stderr;function xi(e){return or(e,e,{fallback:Y})}var Gc=ms(),vi=Gc.version;function Er(e){let r=Qc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Wc(e))}function Qc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Wc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}function Pi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function rn(e){return{ok:!0,value:e,map(r){return rn(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var fs=N("driver-adapter-utils"),Ti=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var tn=(e,r=new Ti)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:_e(r,e.queryRaw.bind(e)),executeRaw:_e(r,e.executeRaw.bind(e)),executeScript:_e(r,e.executeScript.bind(e)),dispose:_e(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await _e(r,e.startTransaction.bind(e))(...n)).map(o=>Jc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Hc(r,e.getConnectionInfo.bind(e))),t},Jc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:_e(e,r.queryRaw.bind(r)),executeRaw:_e(e,r.executeRaw.bind(r)),commit:_e(e,r.commit.bind(r)),rollback:_e(e,r.rollback.bind(r))});function _e(e,r){return async(...t)=>{try{return rn(await r(...t))}catch(n){if(fs("[error@wrapAsync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Hc(e,r){return(...t)=>{try{return rn(r(...t))}catch(n){if(fs("[error@wrapSync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Yc=C(on());var M=C(require("node:path")),zc=C(on()),Ph=N("prisma:engines");function gs(){return M.default.join(__dirname,"../")}var Th="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Ri=C(require("node:fs")),hs=gr("chmodPlusX");function Ai(e){if(process.platform==="win32")return;let r=Ri.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){hs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);hs(`Have to call chmodPlusX on ${e}`),Ri.default.chmodSync(e,n)}function Ci(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${xi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ie(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} +`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function dp(e){let r=Ds(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Is(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function mp(e){console.log(`[dotenv@${Cs}][WARN] ${e}`)}function it(e){console.log(`[dotenv@${Cs}][DEBUG] ${e}`)}function Is(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ds(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Fi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Mi.resolve(process.cwd(),".env.vault");return Fi.existsSync(r)?r:null}function As(e){return e[0]==="~"?Mi.join(ap.homedir(),e.slice(1)):e}function gp(e){!!(e&&e.debug)&&it("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function hp(e){let r=Mi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&it("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[As(e.path)];else{i=[];for(let l of e.path)i.push(As(l))}let o,s={};for(let l of i)try{let u=B.parse(Fi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&it(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yp(e){if(Is(e).length===0)return B.configDotenv(e);let r=Ds(e);return r?B._configVault(e):(mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function bp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=lp.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ep(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&it(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:hp,_configVault:gp,_parseVault:dp,config:yp,decrypt:bp,parse:pp,populate:Ep};_e.exports.configDotenv=B.configDotenv;_e.exports._configVault=B._configVault;_e.exports._parseVault=B._parseVault;_e.exports.config=B.config;_e.exports.decrypt=B.decrypt;_e.exports.parse=B.parse;_e.exports.populate=B.populate;_e.exports=B});var Ls=ne((zh,un)=>{"use strict";un.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};un.exports.default=un.exports});var Ki=ne((Sb,ia)=>{"use strict";ia.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var ca=Oo(()=>{"use strict"});var Qf={};tr(Qf,{DMMF:()=>ut,Debug:()=>N,Decimal:()=>Fe,Extensions:()=>ni,MetricsClient:()=>Nr,PrismaClientInitializationError:()=>v,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>V,PrismaClientValidationError:()=>Z,Public:()=>ii,Sql:()=>oe,createParam:()=>Ra,defineDmmfProperty:()=>ka,deserializeJsonResponse:()=>qr,deserializeRawResult:()=>Xn,dmmfToRuntimeDataModel:()=>$s,empty:()=>La,getPrismaClient:()=>bu,getRuntime:()=>Gn,join:()=>Na,makeStrictEnum:()=>Eu,makeTypedQueryFactory:()=>_a,objectEnumValues:()=>Dn,raw:()=>no,serializeJsonQuery:()=>Mn,skip:()=>Fn,sqltag:()=>io,warnEnvConflicts:()=>wu,warnOnce:()=>st});module.exports=Ru(Qf);var ni={};tr(ni,{defineExtension:()=>_o,getExtensionContext:()=>No});function _o(e){return typeof e=="function"?e:r=>r.$extends(e)}function No(e){return e}var ii={};tr(ii,{validator:()=>Lo});function Lo(...e){return r=>r}var jt={};tr(jt,{$:()=>Vo,bgBlack:()=>Fu,bgBlue:()=>Vu,bgCyan:()=>Bu,bgGreen:()=>$u,bgMagenta:()=>ju,bgRed:()=>Mu,bgWhite:()=>Uu,bgYellow:()=>qu,black:()=>ku,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ce,gray:()=>Kr,green:()=>qe,grey:()=>Lu,hidden:()=>Du,inverse:()=>Iu,italic:()=>Cu,magenta:()=>_u,red:()=>ce,reset:()=>Au,strikethrough:()=>Ou,underline:()=>Y,white:()=>Nu,yellow:()=>Ie});var oi,Fo,Mo,$o,qo=!0;typeof process<"u"&&({FORCE_COLOR:oi,NODE_DISABLE_COLORS:Fo,NO_COLOR:Mo,TERM:$o}=process.env||{},qo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Fo&&Mo==null&&$o!=="dumb"&&(oi!=null&&oi!=="0"||qo)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Au=F(0,0),W=F(1,22),Ce=F(2,22),Cu=F(3,23),Y=F(4,24),Iu=F(7,27),Du=F(8,28),Ou=F(9,29),ku=F(30,39),ce=F(31,39),qe=F(32,39),Ie=F(33,39),nr=F(34,39),_u=F(35,39),De=F(36,39),Nu=F(37,39),Kr=F(90,39),Lu=F(90,39),Fu=F(40,49),Mu=F(41,49),$u=F(42,49),qu=F(43,49),Vu=F(44,49),ju=F(45,49),Bu=F(46,49),Uu=F(47,49);var Gu=100,jo=["green","yellow","blue","magenta","cyan","red"],Hr=[],Bo=Date.now(),Qu=0,si=typeof process<"u"?process.env:{};globalThis.DEBUG??=si.DEBUG??"";globalThis.DEBUG_COLORS??=si.DEBUG_COLORS?si.DEBUG_COLORS==="true":!0;var Yr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Wu(e){let r={color:jo[Qu++%jo.length],enabled:Yr.enabled(e),namespace:e,log:Yr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Hr.push([o,...n]),Hr.length>Gu&&Hr.shift(),Yr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ju(c)),u=`+${Date.now()-Bo}ms`;Bo=Date.now(),globalThis.DEBUG_COLORS?a(jt[s](W(o)),...l,jt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Wu,{get:(e,r)=>Yr[r],set:(e,r,t)=>Yr[r]=t});function Ju(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Uo(e=7500){let r=Hr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return r.length!!(e&&typeof e=="object"),Gt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(Gt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(ui(e)){if(!ui(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Gt(a)&&a[Ku]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthEe(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||Gt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return ui(e)?Gt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?zr(e,Ge):zr(Object.values(e),Ge):[]},zr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Hu(e),and:r=>q(e,r),or:r=>Yu(e,r),select:r=>r===void 0?Wo(e):Wo(r,e)})}function Hu(e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function q(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>zr(e,Ge),matcherType:"and"})})}function Yu(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return zr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>zr(e,Ge),matcherType:"or"})})}function C(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Wo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Oe]:()=>({match:n=>{let i={[r??Qt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??Qt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function Ve(e){return typeof e=="string"}function je(e){return typeof e=="bigint"}var ig=pe(C(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.endsWith(t)))));var t},minLength:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length>=t))(r))),length:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length===t))(r))),maxLength:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length<=t))(r))),includes:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.includes(t)))));var t},regex:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&!!n.match(t)))));var t}}),og=Be(C(Ve)),be=e=>Object.assign(pe(e),{between:(r,t)=>be(q(e,((n,i)=>C(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(q(e,(t=>C(n=>ye(n)&&nbe(q(e,(t=>C(n=>ye(n)&&n>t))(r))),lte:r=>be(q(e,(t=>C(n=>ye(n)&&n<=t))(r))),gte:r=>be(q(e,(t=>C(n=>ye(n)&&n>=t))(r))),int:()=>be(q(e,C(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be(q(e,C(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be(q(e,C(r=>ye(r)&&r>0))),negative:()=>be(q(e,C(r=>ye(r)&&r<0)))}),sg=be(C(ye)),Ue=e=>Object.assign(pe(e),{between:(r,t)=>Ue(q(e,((n,i)=>C(o=>je(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue(q(e,(t=>C(n=>je(n)&&nUe(q(e,(t=>C(n=>je(n)&&n>t))(r))),lte:r=>Ue(q(e,(t=>C(n=>je(n)&&n<=t))(r))),gte:r=>Ue(q(e,(t=>C(n=>je(n)&&n>=t))(r))),positive:()=>Ue(q(e,C(r=>je(r)&&r>0))),negative:()=>Ue(q(e,C(r=>je(r)&&r<0)))}),ag=Ue(C(je)),lg=pe(C(function(e){return typeof e=="boolean"})),ug=pe(C(function(e){return typeof e=="symbol"})),cg=pe(C(function(e){return e==null})),pg=pe(C(function(e){return e!=null}));var ci=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},pi={matched:!1,value:void 0};function hr(e){return new di(e,pi)}var di=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?pi:{matched:!0,value:t(o?Qt in s?s[Qt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:pi)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new ci(this.input)}run(){return this.exhaustive()}returnType(){return this}};var Yo=require("node:util");var zu={warn:Ie("prisma:warn")},Zu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Wt(e,...r){Zu.warn()&&console.warn(`${zu.warn} ${e}`,...r)}var Xu=(0,Yo.promisify)(Ho.default.exec),ee=gr("prisma:get-platform"),ec=["1.0.x","1.1.x","3.0.x"];async function zo(){let e=Kt.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Ht("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await tc(),n=await cc(),i=ic({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await oc(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function rc(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=hr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ee(`Found distro info: +${JSON.stringify(a,null,2)}`),a}async function tc(){let e="/etc/os-release";try{let r=await mi.default.readFile(e,{encoding:"utf-8"});return rc(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function nc(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return Zo(t)}}function Jo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return Zo(t)}}function Zo(e){let r=(()=>{if(es(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(ec.includes(r))return r}function ic(e){return hr(e).with({familyDistro:"musl"},()=>(ee('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(ee('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ee('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function oc(e){let r='grep -v "libssl.so.0"',t=await Ko(e);if(t){ee(`Found libssl.so file using platform-specific paths: ${t}`);let o=Jo(t);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ee('Falling back to "ldconfig" and other generic paths');let n=await Ht(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Ko(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Jo(n);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ht("openssl version -v");if(i){ee(`Found openssl binary with version: ${i}`);let o=nc(i);if(ee(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ee("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Ko(e){for(let r of e){let t=await sc(r);if(t)return t}}async function sc(e){try{return(await mi.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ir(){let{binaryTarget:e}=await Xo();return e}function ac(e){return e.binaryTarget!==void 0}async function fi(){let{memoized:e,...r}=await Xo();return r}var Jt={};async function Xo(){if(ac(Jt))return Promise.resolve({...Jt,memoized:!0});let e=await zo(),r=lc(e);return Jt={...e,binaryTarget:r},{...Jt,memoized:!1}}function lc(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Wt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=hr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Wt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". +${c}`)}let u="debian";if(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||es(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Wt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function uc(e){try{return await e()}catch{return}}function Ht(e){return uc(async()=>{let r=await Xu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function cc(){return typeof Kt.default.machine=="function"?Kt.default.machine():(await Ht("uname -m"))?.trim()}function es(e){return e.startsWith("1.")}var Zt={};tr(Zt,{beep:()=>Fc,clearScreen:()=>kc,clearTerminal:()=>_c,cursorBackward:()=>yc,cursorDown:()=>gc,cursorForward:()=>hc,cursorGetPosition:()=>wc,cursorHide:()=>vc,cursorLeft:()=>ns,cursorMove:()=>fc,cursorNextLine:()=>xc,cursorPrevLine:()=>Pc,cursorRestorePosition:()=>Ec,cursorSavePosition:()=>bc,cursorShow:()=>Tc,cursorTo:()=>mc,cursorUp:()=>ts,enterAlternativeScreen:()=>Nc,eraseDown:()=>Cc,eraseEndLine:()=>Rc,eraseLine:()=>is,eraseLines:()=>Sc,eraseScreen:()=>gi,eraseStartLine:()=>Ac,eraseUp:()=>Ic,exitAlternativeScreen:()=>Lc,iTerm:()=>qc,image:()=>$c,link:()=>Mc,scrollDown:()=>Oc,scrollUp:()=>Dc});var zt=A(require("node:process"),1);var Yt=globalThis.window?.document!==void 0,Eg=globalThis.process?.versions?.node!==void 0,wg=globalThis.process?.versions?.bun!==void 0,xg=globalThis.Deno?.version?.deno!==void 0,Pg=globalThis.process?.versions?.electron!==void 0,vg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Tg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Sg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Rg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Ag=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Zr=globalThis.navigator?.userAgentData?.platform,Cg=Zr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ig=Zr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Dg=Zr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Og=Zr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),kg=Zr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var I="\x1B[",et="\x1B]",yr="\x07",Xr=";",rs=!Yt&&zt.default.env.TERM_PROGRAM==="Apple_Terminal",pc=!Yt&&zt.default.platform==="win32",dc=Yt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:zt.default.cwd,mc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?I+(e+1)+"G":I+(r+1)+Xr+(e+1)+"H"},fc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=I+-e+"D":e>0&&(t+=I+e+"C"),r<0?t+=I+-r+"A":r>0&&(t+=I+r+"B"),t},ts=(e=1)=>I+e+"A",gc=(e=1)=>I+e+"B",hc=(e=1)=>I+e+"C",yc=(e=1)=>I+e+"D",ns=I+"G",bc=rs?"\x1B7":I+"s",Ec=rs?"\x1B8":I+"u",wc=I+"6n",xc=I+"E",Pc=I+"F",vc=I+"?25l",Tc=I+"?25h",Sc=e=>{let r="";for(let t=0;t[et,"8",Xr,Xr,r,yr,e,et,"8",Xr,Xr,yr].join(""),$c=(e,r={})=>{let t=`${et}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},qc={setCwd:(e=dc())=>`${et}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${et}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var Xt=A(ps(),1);function or(e,r,{target:t="stdout",...n}={}){return Xt.default[t]?Zt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=Xt.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=Xt.default.stderr;function wi(e){return or(e,e,{fallback:Y})}var Gc=ds(),xi=Gc.version;function Er(e){let r=Qc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Wc(e))}function Qc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Wc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}function Pi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function en(e){return{ok:!0,value:e,map(r){return en(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var ms=N("driver-adapter-utils"),vi=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var rn=(e,r=new vi)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:ke(r,e.queryRaw.bind(e)),executeRaw:ke(r,e.executeRaw.bind(e)),executeScript:ke(r,e.executeScript.bind(e)),dispose:ke(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ke(r,e.startTransaction.bind(e))(...n)).map(o=>Jc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Kc(r,e.getConnectionInfo.bind(e))),t},Jc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:ke(e,r.queryRaw.bind(r)),executeRaw:ke(e,r.executeRaw.bind(r)),commit:ke(e,r.commit.bind(r)),rollback:ke(e,r.rollback.bind(r))});function ke(e,r){return async(...t)=>{try{return en(await r(...t))}catch(n){if(ms("[error@wrapAsync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Kc(e,r){return(...t)=>{try{return en(r(...t))}catch(n){if(ms("[error@wrapSync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Yc=A(nn());var M=A(require("node:path")),zc=A(nn()),Th=N("prisma:engines");function fs(){return M.default.join(__dirname,"../")}var Sh="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Si=A(require("node:fs")),gs=gr("chmodPlusX");function Ri(e){if(process.platform==="win32")return;let r=Si.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){gs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);gs(`Have to call chmodPlusX on ${e}`),Si.default.chmodSync(e,n)}function Ai(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${wi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ce(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} ${s} -Details: ${r.message}`}var Es=C(bs(),1);function Ii(e){let r=(0,Es.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var ws="prisma+postgres",sn=`${ws}:`;function an(e){return e?.toString().startsWith(`${sn}//`)??!1}function ki(e){if(!an(e))return!1;let{host:r}=new URL(e);return r.includes("localhost")||r.includes("127.0.0.1")||r.includes("[::1]")}var vs=C(Di());function _i(e){return String(new Oi(e))}var Oi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Zc(r.binaryTargets)}));return`generator ${r.name} { -${(0,vs.default)(Xc(n),2)} +Details: ${r.message}`}var bs=A(ys(),1);function Ci(e){let r=(0,bs.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var Es="prisma+postgres",on=`${Es}:`;function sn(e){return e?.toString().startsWith(`${on}//`)??!1}function Ii(e){if(!sn(e))return!1;let{host:r}=new URL(e);return r.includes("localhost")||r.includes("127.0.0.1")||r.includes("[::1]")}var xs=A(Di());function ki(e){return String(new Oi(e))}var Oi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Zc(r.binaryTargets)}));return`generator ${r.name} { +${(0,xs.default)(Xc(n),2)} }`}};function Zc(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Xc(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${ep(n)}`).join(` -`)}function ep(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var nt={};tr(nt,{error:()=>np,info:()=>tp,log:()=>rp,query:()=>ip,should:()=>Ps,tags:()=>tt,warn:()=>Ni});var tt={error:ce("prisma:error"),warn:ke("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},Ps={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function Ni(e,...r){Ps.warn()&&console.warn(`${tt.warn} ${e}`,...r)}function tp(e,...r){console.info(`${tt.info} ${e}`,...r)}function np(e,...r){console.error(`${tt.error} ${e}`,...r)}function ip(e,...r){console.log(`${tt.query} ${e}`,...r)}function ln(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Ne(e,r){throw new Error(r)}var it=C(require("node:path"));function Fi(e){return it.default.sep===it.default.posix.sep?e:e.split(it.default.sep).join(it.default.posix.sep)}var ji=C(Os()),un=C(require("node:fs"));var wr=C(require("node:path"));function _s(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var qi=gr("prisma:tryLoadEnv");function st({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Ns(e);t.conflictCheck!=="none"&&wp(n,r,t.conflictCheck);let i=null;return Ls(n?.path,r)||(i=Ns(r)),!n&&!i&&qi("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function wp(e,r,t){let n=e?.dotenvResult.parsed,i=!Ls(e?.path,r);if(n&&r&&i&&un.default.existsSync(r)){let o=ji.default.parse(un.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=wr.default.relative(process.cwd(),e.path),l=wr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)} +`)}function ep(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var tt={};tr(tt,{error:()=>np,info:()=>tp,log:()=>rp,query:()=>ip,should:()=>Ps,tags:()=>rt,warn:()=>_i});var rt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},Ps={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function _i(e,...r){Ps.warn()&&console.warn(`${rt.warn} ${e}`,...r)}function tp(e,...r){console.info(`${rt.info} ${e}`,...r)}function np(e,...r){console.error(`${rt.error} ${e}`,...r)}function ip(e,...r){console.log(`${rt.query} ${e}`,...r)}function an(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function ar(e,r){throw new Error(r)}var nt=A(require("node:path"));function Li(e){return nt.default.sep===nt.default.posix.sep?e:e.split(nt.default.sep).join(nt.default.posix.sep)}var qi=A(Os()),ln=A(require("node:fs"));var wr=A(require("node:path"));function ks(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var $i=gr("prisma:tryLoadEnv");function ot({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=_s(e);t.conflictCheck!=="none"&&wp(n,r,t.conflictCheck);let i=null;return Ns(n?.path,r)||(i=_s(r)),!n&&!i&&$i("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function wp(e,r,t){let n=e?.dotenvResult.parsed,i=!Ns(e?.path,r);if(n&&r&&i&&ln.default.existsSync(r)){let o=qi.default.parse(ln.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=wr.default.relative(process.cwd(),e.path),l=wr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)} Conflicting env vars: ${s.map(c=>` ${W(c)}`).join(` `)} @@ -21,23 +21,23 @@ ${s.map(c=>` ${W(c)}`).join(` We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars. `;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${Y(a)} and ${Y(l)} Env vars from ${Y(l)} overwrite the ones from ${Y(a)} - `;console.warn(`${ke("warn(prisma)")} ${u}`)}}}}function Ns(e){if(xp(e)){qi(`Environment variables loaded from ${e}`);let r=ji.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:_s(r),message:Ie(`Environment variables loaded from ${wr.default.relative(process.cwd(),e)}`),path:e}}else qi(`Environment variables not found at ${e}`);return null}function Ls(e,r){return e&&r&&wr.default.resolve(e)===wr.default.resolve(r)}function xp(e){return!!(e&&un.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function xr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function Bi(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{Ms.has(e)||(Ms.add(e),Ni(r,...t))};var T=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(T,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var le=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(le,"PrismaClientRustPanicError");var j=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(j,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var vr=9e15,Ke=1e9,Ui="0123456789abcdef",fn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-vr,maxE:vr,crypto:!1},Vs,Fe,w=!0,yn="[DecimalError] ",He=yn+"Invalid argument: ",Bs=yn+"Precision limit exceeded",Us=yn+"crypto unavailable",Gs="[object Decimal]",X=Math.floor,U=Math.pow,vp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Pp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Tp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Qs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,Sp=9007199254740991,Rp=fn.length-1,Qi=gn.length-1,m={toStringTag:Gs};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ap(n,Ys(n,t)),n.precision=e,n.rounding=r,y(Fe==2||Fe==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(w=!1,o=c.s*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/En(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Pr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Pr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/En(5,e)),i=Pr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?we(r,n,i):new r(0):new r(NaN):e.isZero()?we(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=we(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Qi)return s=we(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=we(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Je(u,a),n=r?hn(c,a+10):Je(e,a),l=L(s,n,a,1),lt(l.d,i=p,d))do if(a+=10,s=Je(u,a),n=r?hn(c,a+10):Je(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(lt(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=bn(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Ws(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ip(n,Ys(n,t)),n.precision=e,n.rounding=r,y(Fe>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Fe==2||Fe==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=bn(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ie(e,0,Ke),r===void 0?r=n.rounding:ie(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=xe(n,!0):(ie(e,0,Ke),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e+1,r),t=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=xe(i):(ie(e,0,Ke),r===void 0?r=o.rounding:ie(r,0,8),n=y(new o(i),e+i.e+1,r),t=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Ws(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ie(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(U(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=Sp)return i=Js(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Je(a,n+t)),n),i.d&&(i=y(i,n+5,1),lt(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Je(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Ke),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e,r),t=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ie(e,1,Ke),r===void 0?r=n.rounding:ie(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=xe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=xe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function lt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function dn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Ap(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/En(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Pr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,h,g,S,P,R,b,D,me,ae,Hr,V,te,Ce,H,fr,jt=n.constructor,ni=n.s==i.s?1:-1,K=n.d,_=i.d;if(!K||!K[0]||!_||!_[0])return new jt(!n.s||!i.s||(K?_&&K[0]==_[0]:!_)?NaN:K&&K[0]==0||!_?ni*0:ni/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),H=_.length,te=K.length,P=new jt(ni),R=P.d=[],p=0;_[p]==(K[p]||0);p++);if(_[p]>(K[p]||0)&&c--,o==null?(ae=o=jt.precision,s=jt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)R.push(1),h=!0;else{if(ae=ae/f+2|0,p=0,H==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),K=e(K,d,l),H=_.length,te=K.length),V=H,b=K.slice(0,H),D=b.length;D=l/2&&++Ce;do d=0,u=r(_,b,H,D),u<0?(me=b[0],H!=D&&(me=me*l+(b[1]||0)),d=me/Ce|0,d>1?(d>=l&&(d=l-1),g=e(_,d,l),S=g.length,D=b.length,u=r(g,b,S,D),u==1&&(d--,t(g,H=10;d/=10)p++;P.e=p+c*f-1,y(P,a?o+P.e+1:o,s,h)}return P}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return w&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+We(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+We(-i-1)+o,t&&(n=t-s)>0&&(o+=We(n))):i>=s?(o+=We(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+We(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=We(n))),o}function bn(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function hn(e,r,t){if(r>Rp)throw w=!0,t&&(e.precision=t),Error(Bs);return y(new e(fn),r,1,!0)}function we(e,r,t){if(r>Qi)throw Error(Bs);return y(new e(gn),r,t,!0)}function Ws(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function We(e){for(var r="";e--;)r+="0";return r}function Js(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),qs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),qs(r.d,s)}return w=!0,o}function $s(e){return e.d[e.d.length-1]&1}function Hs(e,r,t){for(var n,i,o=new e(r[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&<(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Je(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,S=g.d,P=g.constructor,R=P.rounding,b=P.precision;if(g.s<0||!S||!S[0]||!g.e&&S[0]==1&&S.length==1)return new P(S&&!S[0]?-1/0:g.s!=1?NaN:S?0:g);if(r==null?(w=!1,c=b):c=r,P.precision=c+=h,t=J(S),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new P("0."+t),o++):g=new P(n+"."+t.slice(1))}else return u=hn(P,c+2,b).times(o+""),g=Je(new P(n+"."+t.slice(1)),c-h).plus(u),P.precision=b,r==null?y(g,b,R,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new P(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(hn(P,c+2,b).times(o+""))),l=L(l,new P(f),c,1),r==null)if(lt(l.d,c-h,R,a))P.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,P.precision=b,R,w=!0);else return P.precision=b,l;l=u,i+=2}}function Ks(e){return String(e.s*e.s/0)}function mn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Qs.test(r))return mn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Pp.test(r))t=16,r=r.toLowerCase();else if(vp.test(r))t=2;else if(Tp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Js(n,new n(t),o,o*2)),u=dn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=bn(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):ar.pow(2,l))),w=!0,e)}function Ip(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Pr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/En(5,t)),r=Pr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Pr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return w=!0,s.d.length=p+1,s}function En(e,r){for(var t=e;--r;)t*=e;return t}function Ys(e,r){var t,n=r.s<0,i=we(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Fe=n?4:1,r;if(t=r.divToInt(i),t.isZero())Fe=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Fe=$s(t)?n?2:3:n?4:1,r;Fe=$s(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ie(t,1,Ke),n===void 0?n=f.rounding:ie(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ks(e);else{for(c=xe(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=dn(xe(d),10,i),d.e=d.d.length),p=dn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=Vs),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=dn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function kp(e){return new this(e).abs()}function Dp(e){return new this(e).acos()}function Op(e){return new this(e).acosh()}function _p(e,r){return new this(e).plus(r)}function Np(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function Fp(e){return new this(e).atan()}function Mp(e){return new this(e).atanh()}function $p(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=we(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?we(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=we(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=we(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function qp(e){return new this(e).cbrt()}function jp(e){return y(e=new this(e),e.e+1,2)}function Vp(e,r,t){return new this(e).clamp(r,t)}function Bp(e){if(!e||typeof e!="object")throw Error(yn+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-vr,0,"toExpPos",0,vr,"maxE",0,vr,"minE",-vr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Us);else this[t]=!1;else throw Error(He+t+": "+n);return this}function Up(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function zs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,js(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Us);else for(;o=10;i/=10)n++;nAr,datamodelEnumToSchemaEnum:()=>yd});function yd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Ar=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Ar||{});var ia=C(Di());var na=C(require("node:fs"));var ea={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:ke,number:De,comment:Kr};var bd=e=>e,xn={},Ed=0,v={manual:xn.Prism&&xn.Prism.manual,disableWorkerMessageHandler:xn.Prism&&xn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,v.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ce instanceof ge)continue;if(me&&V!=r.length-1){R.lastIndex=te;var p=R.exec(e);if(!p)break;var c=p.index+(D?p[1].length:0),d=p.index+p[0].length,a=V,l=te;for(let _=r.length;a<_&&(l=l&&(++V,te=l);if(r[V]instanceof ge)continue;u=a-V,Ce=e.slice(te,l),p.index-=te}else{R.lastIndex=0;var p=R.exec(Ce),u=1}if(!p){if(o)break;continue}D&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ce.slice(0,c),h=Ce.slice(d);let H=[V,u];f&&(++V,te+=f.length,H.push(f));let fr=new ge(g,b?v.tokenize(p,b):p,Hr,p,me);if(H.push(fr),h&&H.push(h),Array.prototype.splice.apply(r,H),u!=1&&v.matchGrammar(e,r,t,V,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return v.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=v.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):wd(e.type)(e.content)};function wd(e){return ea[e]||bd}function ra(e){return xd(e,v.languages.javascript)}function xd(e,r){return v.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function ta(e){return Ii(e)}var vn=class e{firstLineNumber;lines;static read(r){let t;try{t=na.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` -`);return new e(r,ta(n).split(` -`))}highlight(){let r=ra(this.toString());return new e(this.firstLineNumber,r.split(` + `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function _s(e){if(xp(e)){$i(`Environment variables loaded from ${e}`);let r=qi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ks(r),message:Ce(`Environment variables loaded from ${wr.default.relative(process.cwd(),e)}`),path:e}}else $i(`Environment variables not found at ${e}`);return null}function Ns(e,r){return e&&r&&wr.default.resolve(e)===wr.default.resolve(r)}function xp(e){return!!(e&&ln.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function cn(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function ji(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{Fs.has(e)||(Fs.add(e),_i(r,...t))};var v=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(v,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var le=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(le,"PrismaClientRustPanicError");var V=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(V,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var we=class{_map=new Map;get(r){return this._map.get(r)?.value}set(r,t){this._map.set(r,{value:t})}getOrCreate(r,t){let n=this._map.get(r);if(n)return n.value;let i=t();return this.set(r,i),i}};function We(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ms(e,r){let t={};for(let n of e){let i=n[r];t[i]=n}return t}function at(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function $s(e){return{models:Bi(e.models),enums:Bi(e.enums),types:Bi(e.types)}}function Bi(e){let r={};for(let{name:t,...n}of e)r[t]=n;return r}function xr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dn(e){return e.toString()!=="Invalid Date"}var Pr=9e15,Ye=1e9,Ui="0123456789abcdef",gn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",hn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Pr,maxE:Pr,crypto:!1},Bs,Ne,w=!0,bn="[DecimalError] ",He=bn+"Invalid argument: ",Us=bn+"Precision limit exceeded",Gs=bn+"crypto unavailable",Qs="[object Decimal]",X=Math.floor,U=Math.pow,Pp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,vp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Tp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ws=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,Sp=9007199254740991,Rp=gn.length-1,Qi=hn.length-1,m={toStringTag:Qs};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ap(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne==2||Ne==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(w=!1,o=c.s*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/wn(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=vr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=vr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/wn(5,e)),i=vr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?xe(r,n,i):new r(0):new r(NaN):e.isZero()?xe(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=xe(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Qi)return s=xe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=xe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),lt(l.d,i=p,d))do if(a+=10,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(lt(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=En(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Js(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ip(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Ne==2||Ne==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=En(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ie(e,0,Ye),r===void 0?r=n.rounding:ie(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=Pe(n,!0):(ie(e,0,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e+1,r),t=Pe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=Pe(i):(ie(e,0,Ye),r===void 0?r=o.rounding:ie(r,0,8),n=y(new o(i),e+i.e+1,r),t=Pe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Js(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ie(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(U(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=Sp)return i=Ks(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Ke(a,n+t)),n),i.d&&(i=y(i,n+5,1),lt(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Ke(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=Pe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e,r),t=Pe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ie(e,1,Ye),r===void 0?r=n.rounding:ie(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=Pe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=Pe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function lt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function mn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Ap(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/wn(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=vr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,h,g,D,T,S,b,O,me,ae,Jr,j,te,Ae,K,fr,qt=n.constructor,ti=n.s==i.s?1:-1,H=n.d,_=i.d;if(!H||!H[0]||!_||!_[0])return new qt(!n.s||!i.s||(H?_&&H[0]==_[0]:!_)?NaN:H&&H[0]==0||!_?ti*0:ti/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),K=_.length,te=H.length,T=new qt(ti),S=T.d=[],p=0;_[p]==(H[p]||0);p++);if(_[p]>(H[p]||0)&&c--,o==null?(ae=o=qt.precision,s=qt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),h=!0;else{if(ae=ae/f+2|0,p=0,K==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),H=e(H,d,l),K=_.length,te=H.length),j=K,b=H.slice(0,K),O=b.length;O=l/2&&++Ae;do d=0,u=r(_,b,K,O),u<0?(me=b[0],K!=O&&(me=me*l+(b[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),g=e(_,d,l),D=g.length,O=b.length,u=r(g,b,D,O),u==1&&(d--,t(g,K=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,h)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return w&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Je(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Je(-i-1)+o,t&&(n=t-s)>0&&(o+=Je(n))):i>=s?(o+=Je(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Je(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Je(n))),o}function En(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function yn(e,r,t){if(r>Rp)throw w=!0,t&&(e.precision=t),Error(Us);return y(new e(gn),r,1,!0)}function xe(e,r,t){if(r>Qi)throw Error(Us);return y(new e(hn),r,t,!0)}function Js(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Je(e){for(var r="";e--;)r+="0";return r}function Ks(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),Vs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),Vs(r.d,s)}return w=!0,o}function qs(e){return e.d[e.d.length-1]&1}function Hs(e,r,t){for(var n,i,o=new e(r[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&<(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Ke(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,D=g.d,T=g.constructor,S=T.rounding,b=T.precision;if(g.s<0||!D||!D[0]||!g.e&&D[0]==1&&D.length==1)return new T(D&&!D[0]?-1/0:g.s!=1?NaN:D?0:g);if(r==null?(w=!1,c=b):c=r,T.precision=c+=h,t=J(D),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new T("0."+t),o++):g=new T(n+"."+t.slice(1))}else return u=yn(T,c+2,b).times(o+""),g=Ke(new T(n+"."+t.slice(1)),c-h).plus(u),T.precision=b,r==null?y(g,b,S,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new T(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(yn(T,c+2,b).times(o+""))),l=L(l,new T(f),c,1),r==null)if(lt(l.d,c-h,S,a))T.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,T.precision=b,S,w=!0);else return T.precision=b,l;l=u,i+=2}}function Ys(e){return String(e.s*e.s/0)}function fn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Ws.test(r))return fn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(vp.test(r))t=16,r=r.toLowerCase();else if(Pp.test(r))t=2;else if(Tp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Ks(n,new n(t),o,o*2)),u=mn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=En(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):Le.pow(2,l))),w=!0,e)}function Ip(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:vr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/wn(5,t)),r=vr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function vr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return w=!0,s.d.length=p+1,s}function wn(e,r){for(var t=e;--r;)t*=e;return t}function zs(e,r){var t,n=r.s<0,i=xe(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Ne=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ne=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Ne=qs(t)?n?2:3:n?4:1,r;Ne=qs(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ie(t,1,Ye),n===void 0?n=f.rounding:ie(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ys(e);else{for(c=Pe(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=mn(Pe(d),10,i),d.e=d.d.length),p=mn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=Bs),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=mn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function Dp(e){return new this(e).abs()}function Op(e){return new this(e).acos()}function kp(e){return new this(e).acosh()}function _p(e,r){return new this(e).plus(r)}function Np(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function Fp(e){return new this(e).atan()}function Mp(e){return new this(e).atanh()}function $p(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=xe(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?xe(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=xe(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=xe(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function qp(e){return new this(e).cbrt()}function Vp(e){return y(e=new this(e),e.e+1,2)}function jp(e,r,t){return new this(e).clamp(r,t)}function Bp(e){if(!e||typeof e!="object")throw Error(bn+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-Pr,0,"toExpPos",0,Pr,"maxE",0,Pr,"minE",-Pr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Gs);else this[t]=!1;else throw Error(He+t+": "+n);return this}function Up(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function Zs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,js(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Gs);else for(;o=10;i/=10)n++;nSr,datamodelEnumToSchemaEnum:()=>gd});function gd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Sr=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Sr||{});var na=A(Di());var ta=A(require("node:fs"));var Xs={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:Ie,number:De,comment:Kr};var hd=e=>e,xn={},yd=0,P={manual:xn.Prism&&xn.Prism.manual,disableWorkerMessageHandler:xn.Prism&&xn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,P.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ge)continue;if(me&&j!=r.length-1){S.lastIndex=te;var p=S.exec(e);if(!p)break;var c=p.index+(O?p[1].length:0),d=p.index+p[0].length,a=j,l=te;for(let _=r.length;a<_&&(l=l&&(++j,te=l);if(r[j]instanceof ge)continue;u=a-j,Ae=e.slice(te,l),p.index-=te}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}O&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ae.slice(0,c),h=Ae.slice(d);let K=[j,u];f&&(++j,te+=f.length,K.push(f));let fr=new ge(g,b?P.tokenize(p,b):p,Jr,p,me);if(K.push(fr),h&&K.push(h),Array.prototype.splice.apply(r,K),u!=1&&P.matchGrammar(e,r,t,j,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return P.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=P.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=P.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});P.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;P.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});P.languages.markup&&P.languages.markup.tag.addInlined("script","javascript");P.languages.js=P.languages.javascript;P.languages.typescript=P.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});P.languages.ts=P.languages.typescript;function ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):bd(e.type)(e.content)};function bd(e){return Xs[e]||hd}function ea(e){return Ed(e,P.languages.javascript)}function Ed(e,r){return P.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function ra(e){return Ci(e)}var Pn=class e{firstLineNumber;lines;static read(r){let t;try{t=ta.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` +`);return new e(r,ra(n).split(` +`))}highlight(){let r=ea(this.toString());return new e(this.firstLineNumber,r.split(` `))}toString(){return this.lines.join(` -`)}};var vd={red:ce,gray:Kr,dim:Ie,bold:W,underline:Y,highlightSource:e=>e.highlight()},Pd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Td({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function Sd({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Td({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=vn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Ad(c),d=Rd(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,ia.default)(i,h).slice(h)}}return s}function Rd(e){let r=Object.keys(Ar).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Ad(e){let r=0;for(let t=0;t"Unknown error")}function ua(e){return e.errors.flatMap(r=>r.kind==="Union"?ua(r):[r])}function kd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Dd(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Dd(e,r){return[...new Set(e.concat(r))]}function Od(e){return Bi(e,(r,t)=>{let n=sa(r),i=sa(t);return n!==i?n-i:aa(r)-aa(t)})}function sa(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function aa(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ue=class{constructor(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};pa();var Cr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ca();var Sn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var Rn=e=>e,An={bold:Rn,red:Rn,green:Rn,dim:Rn,enabled:!1},da={bold:W,red:ce,green:qe,dim:Ie,enabled:!0},Ir={write(e){e.writeLine(",")}};var Te=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var kr=class extends ze{items=[];addItem(r){return this.items.push(new Sn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new Te("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ir,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Dr=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof kr&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new Te("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ir,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Te(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var pt=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ir,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Tn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":_d(e,r);break;case"IncludeOnScalar":Nd(e,r);break;case"EmptySelection":Ld(e,r,t);break;case"UnknownSelectionField":qd(e,r);break;case"InvalidSelectionValue":jd(e,r);break;case"UnknownArgument":Vd(e,r);break;case"UnknownInputField":Bd(e,r);break;case"RequiredArgumentMissing":Ud(e,r);break;case"InvalidArgumentType":Gd(e,r);break;case"InvalidArgumentValue":Qd(e,r);break;case"ValueTooLarge":Wd(e,r);break;case"SomeFieldsMissing":Jd(e,r);break;case"TooManyFieldsGiven":Hd(e,r);break;case"Union":la(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function _d(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Nd(e,r){let[t,n]=Or(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ld(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Fd(e,r,i);return}if(n.hasField("select")){Md(e,r);return}}if(t?.[Ye(e.outputType.name)]){$d(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Fd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ue(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Md(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ha(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function $d(e,r){let t=new pt;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ue("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Or(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Dr;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function qd(e,r){let t=ya(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":ha(n,e.outputType);break;case"include":Kd(n,e.outputType);break;case"omit":Yd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(dt(n)),i.join(" ")})}function jd(e,r){let t=ya(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function Vd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),zd(n,e.arguments)),r.addErrorMessage(i=>fa(i,t,e.arguments.map(o=>o.name)))}function Bd(e,r){let[t,n]=Or(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ba(o,e.inputType)}r.addErrorMessage(o=>fa(o,n,e.inputType.fields.map(s=>s.name)))}function fa(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Xd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(dt(e)),n.join(" ")}function Ud(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Or(e.argumentPath),s=new pt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(ga).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Or(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function ga(e){return e.kind==="list"?`${ga(e.elementType)}[]`:e.name}function Gd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=Cn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Qd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Cn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Wd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Jd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ba(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Cn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(dt(i)),o.join(" ")})}function Hd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Cn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ha(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,"true"))}function Kd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ue(t.name,"true"))}function Yd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ue(t.name,"true"))}function zd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function ya(e,r){let[t,n]=Or(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ba(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function Or(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function dt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function Cn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Zd=3;function Xd(e,r){let t=1/0,n;for(let i of r){let o=(0,ma.default)(e,i);o>Zd||o`}};function _r(e){return e instanceof mt}var In=Symbol(),zi=new WeakMap,Me=class{constructor(r){r===In?zi.set(this,`Prisma.${this._getName()}`):zi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return zi.get(this)}},ft=class extends Me{_getNamespace(){return"NullTypes"}},gt=class extends ft{#e};Zi(gt,"DbNull");var ht=class extends ft{#e};Zi(ht,"JsonNull");var yt=class extends ft{#e};Zi(yt,"AnyNull");var kn={classes:{DbNull:gt,JsonNull:ht,AnyNull:yt},instances:{DbNull:new gt(In),JsonNull:new ht(In),AnyNull:new yt(In)}};function Zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var Ea=": ",Dn=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ea.length}write(r){let t=new Te(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(Ea).write(this.value)}};var Xi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` -`)}};function Nr(e){return new Xi(wa(e))}function wa(e){let r=new Dr;for(let[t,n]of Object.entries(e)){let i=new Dn(t,xa(n));r.addField(i)}return r}function xa(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Rr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=wn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):_r(e)?new Q(`prisma.${Ye(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?em(e):typeof e=="object"?wa(e):new Q(Object.prototype.toString.call(e))}function em(e){let r=new kr;for(let t of e)r.addItem(xa(t));return r}function On(e,r){let t=r==="pretty"?da:An,n=e.renderAllMessages(t),i=new Cr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function _n({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Nr(e);for(let p of r)Tn(p,a,s);let{message:l,args:u}=On(a,t),c=Pn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Se(e){return e.replace(/^./,r=>r.toLowerCase())}function Pa(e,r,t){let n=Se(t);return!r.result||!(r.result.$allModels||r.result[n])?e:rm({...e,...va(r.name,e,r.result.$allModels),...va(r.name,e,r.result[n])})}function rm(e){let r=new Pe,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return xr(e,n=>({...n,needs:t(n.name,new Set)}))}function va(e,r,t){return t?xr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:tm(r,o,i)})):{}}function tm(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function Ta(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function Sa(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Nn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new Pe;modelExtensionsCache=new Pe;queryCallbacksCache=new Pe;clientExtensions=ut(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ut(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>Pa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Se(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Lr=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Nn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Nn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Ln=class{constructor(r){this.name=r}};function Ra(e){return e instanceof Ln}function Aa(e){return new Ln(e)}var Ca=Symbol(),bt=class{constructor(r){if(r!==Ca)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Fn:r}},Fn=new bt(Ca);function Re(e){return e instanceof bt}var nm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ia="explicitly `undefined` values are not allowed";function Mn({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=Lr.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new eo({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:nm[r],query:Et(t,p)}}function Et({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Da(t,n),selection:im(e,r,i,n)}}function im(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),lm(e,n)):om(n,r,t)}function om(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&sm(n,r,e),am(n,t,e),n}function sm(e,r,t){for(let[n,i]of Object.entries(r)){if(Re(i))continue;let o=t.nestSelection(n);if(ro(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=Et(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Et(i,o)}}function am(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=Sa(i,n);for(let[s,a]of Object.entries(o)){if(Re(a))continue;ro(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function lm(e,r){let t={},n=r.getComputedFields(),i=Ta(e,n);for(let[o,s]of Object.entries(i)){if(Re(s))continue;let a=r.nestSelection(o);ro(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Re(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=Et({},a):t[o]=!0;continue}t[o]=Et(s,a)}}return t}function ka(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Sr(e)){if(wn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ra(e))return{$type:"Param",value:e.name};if(_r(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return um(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(cm(e))return e.values;if(Rr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==kn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(pm(e))return e.toJSON();if(typeof e=="object")return Da(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Da(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Re(i)||(i!==void 0?t[n]=ka(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ia}))}return t}function um(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ye(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ne(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Oa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Fr=class{_client;constructor(r){this._client=r}prometheus(r){return Oa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Oa(this._client),this._client._engine.metrics({format:"json",...r})}};function _a(e,r){let t=ut(()=>dm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function dm(e){return{datamodel:{models:to(e.models),enums:to(e.enums),types:to(e.types)}}}function to(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var no=new WeakMap,$n="$$PrismaTypedSql",wt=class{constructor(r,t){no.set(this,{sql:r,values:t}),Object.defineProperty(this,$n,{value:$n})}get sql(){return no.get(this).sql}get values(){return no.get(this).values}};function Na(e){return(...r)=>new wt(e,r)}function qn(e){return e!=null&&e[$n]===$n}var fu=C(Si());var gu=require("node:async_hooks"),hu=require("node:events"),yu=C(require("node:fs")),ti=C(require("node:path"));var oe=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var jn={enumerable:!0,configurable:!0,writable:!0};function Vn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Ma=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=mm(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=$a(Reflect.ownKeys(o),t),a=$a(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...jn,...l?.getPropertyDescriptor(s)}:jn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ma]=function(){let o={...this};return delete o[Ma],o},i}function mm(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function $a(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Mr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function $r(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function qa(e){if(e===void 0)return"";let r=Nr(e);return new Cr(0,{colors:An}).write(r).toString()}var fm="P2037";function qr({error:e,user_facing_error:r},t,n){return r.error_code?new z(gm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new j(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function gm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===fm&&(t+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var vt="";function ja(e){var r=e.split(` -`);return r.reduce(function(t,n){var i=bm(n)||wm(n)||Pm(n)||Am(n)||Sm(n);return i&&t.push(i),t},[])}var hm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ym=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bm(e){var r=hm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=ym.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||vt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var Em=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function wm(e){var r=Em.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var xm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,vm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pm(e){var r=xm.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=vm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||vt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var Tm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Sm(e){var r=Tm.exec(e);return r?{file:r[3],methodName:r[1]||vt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var Rm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Am(e){var r=Rm.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var so=class{getLocation(){return null}},ao=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=ja(r).find(i=>{if(!i.file)return!1;let o=Fi(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new so:new ao}var Va={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function jr(e={}){let r=Im(e);return Object.entries(r).reduce((n,[i,o])=>(Va[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Im(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Bn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Ba(e,r){let t=Bn(e);return r({action:"aggregate",unpacker:t,argsMapper:jr})(e)}function km(e={}){let{select:r,...t}=e;return typeof r=="object"?jr({...t,_count:r}):jr({...t,_count:{_all:!0}})}function Dm(e={}){return typeof e.select=="object"?r=>Bn(e)(r)._count:r=>Bn(e)(r)._count._all}function Ua(e,r){return r({action:"count",unpacker:Dm(e),argsMapper:km})(e)}function Om(e={}){let r=jr(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function _m(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Ga(e,r){return r({action:"groupBy",unpacker:_m(e),argsMapper:Om})(e)}function Qa(e,r,t){if(r==="aggregate")return n=>Ba(n,t);if(r==="count")return n=>Ua(n,t);if(r==="groupBy")return n=>Ga(n,t)}function Wa(e,r){let t=r.fields.filter(i=>!i.relationName),n=Zs(t,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...Vn(Object.keys(n))})}var Ja=e=>Array.isArray(e)?e:e.split("."),lo=(e,r)=>Ja(r).reduce((t,n)=>t&&t[n],e),Ha=(e,r,t)=>Ja(r).reduceRight((n,i,o,s)=>Object.assign({},lo(e,s.slice(0,o)),{[i]:n}),t);function Nm(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function Lm(e,r,t){return r===void 0?e??{}:Ha(r,t,e||!0)}function uo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=Nm(n,i),p=Lm(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Fm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let P=[a[g].type,t,g],R=[c,p];return uo(e,...P,...R)},...Vn([...f,...Object.getOwnPropertyNames(d)])})}}function Fm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Mm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],$m=["aggregate","count","groupBy"];function co(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[qm(e,r),Vm(e,r),xt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function qm(e,r){let t=Se(r),n=Object.keys(Ar).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Mm.includes(o)?uo(e,r,s):jm(i)?Qa(e,i,s):s({})}}}function jm(e){return $m.includes(e)}function Vm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return Wa(r,t)}))}function Ka(e){return e.replace(/^./,r=>r.toUpperCase())}var po=Symbol();function Pt(e){let r=[Bm(e),Um(e),re(po,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(xt(t)),he(e,r)}function Bm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function Um(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Se),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ka(i);if(e._runtimeDataModel.models[o]!==void 0)return co(e,o);if(e._runtimeDataModel.models[i]!==void 0)return co(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ya(e){return e[po]?e[po]:e}function za(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Pt(r)}function Za({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(Mr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Mr(u))}Gm(e,l.needs)&&s.push(Qm(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Gm(e,r){return r.every(t=>Vi(e,t))}function Qm(e,r){return lr(re(e.name,()=>e.compute(r)))}function Un({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Un({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function el({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Un({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Se(l);return Za({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Wm=["$connect","$disconnect","$on","$transaction","$use","$extends"],rl=Wm;function tl(e){if(e instanceof oe)return Jm(e);if(qn(e))return Hm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:tl(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ll(o,l),a.args=s,il(e,a,t,n+1)}})})}function ol(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return il(e,r,s)}function sl(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?al(t,n,0,e):e(t)}}function al(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ll(i,l),al(a,r,t+1,n)}})}var nl=e=>e;function ll(e=nl,r=nl){return t=>e(r(t))}var ul=N("prisma:client"),cl={Vercel:"vercel","Netlify CI":"netlify"};function pl({postinstall:e,ciName:r,clientVersion:t}){if(ul("checkPlatformCaching:postinstall",e),ul("checkPlatformCaching:ciName",r),e===!0&&r&&r in cl){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +`)}};var wd={red:ce,gray:Kr,dim:Ce,bold:W,underline:Y,highlightSource:e=>e.highlight()},xd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Pd({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function vd({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Pd({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Pn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Sd(c),d=Td(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,na.default)(i,h).slice(h)}}return s}function Td(e){let r=Object.keys(Sr).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Sd(e){let r=0;for(let t=0;t"Unknown error")}function la(e){return e.errors.flatMap(r=>r.kind==="Union"?la(r):[r])}function Cd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Id(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Id(e,r){return[...new Set(e.concat(r))]}function Dd(e){return ji(e,(r,t)=>{let n=oa(r),i=oa(t);return n!==i?n-i:sa(r)-sa(t)})}function oa(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function sa(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ue=class{constructor(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};ca();var Rr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ua();var Sn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var Rn=e=>e,An={bold:Rn,red:Rn,green:Rn,dim:Rn,enabled:!1},pa={bold:W,red:ce,green:qe,dim:Ce,enabled:!0},Ar={write(e){e.writeLine(",")}};var ve=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Cr=class extends ze{items=[];addItem(r){return this.items.push(new Sn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new ve("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ar,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ir=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Cr&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new ve("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ar,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new ve(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var ct=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ar,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Tn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":Od(e,r);break;case"IncludeOnScalar":kd(e,r);break;case"EmptySelection":_d(e,r,t);break;case"UnknownSelectionField":Md(e,r);break;case"InvalidSelectionValue":$d(e,r);break;case"UnknownArgument":qd(e,r);break;case"UnknownInputField":Vd(e,r);break;case"RequiredArgumentMissing":jd(e,r);break;case"InvalidArgumentType":Bd(e,r);break;case"InvalidArgumentValue":Ud(e,r);break;case"ValueTooLarge":Gd(e,r);break;case"SomeFieldsMissing":Qd(e,r);break;case"TooManyFieldsGiven":Wd(e,r);break;case"Union":aa(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function Od(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function kd(e,r){let[t,n]=Dr(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${pt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function _d(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Nd(e,r,i);return}if(n.hasField("select")){Ld(e,r);return}}if(t?.[We(e.outputType.name)]){Fd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Nd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ue(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ld(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ga(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${pt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function Fd(e,r){let t=new ct;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ue("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Dr(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Ir;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Md(e,r){let t=ha(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":ga(n,e.outputType);break;case"include":Jd(n,e.outputType);break;case"omit":Kd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(pt(n)),i.join(" ")})}function $d(e,r){let t=ha(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function qd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Hd(n,e.arguments)),r.addErrorMessage(i=>ma(i,t,e.arguments.map(o=>o.name)))}function Vd(e,r){let[t,n]=Dr(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ya(o,e.inputType)}r.addErrorMessage(o=>ma(o,n,e.inputType.fields.map(s=>s.name)))}function ma(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=zd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(pt(e)),n.join(" ")}function jd(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Dr(e.argumentPath),s=new ct,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(fa).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Dr(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function fa(e){return e.kind==="list"?`${fa(e.elementType)}[]`:e.name}function Bd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=Cn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ud(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Cn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Gd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Qd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ya(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Cn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(pt(i)),o.join(" ")})}function Wd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Cn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ga(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,"true"))}function Jd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ue(t.name,"true"))}function Kd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ue(t.name,"true"))}function Hd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function ha(e,r){let[t,n]=Dr(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ya(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function Dr(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function pt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function Cn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Yd=3;function zd(e,r){let t=1/0,n;for(let i of r){let o=(0,da.default)(e,i);o>Yd||o`}};function Or(e){return e instanceof dt}var In=Symbol(),Yi=new WeakMap,Me=class{constructor(r){r===In?Yi.set(this,`Prisma.${this._getName()}`):Yi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Yi.get(this)}},mt=class extends Me{_getNamespace(){return"NullTypes"}},ft=class extends mt{#e};zi(ft,"DbNull");var gt=class extends mt{#e};zi(gt,"JsonNull");var ht=class extends mt{#e};zi(ht,"AnyNull");var Dn={classes:{DbNull:ft,JsonNull:gt,AnyNull:ht},instances:{DbNull:new ft(In),JsonNull:new gt(In),AnyNull:new ht(In)}};function zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ba=": ",On=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ba.length}write(r){let t=new ve(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(ba).write(this.value)}};var Zi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` +`)}};function kr(e){return new Zi(Ea(e))}function Ea(e){let r=new Ir;for(let[t,n]of Object.entries(e)){let i=new On(t,wa(n));r.addField(i)}return r}function wa(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Tr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=dn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):Or(e)?new Q(`prisma.${We(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Zd(e):typeof e=="object"?Ea(e):new Q(Object.prototype.toString.call(e))}function Zd(e){let r=new Cr;for(let t of e)r.addItem(wa(t));return r}function kn(e,r){let t=r==="pretty"?pa:An,n=e.renderAllMessages(t),i=new Rr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function _n({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=kr(e);for(let p of r)Tn(p,a,s);let{message:l,args:u}=kn(a,t),c=vn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Te(e){return e.replace(/^./,r=>r.toLowerCase())}function Pa(e,r,t){let n=Te(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Xd({...e,...xa(r.name,e,r.result.$allModels),...xa(r.name,e,r.result[n])})}function Xd(e){let r=new we,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return cn(e,n=>({...n,needs:t(n.name,new Set)}))}function xa(e,r,t){return t?cn(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:em(r,o,i)})):{}}function em(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function va(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function Ta(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Nn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=at(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>Pa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Te(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},_r=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Nn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Nn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Ln=class{constructor(r){this.name=r}};function Sa(e){return e instanceof Ln}function Ra(e){return new Ln(e)}var Aa=Symbol(),yt=class{constructor(r){if(r!==Aa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Fn:r}},Fn=new yt(Aa);function Se(e){return e instanceof yt}var rm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ca="explicitly `undefined` values are not allowed";function Mn({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=_r.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Xi({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:rm[r],query:bt(t,p)}}function bt({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Da(t,n),selection:tm(e,r,i,n)}}function tm(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),sm(e,n)):nm(n,r,t)}function nm(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&im(n,r,e),om(n,t,e),n}function im(e,r,t){for(let[n,i]of Object.entries(r)){if(Se(i))continue;let o=t.nestSelection(n);if(eo(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=bt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=bt(i,o)}}function om(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=Ta(i,n);for(let[s,a]of Object.entries(o)){if(Se(a))continue;eo(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function sm(e,r){let t={},n=r.getComputedFields(),i=va(e,n);for(let[o,s]of Object.entries(i)){if(Se(s))continue;let a=r.nestSelection(o);eo(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Se(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=bt({},a):t[o]=!0;continue}t[o]=bt(s,a)}}return t}function Ia(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(xr(e)){if(dn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Sa(e))return{$type:"Param",value:e.name};if(Or(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return am(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(lm(e))return e.values;if(Tr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==Dn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(um(e))return e.toJSON();if(typeof e=="object")return Da(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Da(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Se(i)||(i!==void 0?t[n]=Ia(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ca}))}return t}function am(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[We(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ar(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Oa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Nr=class{_client;constructor(r){this._client=r}prometheus(r){return Oa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Oa(this._client),this._client._engine.metrics({format:"json",...r})}};function ka(e,r){let t=at(()=>cm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function cm(e){return{datamodel:{models:ro(e.models),enums:ro(e.enums),types:ro(e.types)}}}function ro(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var to=new WeakMap,$n="$$PrismaTypedSql",Et=class{constructor(r,t){to.set(this,{sql:r,values:t}),Object.defineProperty(this,$n,{value:$n})}get sql(){return to.get(this).sql}get values(){return to.get(this).values}};function _a(e){return(...r)=>new Et(e,r)}function qn(e){return e!=null&&e[$n]===$n}var fu=A(Ti());var gu=require("node:async_hooks"),hu=require("node:events"),yu=A(require("node:fs")),ri=A(require("node:path"));var oe=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Vn={enumerable:!0,configurable:!0,writable:!0};function jn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Vn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Fa=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=pm(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ma(Reflect.ownKeys(o),t),a=Ma(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...Vn,...l?.getPropertyDescriptor(s)}:Vn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Fa]=function(){let o={...this};return delete o[Fa],o},i}function pm(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function Ma(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Lr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Fr(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function $a(e){if(e===void 0)return"";let r=kr(e);return new Rr(0,{colors:An}).write(r).toString()}var dm="P2037";function Mr({error:e,user_facing_error:r},t,n){return r.error_code?new z(mm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new V(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function mm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===dm&&(t+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var xt="";function qa(e){var r=e.split(` +`);return r.reduce(function(t,n){var i=hm(n)||bm(n)||xm(n)||Sm(n)||vm(n);return i&&t.push(i),t},[])}var fm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gm=/\((\S*)(?::(\d+))(?::(\d+))\)/;function hm(e){var r=fm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=gm.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||xt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var ym=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function bm(e){var r=ym.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Em=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,wm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function xm(e){var r=Em.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=wm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||xt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var Pm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function vm(e){var r=Pm.exec(e);return r?{file:r[3],methodName:r[1]||xt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var Tm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sm(e){var r=Tm.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var oo=class{getLocation(){return null}},so=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=qa(r).find(i=>{if(!i.file)return!1;let o=Li(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new oo:new so}var Va={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function $r(e={}){let r=Am(e);return Object.entries(r).reduce((n,[i,o])=>(Va[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Am(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Bn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function ja(e,r){let t=Bn(e);return r({action:"aggregate",unpacker:t,argsMapper:$r})(e)}function Cm(e={}){let{select:r,...t}=e;return typeof r=="object"?$r({...t,_count:r}):$r({...t,_count:{_all:!0}})}function Im(e={}){return typeof e.select=="object"?r=>Bn(e)(r)._count:r=>Bn(e)(r)._count._all}function Ba(e,r){return r({action:"count",unpacker:Im(e),argsMapper:Cm})(e)}function Dm(e={}){let r=$r(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function Om(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Ua(e,r){return r({action:"groupBy",unpacker:Om(e),argsMapper:Dm})(e)}function Ga(e,r,t){if(r==="aggregate")return n=>ja(n,t);if(r==="count")return n=>Ba(n,t);if(r==="groupBy")return n=>Ua(n,t)}function Qa(e,r){let t=r.fields.filter(i=>!i.relationName),n=Ms(t,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new dt(e,o,s.type,s.isList,s.kind==="enum")},...jn(Object.keys(n))})}var Wa=e=>Array.isArray(e)?e:e.split("."),ao=(e,r)=>Wa(r).reduce((t,n)=>t&&t[n],e),Ja=(e,r,t)=>Wa(r).reduceRight((n,i,o,s)=>Object.assign({},ao(e,s.slice(0,o)),{[i]:n}),t);function km(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function _m(e,r,t){return r===void 0?e??{}:Ja(r,t,e||!0)}function lo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=km(n,i),p=_m(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Nm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let T=[a[g].type,t,g],S=[c,p];return lo(e,...T,...S)},...jn([...f,...Object.getOwnPropertyNames(d)])})}}function Nm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Lm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fm=["aggregate","count","groupBy"];function uo(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[Mm(e,r),qm(e,r),wt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function Mm(e,r){let t=Te(r),n=Object.keys(Sr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Lm.includes(o)?lo(e,r,s):$m(i)?Ga(e,i,s):s({})}}}function $m(e){return Fm.includes(e)}function qm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return Qa(r,t)}))}function Ka(e){return e.replace(/^./,r=>r.toUpperCase())}var co=Symbol();function Pt(e){let r=[Vm(e),jm(e),re(co,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(wt(t)),he(e,r)}function Vm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function jm(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Te),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ka(i);if(e._runtimeDataModel.models[o]!==void 0)return uo(e,o);if(e._runtimeDataModel.models[i]!==void 0)return uo(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ha(e){return e[co]?e[co]:e}function Ya(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Pt(r)}function za({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(Lr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Lr(u))}Bm(e,l.needs)&&s.push(Um(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Bm(e,r){return r.every(t=>Vi(e,t))}function Um(e,r){return lr(re(e.name,()=>e.compute(r)))}function Un({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Un({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Xa({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Un({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return za({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Gm=["$connect","$disconnect","$on","$transaction","$extends"],el=Gm;function rl(e){if(e instanceof oe)return Qm(e);if(qn(e))return Wm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:rl(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=al(o,l),a.args=s,nl(e,a,t,n+1)}})})}function il(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return nl(e,r,s)}function ol(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?sl(t,n,0,e):e(t)}}function sl(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=al(i,l),sl(a,r,t+1,n)}})}var tl=e=>e;function al(e=tl,r=tl){return t=>e(r(t))}var ll=N("prisma:client"),ul={Vercel:"vercel","Netlify CI":"netlify"};function cl({postinstall:e,ciName:r,clientVersion:t}){if(ll("checkPlatformCaching:postinstall",e),ll("checkPlatformCaching:ciName",r),e===!0&&r&&r in ul){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${cl[r]}-build`;throw console.error(n),new T(n,t)}}function dl(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Km=()=>globalThis.process?.release?.name==="node",Ym=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,zm=()=>!!globalThis.Deno,Zm=()=>typeof globalThis.Netlify=="object",Xm=()=>typeof globalThis.EdgeRuntime=="object",ef=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function rf(){return[[Zm,"netlify"],[Xm,"edge-light"],[ef,"workerd"],[zm,"deno"],[Ym,"bun"],[Km,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var tf={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=rf();return{id:e,prettyName:tf[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var yl=C(require("node:fs")),St=C(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: +Learn how: https://pris.ly/d/${ul[r]}-build`;throw console.error(n),new v(n,t)}}function pl(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Jm=()=>globalThis.process?.release?.name==="node",Km=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Hm=()=>!!globalThis.Deno,Ym=()=>typeof globalThis.Netlify=="object",zm=()=>typeof globalThis.EdgeRuntime=="object",Zm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Xm(){return[[Ym,"netlify"],[zm,"edge-light"],[Zm,"workerd"],[Hm,"deno"],[Km,"bun"],[Jm,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var ef={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=Xm();return{id:e,prettyName:ef[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var hl=A(require("node:fs")),Tt=A(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: -${nf(e)}`}function nf(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return _i({...r,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function er(e){let{searchedLocations:r}=e;return`The following locations have been searched: +${rf(e)}`}function rf(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ki({...r,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function er(e){let{searchedLocations:r}=e;return`The following locations have been searched: ${[...new Set(r)].map(i=>` ${i}`).join(` -`)}`}function ml(e){let{runtimeBinaryTarget:r}=e;return`${Xe(e)} +`)}`}function dl(e){let{runtimeBinaryTarget:r}=e;return`${Xe(e)} This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". ${Qn(e)} @@ -45,31 +45,31 @@ ${Qn(e)} ${er(e)}`}function Wn(e){return`We would appreciate if you could take the time to share some information with us. Please help us by answering a few questions: https://pris.ly/${e}`}function Jn(e){let{errorStack:r}=e;return r?.match(/\/\.next|\/next@|\/next\//)?` -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function fl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} +We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function ml(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". ${Wn("engine-not-found-bundler-investigation")} -${er(e)}`}function gl(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${Xe(e)} +${er(e)}`}function fl(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${Xe(e)} This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". ${Qn(e)} -${er(e)}`}function hl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} +${er(e)}`}function gl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} This is likely caused by tooling that has not copied "${r}" to the deployment folder. Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". ${Wn("engine-not-found-tooling-investigation")} -${er(e)}`}var of=N("prisma:client:engines:resolveEnginePath"),sf=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function bl(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await af(e,r);if(of("enginePath",n),n!==void 0&&e==="binary"&&Ai(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(sf())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:El(e,o),expectedLocation:St.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=gl(c):l?p=ml(c):u?p=fl(c):p=hl(c),new T(p,r.clientVersion)}async function af(e,r){let t=await ir(),n=[],i=[r.dirname,St.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,St.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(gs());for(let o of i){let s=El(e,t),a=St.default.join(o,s);if(n.push(o),yl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function El(e,r){return e==="library"?Gt(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var mo=C(Li());function wl(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function xl(e){return e.split(` +${er(e)}`}var tf=N("prisma:client:engines:resolveEnginePath"),nf=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function yl(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await of(e,r);if(tf("enginePath",n),n!==void 0&&e==="binary"&&Ri(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(nf())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:bl(e,o),expectedLocation:Tt.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=fl(c):l?p=dl(c):u?p=ml(c):p=gl(c),new v(p,r.clientVersion)}async function of(e,r){let t=await ir(),n=[],i=[r.dirname,Tt.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,Tt.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(fs());for(let o of i){let s=bl(e,t),a=Tt.default.join(o,s);if(n.push(o),hl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function bl(e,r){return e==="library"?Ut(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var po=A(Ni());function El(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function wl(e){return e.split(` `).map(r=>r.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var vl=C(Fs());function Pl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,vl.default)({user:r,repo:t,template:n,title:e,body:i})}function Tl({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Go(6e3-(s?.length??0)),l=xl((0,mo.default)(a)),u=n?`# Description +`)}var xl=A(Ls());function Pl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,xl.default)({user:r,repo:t,template:n,title:e,body:i})}function vl({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Uo(6e3-(s?.length??0)),l=wl((0,po.default)(a)),u=n?`# Description \`\`\` ${n} -\`\`\``:"",c=(0,mo.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",c=(0,po.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -99,7 +99,7 @@ ${l} ## Prisma Engine Query \`\`\` -${s?wl(s):""} +${s?El(s):""} \`\`\` `),p=Pl({title:t,body:c});return`${t} @@ -110,28 +110,28 @@ ${Y(p)} If you want the Prisma team to look into it, please open the link above \u{1F64F} To increase the chance of success, please post your schema and a snippet of how you used Prisma Client in the issue. -`}var Sl="6.13.0";function Vr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var Hn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Hn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function A(e,r){return{...e,isRetryable:r}}var ur=class extends se{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,A(t,!1))}};x(ur,"InvalidDatasourceError");function Rl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=Vr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==sn)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=ki(i)?"http:":"https:",u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Al=C(on()),Kn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Al.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function uf(e){return e[0]*1e3+e[1]/1e6}function fo(e){return new Date(uf(e))}var Br=class extends se{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",A(r,!0))}};x(Br,"ForcedRetryError");var cr=class extends se{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,A(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends se{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",A(r,!0))}};x(pr,"SchemaMissingError");var go="This request could not be understood by the server",Rt=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||go,A(r,!1)),n&&(this.code=n)}};x(Rt,"BadRequestError");var At=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",A(r,!0)),this.logs=t}};x(At,"HealthcheckTimeoutError");var Ct=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,A(r,!0)),this.logs=n}};x(Ct,"EngineStartupError");var It=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",A(r,!1))}};x(It,"EngineVersionNotSupportedError");var ho="Request timed out",kt=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=ho){super(t,A(r,!1))}};x(kt,"GatewayTimeoutError");var cf="Interactive transaction error",Dt=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=cf){super(t,A(r,!1))}};x(Dt,"InteractiveTransactionError");var pf="Request parameters are invalid",Ot=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=pf){super(t,A(r,!1))}};x(Ot,"InvalidRequestError");var yo="Requested resource does not exist",_t=class extends ${name="NotFoundError";code="P5003";constructor(r,t=yo){super(t,A(r,!1))}};x(_t,"NotFoundError");var bo="Unknown server error",Ur=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||bo,A(r,!0)),this.logs=n}};x(Ur,"ServerError");var Eo="Unauthorized, check your connection string",Nt=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=Eo){super(t,A(r,!1))}};x(Nt,"UnauthorizedError");var wo="Usage exceeded, retry again later",Lt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=wo){super(t,A(r,!0))}};x(Lt,"UsageExceededError");async function df(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Ft(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await df(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ur(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new It(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ct(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new At(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ot(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Nt(t,Gr(Eo,n));if(e.status===404)return new _t(t,Gr(yo,n));if(e.status===429)throw new Lt(t,Gr(wo,n));if(e.status===504)throw new kt(t,Gr(ho,n));if(e.status>=500)throw new Ur(t,Gr(bo,n));if(e.status>=400)throw new Rt(t,Gr(go,n))}function Gr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Cl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Il(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function kl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}var Dl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Mt=class extends se{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: -${r}`,A(t,!0))}};x(Mt,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Mt(a,{clientVersion:n,cause:s})}}var ff=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ol=N("prisma:client:dataproxyEngine");async function gf(e,r){let t=Dl["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&ff.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=hf(`<=${a}.${l}.${u}`),p=await dr(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Ol("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function _l(e,r){let t=await gf(e,r);return Ol("version",t),t}function hf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nl=3,$t=N("prisma:client:dataproxyEngine"),qt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){kl(r),this.config=r,this.env=r.env,this.inlineSchema=Il(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Kn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await _l(this.host,this.config),$t("host",this.host),$t("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":$t(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:fo(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:fo(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||$t("schema response status",t.status);let n=await Ft(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=$r(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||$t("graphql response status",a.status),await this.handleError(await Ft(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Ft(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Ft(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return Rl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=Nl)throw i instanceof Br?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Nl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new Br({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?qr(r[0],this.config.clientVersion,this.config.activeProvider):new j(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ll(e){if(e?.kind==="itx")return e.options.id}var vo=C(require("node:os")),Fl=C(require("node:path"));var xo=Symbol("PrismaLibraryEngineCache");function yf(){let e=globalThis;return e[xo]===void 0&&(e[xo]={}),e[xo]}function bf(e){let r=yf();if(r[e]!==void 0)return r[e];let t=Fl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=vo.default.constants.dlopen.RTLD_LAZY|vo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ml={async loadLibrary(e){let r=await gi(),t=await bl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>bf(t))}catch(n){let i=Ci({e:n,platformInfo:r,id:t});throw new T(i,e.clientVersion)}}};var Po,$l={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new T(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`,r);if(n===void 0)throw new T("WASM engine was unexpectedly `undefined`",r);Po===void 0&&(Po=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new T("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Po;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ef="P2036",Ae=N("prisma:client:libraryEngine");function wf(e){return e.item_type==="query"&&"query"in e}function xf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ql=[...ui,"native"],vf=0xffffffffffffffffn,To=1n;function Pf(){let e=To++;return To>vf&&(To=1n),e}var Qr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??Ml,r.engineWasm!==void 0&&(this.libraryLoader=t??$l),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=Pf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Tf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new j(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Ae("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;li(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!ql.includes(r))throw new T(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(", "))} or a path to the query engine library. -You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new j("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new j("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn));let t=await this.adapterPromise;t&&Ae("Using driver adapter: %O",t),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",wf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):xf(t)?this.loggerRustPanic=new le(So(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ae(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Ae("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn)),await this.adapterPromise,Ae("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ae("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Ae("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Ae("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Ae(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new j(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof T)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(So(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new j(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Ae("requestBatch");let i=$r(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ll(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new j(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new le(So(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:qr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===Ef&&t){let n=r.meta?.id;ln(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return ln(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function Tf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function So(e,r){return Tl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function jl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let S=g.join(` -`);o.push({_tag:"error",value:S})},l=!!e?.startsWith("prisma://"),u=an(e),c=!!r,p=l||u;!c&&t&&p&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!t;c&&(d||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):t?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let f={accelerate:d,ppg:u,driverAdapters:c};function h(g){return g.length>0}return h(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function Vl({copyEngine:e=!0},r){let t;try{t=Vr({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=jl({url:t,adapter:r.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)at(...p.value);if(!n){let p=o.errors[0];throw new Z(p.value,{clientVersion:r.clientVersion})}let s=Er(r.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new qt(r):(i.driverAdapters,a?new Qr(r):(i.accelerate,new Qr(r)))}function Yn({generator:e}){return e?.previewFeatures??[]}var Bl=e=>({command:e});var Ul=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Wr(e){try{return Gl(e,"fast")}catch{return Gl(e,"slow")}}function Gl(e,r){return JSON.stringify(e.map(t=>Wl(t,r)))}function Wl(e,r){if(Array.isArray(e))return e.map(t=>Wl(t,r));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Sr(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Sf(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,n,i).toString("base64")}}return typeof e=="object"&&r==="slow"?Jl(e):e}function Sf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Jl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ql);let r={};for(let t of Object.keys(e))r[t]=Ql(e[t]);return r}function Ql(e){return typeof e=="bigint"?e.toString():Jl(e)}var Rf=/^(\s*alter\s)/i,Hl=N("prisma:client");function Ro(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Rf.exec(r))throw new Error(`Running ALTER using ${n} is not supported +`}function Tl(e,r){throw new Error(r)}function sf(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function af(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function qr(e){return e===null?e:Array.isArray(e)?e.map(qr):typeof e=="object"?sf(e)?lf(e):e.constructor!==null&&e.constructor.name!=="Object"?e:af(e,qr):e}function lf({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"DateTime":return new Date(r);case"Decimal":return new Le(r);case"Json":return JSON.parse(r);default:Tl(r,"Unknown tagged value")}}var Sl="6.14.0";function Vr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new v(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new v("error: Missing URL environment variable, value, or override.",n);return i}var Kn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Kn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var ur=class extends se{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(ur,"InvalidDatasourceError");function Rl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=Vr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==on)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=Ii(i)?"http:":"https:",u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Al=A(nn()),Hn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Al.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function cf(e){return e[0]*1e3+e[1]/1e6}function mo(e){return new Date(cf(e))}var jr=class extends se{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(jr,"ForcedRetryError");var cr=class extends se{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends se{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(pr,"SchemaMissingError");var fo="This request could not be understood by the server",St=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||fo,R(r,!1)),n&&(this.code=n)}};x(St,"BadRequestError");var Rt=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(Rt,"HealthcheckTimeoutError");var At=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(At,"EngineStartupError");var Ct=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(Ct,"EngineVersionNotSupportedError");var go="Request timed out",It=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=go){super(t,R(r,!1))}};x(It,"GatewayTimeoutError");var pf="Interactive transaction error",Dt=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=pf){super(t,R(r,!1))}};x(Dt,"InteractiveTransactionError");var df="Request parameters are invalid",Ot=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=df){super(t,R(r,!1))}};x(Ot,"InvalidRequestError");var ho="Requested resource does not exist",kt=class extends ${name="NotFoundError";code="P5003";constructor(r,t=ho){super(t,R(r,!1))}};x(kt,"NotFoundError");var yo="Unknown server error",Br=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||yo,R(r,!0)),this.logs=n}};x(Br,"ServerError");var bo="Unauthorized, check your connection string",_t=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=bo){super(t,R(r,!1))}};x(_t,"UnauthorizedError");var Eo="Usage exceeded, retry again later",Nt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=Eo){super(t,R(r,!0))}};x(Nt,"UsageExceededError");async function mf(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Lt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await mf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Br(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ct(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new At(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new v(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Rt(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ot(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new _t(t,Ur(bo,n));if(e.status===404)return new kt(t,Ur(ho,n));if(e.status===429)throw new Nt(t,Ur(Eo,n));if(e.status===504)throw new It(t,Ur(go,n));if(e.status>=500)throw new Br(t,Ur(yo,n));if(e.status>=400)throw new St(t,Ur(fo,n))}function Ur(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Cl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Il(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function Dl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new v("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}var Ol={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Ft=class extends se{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: +${r}`,R(t,!0))}};x(Ft,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Ft(a,{clientVersion:n,cause:s})}}var gf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,kl=N("prisma:client:dataproxyEngine");async function hf(e,r){let t=Ol["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&gf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=yf(`<=${a}.${l}.${u}`),p=await dr(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();kl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function _l(e,r){let t=await hf(e,r);return kl("version",t),t}function yf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nl=3,Mt=N("prisma:client:dataproxyEngine"),$t=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){Dl(r),this.config=r,this.env=r.env,this.inlineSchema=Il(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Hn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await _l(this.host,this.config),Mt("host",this.host),Mt("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":Mt(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:mo(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:mo(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Mt("schema response status",t.status);let n=await Lt(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Fr(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||Mt("graphql response status",a.status),await this.handleError(await Lt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Lt(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Lt(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return Rl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=Nl)throw i instanceof jr?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Nl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new jr({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?Mr(r[0],this.config.clientVersion,this.config.activeProvider):new V(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ll(e){if(e?.kind==="itx")return e.options.id}var xo=A(require("node:os")),Fl=A(require("node:path"));var wo=Symbol("PrismaLibraryEngineCache");function bf(){let e=globalThis;return e[wo]===void 0&&(e[wo]={}),e[wo]}function Ef(e){let r=bf();if(r[e]!==void 0)return r[e];let t=Fl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=xo.default.constants.dlopen.RTLD_LAZY|xo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ml={async loadLibrary(e){let r=await fi(),t=await yl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>Ef(t))}catch(n){let i=Ai({e:n,platformInfo:r,id:t});throw new v(i,e.clientVersion)}}};var Po,$l={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new v(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`,r);if(n===void 0)throw new v("WASM engine was unexpectedly `undefined`",r);Po===void 0&&(Po=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new v("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Po;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var wf="P2036",Re=N("prisma:client:libraryEngine");function xf(e){return e.item_type==="query"&&"query"in e}function Pf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ql=[...li,"native"],vf=0xffffffffffffffffn,vo=1n;function Tf(){let e=vo++;return vo>vf&&(vo=1n),e}var Gr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??Ml,r.engineWasm!==void 0&&(this.libraryLoader=t??$l),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=Tf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Sf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new V(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;ai(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!ql.includes(r))throw new v(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(", "))} or a path to the query engine library. +You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new V("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new V("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn));let t=await this.adapterPromise;t&&Re("Using driver adapter: %O",t),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new v(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",xf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):Pf(t)?this.loggerRustPanic=new le(To(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn)),await this.adapterPromise,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new v(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Re("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof v)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(To(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new V(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Fr(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ll(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new le(To(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:Mr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===wf&&t){let n=r.meta?.id;an(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return an(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function Sf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function To(e,r){return vl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Vl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let D=g.join(` +`);o.push({_tag:"error",value:D})},l=!!e?.startsWith("prisma://"),u=sn(e),c=!!r,p=l||u;!c&&t&&p&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!t;c&&(d||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):t?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let f={accelerate:d,ppg:u,driverAdapters:c};function h(g){return g.length>0}return h(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function jl({copyEngine:e=!0},r){let t;try{t=Vr({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Vl({url:t,adapter:r.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)st(...p.value);if(!n){let p=o.errors[0];throw new Z(p.value,{clientVersion:r.clientVersion})}let s=Er(r.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new $t(r):(i.driverAdapters,a?new Gr(r):(i.accelerate,new Gr(r)))}function Yn({generator:e}){return e?.previewFeatures??[]}var Bl=e=>({command:e});var Ul=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Qr(e){try{return Gl(e,"fast")}catch{return Gl(e,"slow")}}function Gl(e,r){return JSON.stringify(e.map(t=>Wl(t,r)))}function Wl(e,r){if(Array.isArray(e))return e.map(t=>Wl(t,r));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(xr(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rf(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,n,i).toString("base64")}}return typeof e=="object"&&r==="slow"?Jl(e):e}function Rf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Jl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ql);let r={};for(let t of Object.keys(e))r[t]=Ql(e[t]);return r}function Ql(e){return typeof e=="bigint"?e.toString():Jl(e)}var Af=/^(\s*alter\s)/i,Kl=N("prisma:client");function So(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Af.exec(r))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var Ao=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(qn(t))n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Wr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ul(t),i={values:Wr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Hl(`prisma.${e}(${n}, ${i.values})`):Hl(`prisma.${e}(${n})`),{query:n,parameters:i}},Kl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},Yl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Co(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=zl(t(s)):zl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function zl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Af=vi.split(".")[0],Cf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Io=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Af}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??Cf}};function Zl(){return new Io}function Xl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function eu(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var zn=class{_middlewares=[];use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var tu=C(Li());function Zn(e){return typeof e.batchRequestIdx=="number"}function ru(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(ko(e.query.arguments)),r.push(ko(e.query.selection)),r.join("")}function ko(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${ko(n)})`:t}).join(" ")})`}var If={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Do(e){return If[e]}var Xn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function ei(e){let r=[],t=kf(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Do(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Of(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?nu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Do(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ru(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Df(r),_f(r,i))throw r;if(r instanceof z&&Nf(r)){let u=iu(r.meta);_n({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=Pn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(l,this.client._clientVersion);if(r instanceof j)throw new j(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof T)throw new T(l,this.client._clientVersion);if(r instanceof le)throw new le(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,tu.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=lo(o,s),l=i==="queryRaw"?ei(a):Tr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Of(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:nu(e)};Ne(e,"Unknown transaction kind")}}function nu(e){return{id:e.id,payload:e.payload}}function _f(e,r){return Zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Nf(e){return e.code==="P2009"||e.code==="P2012"}function iu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(iu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ou=Sl;var cu=C(Ki());var O=class extends Error{constructor(r){super(r+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(O,"PrismaClientConstructorValidationError");var su=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],au=["pretty","colorless","minimal"],lu=["info","query","warn","error"],Lf={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new O(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Jr(t,r)||` Available datasources: ${r.join(", ")}`;throw new O(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new O(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(!e&&Er(r.generator)==="client")throw new O('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new O('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Yn(r).includes("driverAdapters"))throw new O('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Er(r.generator)==="binary")throw new O('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new O(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new O(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!au.includes(e)){let r=Jr(e,au);throw new O(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new O(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!lu.includes(t)){let n=Jr(t,lu);throw new O(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Jr(i,o);throw new O(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new O(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new O(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new O(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,r)=>{if(typeof e!="object")throw new O('"omit" option is expected to be an object.');if(e===null)throw new O('"omit" option can not be `null`');let t=[];for(let[n,i]of Object.entries(e)){let o=Mf(n,r.runtimeDataModel);if(!o){t.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){t.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){t.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(t.length>0)throw new O($f(e,t))},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new O(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Jr(t,r);throw new O(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function pu(e,r){for(let[t,n]of Object.entries(e)){if(!su.includes(t)){let i=Jr(t,su);throw new O(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}Lf[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new O('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jr(e,r){if(r.length===0||typeof e!="string")return"";let t=Ff(e,r);return t?` Did you mean "${t}"?`:""}function Ff(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,cu.default)(e,i)}));t.sort((i,o)=>i.distanceYe(n)===r);if(t)return e[t]}function $f(e,r){let t=Nr(e);for(let o of r)switch(o.kind){case"UnknownModel":t.arguments.getField(o.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=On(t,"colorless");return`Error validating "omit" option: +`)}var Ro=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(qn(t))n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Qr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ul(t),i={values:Qr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Kl(`prisma.${e}(${n}, ${i.values})`):Kl(`prisma.${e}(${n})`),{query:n,parameters:i}},Hl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},Yl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Ao(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=zl(t(s)):zl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function zl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Cf=xi.split(".")[0],If={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Co=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Cf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??If}};function Zl(){return new Co}function Xl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function eu(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var tu=A(Ni());function zn(e){return typeof e.batchRequestIdx=="number"}function ru(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(Io(e.query.arguments)),r.push(Io(e.query.selection)),r.join("")}function Io(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${Io(n)})`:t}).join(" ")})`}var Df={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Do(e){return Df[e]}var Zn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function Xn(e){let r=[],t=Of(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Do(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:_f(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?nu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Do(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ru(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(kf(r),Nf(r,i))throw r;if(r instanceof z&&Lf(r)){let u=iu(r.meta);_n({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=vn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(l,this.client._clientVersion);if(r instanceof V)throw new V(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof v)throw new v(l,this.client._clientVersion);if(r instanceof le)throw new le(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,tu.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=ao(o,s),l=i==="queryRaw"?Xn(a):qr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function _f(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:nu(e)};ar(e,"Unknown transaction kind")}}function nu(e){return{id:e.id,payload:e.payload}}function Nf(e,r){return zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Lf(e){return e.code==="P2009"||e.code==="P2012"}function iu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(iu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ou=Sl;var cu=A(Ki());var k=class extends Error{constructor(r){super(r+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(k,"PrismaClientConstructorValidationError");var su=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],au=["pretty","colorless","minimal"],lu=["info","query","warn","error"],Ff={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new k(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Wr(t,r)||` Available datasources: ${r.join(", ")}`;throw new k(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new k(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(!e&&Er(r.generator)==="client")throw new k('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new k('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Yn(r).includes("driverAdapters"))throw new k('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Er(r.generator)==="binary")throw new k('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new k(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new k(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!au.includes(e)){let r=Wr(e,au);throw new k(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new k(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!lu.includes(t)){let n=Wr(t,lu);throw new k(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Wr(i,o);throw new k(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new k(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new k(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new k(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,r)=>{if(typeof e!="object")throw new k('"omit" option is expected to be an object.');if(e===null)throw new k('"omit" option can not be `null`');let t=[];for(let[n,i]of Object.entries(e)){let o=$f(n,r.runtimeDataModel);if(!o){t.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){t.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){t.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(t.length>0)throw new k(qf(e,t))},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new k(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Wr(t,r);throw new k(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function pu(e,r){for(let[t,n]of Object.entries(e)){if(!su.includes(t)){let i=Wr(t,su);throw new k(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}Ff[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new k('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Wr(e,r){if(r.length===0||typeof e!="string")return"";let t=Mf(e,r);return t?` Did you mean "${t}"?`:""}function Mf(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,cu.default)(e,i)}));t.sort((i,o)=>i.distanceWe(n)===r);if(t)return e[t]}function qf(e,r){let t=kr(e);for(let o of r)switch(o.kind){case"UnknownModel":t.arguments.getField(o.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=kn(t,"colorless");return`Error validating "omit" option: ${i} -${n}`}function du(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jf=Symbol.for("prisma.client.transaction.id"),Vf={id:0,nextId(){return++this.id}};function bu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new zn;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Co();constructor(n){e=n?.__internal?.configOverride?.(e)??e,pl(e),n&&pu(n,e);let i=new hu.EventEmitter().on("error",()=>{});this._extensions=Lr.empty(),this._previewFeatures=Yn(e),this._clientVersion=e.clientVersion??ou,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Zl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ti.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ti.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new T(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new T("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&o&&st(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ti.default.resolve(e.dirname,e.relativePath);yu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&eu(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:dl(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Vr,getBatchRequestPayload:$r,prismaGraphQLToJSError:qr,PrismaClientUnknownRequestError:j,PrismaClientInitializationError:T,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:fu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=Vl(e,this._engineConfig),this._requestHandler=new ri(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{nt.log(`${nt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Qo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ao({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=mu(n,i);return Ro(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Ro(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Bl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ao({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...mu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Vf.nextId(),s=Xl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return du(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return he(Pt(he(Ya(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Co(n)),re(jf,()=>n.id)])),[Mr(rl)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??qf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,S=>c(u,P=>(S?.end(),l(P))));let{runInTransaction:p,args:d,...f}=u,h={...n,...f};d&&(h.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete h.transaction;let g=await ol(this,h);return h.model?el({result:g,modelName:h.model,args:h.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):g};return this._tracingHelper.runInChildSpan(s.operation,()=>new gu.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>Mn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${qa(n)})`),rr("Generated request:"),rr(JSON.stringify(g,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(h){throw h.clientVersion=this._clientVersion,h}}$metrics=new Fr(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=za}return r}function mu(e,r){return Bf(e)?[new oe(e,r),Kl]:[e,Yl]}function Bf(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Uf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eu(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!Uf.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function wu(e){st(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}function du(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jf=Symbol.for("prisma.client.transaction.id"),Bf={id:0,nextId(){return++this.id}};function bu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Ao();constructor(n){e=n?.__internal?.configOverride?.(e)??e,cl(e),n&&pu(n,e);let i=new hu.EventEmitter().on("error",()=>{});this._extensions=_r.empty(),this._previewFeatures=Yn(e),this._clientVersion=e.clientVersion??ou,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Zl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new v(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new v("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&o&&ot(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ri.default.resolve(e.dirname,e.relativePath);yu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&eu(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:pl(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Vr,getBatchRequestPayload:Fr,prismaGraphQLToJSError:Mr,PrismaClientUnknownRequestError:V,PrismaClientInitializationError:v,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:fu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=jl(e,this._engineConfig),this._requestHandler=new ei(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{tt.log(`${tt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Go()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ro({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=mu(n,i);return So(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(So(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Bl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ro({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...mu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Bf.nextId(),s=Xl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return du(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return he(Pt(he(Ha(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Ao(n)),re(jf,()=>n.id)])),[Lr(el)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Vf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:c,...p}=l,d={...n,...p};c&&(d.args=i.middlewareArgsToRequestArgs(c)),n.transaction!==void 0&&u===!1&&delete d.transaction;let f=await il(this,d);return d.model?Xa({result:f,modelName:d.model,args:d.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):f};return this._tracingHelper.runInChildSpan(s.operation,()=>new gu.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>Mn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${$a(n)})`),rr("Generated request:"),rr(JSON.stringify(g,null,2)+` +`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(h){throw h.clientVersion=this._clientVersion,h}}$metrics=new Nr(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Ya}return r}function mu(e,r){return Uf(e)?[new oe(e,r),Hl]:[e,Yl]}function Uf(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Gf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eu(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!Gf.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function wu(e){ot(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); /*! Bundled license information: decimal.js/decimal.mjs: diff --git a/src/generated/prisma/runtime/react-native.js b/src/generated/prisma/runtime/react-native.js index 49a0900..2ea2773 100644 --- a/src/generated/prisma/runtime/react-native.js +++ b/src/generated/prisma/runtime/react-native.js @@ -1,25 +1,25 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var Ea=Object.create;var rr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},oi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Ea(va(e)):{},oi(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),Ca=e=>oi(rr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,m=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var Ti=Se(nt=>{"use strict";f();c();p();d();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Aa=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=S);var _=I===S?0:4-I%4;return[I,_]}function l(A){var S=a(A),I=S[0],_=S[1];return(I+_)*3/4-_}function u(A,S,I){return(S+I)*3/4-I}function g(A){var S,I=a(A),_=I[0],D=I[1],O=new n(u(A,_,D)),q=0,Y=D>0?_-4:_,U;for(U=0;U>16&255,O[q++]=S>>8&255,O[q++]=S&255;return D===2&&(S=r[A.charCodeAt(U)]<<2|r[A.charCodeAt(U+1)]>>4,O[q++]=S&255),D===1&&(S=r[A.charCodeAt(U)]<<10|r[A.charCodeAt(U+1)]<<4|r[A.charCodeAt(U+2)]>>2,O[q++]=S>>8&255,O[q++]=S&255),O}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function T(A,S,I){for(var _,D=[],O=S;OY?Y:q+O));return _===1?(S=A[I-1],D.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(A[I-2]<<8)+A[I-1],D.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),D.join("")}}),Sa=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,A=t[r+T];for(T+=k,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,S=i?1:-1,I=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+T>=1?r+=k/u:r+=k*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=S,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=S,a/=256,g-=8);t[n+A-S]|=I*128}}),en=Aa(),tt=Sa(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=C;nt.SlowBuffer=Ma;nt.INSPECT_MAX_BYTES=50;var nr=2147483647;nt.kMaxLength=nr;C.TYPED_ARRAY_SUPPORT=Ra();!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ra(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function ke(e){if(e>nr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}function C(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return nn(e)}return pi(e,t,r)}C.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return Oa(e,t);if(ArrayBuffer.isView(e))return Ia(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return C.from(n,t,r);let i=Fa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}C.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function di(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ka(e,t,r){return di(e),e<=0?ke(e):t!==void 0?typeof r=="string"?ke(e).fill(t,r):ke(e).fill(t):ke(e)}C.alloc=function(e,t,r){return ka(e,t,r)};function nn(e){return di(e),ke(e<0?0:on(e)|0)}C.allocUnsafe=function(e){return nn(e)};C.allocUnsafeSlow=function(e){return nn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=ke(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function tn(e){let t=e.length<0?0:on(e.length)|0,r=ke(t);for(let n=0;n=nr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+nr.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),C.alloc(+e)}C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(C.isBuffer(o)||(o=C.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(C.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(C.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return rn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:rn(e).length;t=(""+t).toLowerCase(),i=!0}}C.byteLength=fi;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qa(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Ua(this,t,r);case"latin1":case"binary":return Va(this,t,r);case"base64":return Ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ga(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}C.prototype._isBuffer=!0;function Ge(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}C.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(C.prototype[si]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,an(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return La(this,e,t,r);case"utf8":case"utf-8":return Da(this,e,t,r);case"ascii":case"latin1":case"binary":return Na(this,e,t,r);case"base64":return qa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ba(e,t,r){return t===0&&r===e.length?en.fromByteArray(e):en.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return ja(n)}var li=4096;function ja(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=De(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};C.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=De(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};C.prototype.writeUint8=C.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}C.prototype.writeBigUInt64LE=De(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=De(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};C.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};C.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};C.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};C.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};C.prototype.writeBigInt64LE=De(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=De(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function bi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||bi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}C.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||bi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}C.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ja(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&At(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new et.ERR_OUT_OF_RANGE("value",a,e)}Ja(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function At(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Wa=/[^+/0-9A-Za-z-_]/g;function Ka(e){if(e=e.split("=")[0],e=e.trim().replace(Wa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function rn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ha(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return en.toByteArray(Ka(e))}function ir(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function an(e){return e!==e}var Ya=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function De(e){return typeof BigInt>"u"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,f=he(()=>{"use strict";w=Re(Ti())});function El(){return!1}function dn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xl(){return dn()}function Pl(){return[]}function vl(e){e(null,[])}function Tl(){return""}function Cl(){return""}function Al(){}function Sl(){}function Rl(){}function kl(){}function Ol(){}function Il(){}function Fl(){}function Ml(){}function _l(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ll(e,t){t(null,dn())}var Dl,Nl,sr,mn=he(()=>{"use strict";f();c();p();d();m();Dl={},Nl={existsSync:El,lstatSync:dn,stat:Ll,statSync:xl,readdirSync:Pl,readdir:vl,readlinkSync:Tl,realpathSync:Cl,chmodSync:Al,renameSync:Sl,mkdirSync:Rl,rmdirSync:kl,rmSync:Ol,unlinkSync:Il,watchFile:Fl,unwatchFile:Ml,watch:_l,promises:Dl},sr=Nl});function ql(...e){return e.join("/")}function $l(...e){return e.join("/")}function Bl(e){let t=Ni(e),r=qi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ni(e){let t=e.split("/");return t[t.length-1]}function qi(e){return e.split("/").slice(0,-1).join("/")}function Ul(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var $i,jl,Vl,Ql,Ie,gn=he(()=>{"use strict";f();c();p();d();m();$i="/",jl=":";Vl={sep:$i},Ql={basename:Ni,delimiter:jl,dirname:qi,join:$l,normalize:Ul,parse:Bl,posix:Vl,resolve:ql,sep:$i},Ie=Ql});var Bi=Se(($m,Gl)=>{Gl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Vi=Se((qf,Ui)=>{"use strict";f();c();p();d();m();Ui.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ki=Se((rg,Wi)=>{"use strict";f();c();p();d();m();Wi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Se((fg,zi)=>{"use strict";f();c();p();d();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Pn=Se((Eg,Zi)=>{"use strict";f();c();p();d();m();var tu=Yi();Zi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var Xi=Se((Gg,cr)=>{"use strict";f();c();p();d();m();cr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};cr.exports.default=cr.exports});var Fn=Se((g0,vo)=>{"use strict";f();c();p();d();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();c();p();d();m()});var ko=he(()=>{"use strict";f();c();p();d();m()});var Xo=Se(($v,Wc)=>{Wc.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $r,es=he(()=>{"use strict";f();c();p();d();m();$r=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var cd={};Xe(cd,{DMMF:()=>$t,Debug:()=>H,Decimal:()=>Ee,Extensions:()=>ln,MetricsClient:()=>Et,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>te,Public:()=>un,Sql:()=>le,createParam:()=>Go,defineDmmfProperty:()=>Yo,deserializeJsonResponse:()=>lt,deserializeRawResult:()=>Yr,dmmfToRuntimeDataModel:()=>wo,empty:()=>rs,getPrismaClient:()=>ya,getRuntime:()=>Ms,join:()=>ts,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Zo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Dr,skip:()=>Lr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Dt});module.exports=Ca(cd);f();c();p();d();m();var ln={};Xe(ln,{defineExtension:()=>Ci,getExtensionContext:()=>Ai});f();c();p();d();m();f();c();p();d();m();function Ci(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function Ai(e){return e}var un={};Xe(un,{validator:()=>Si});f();c();p();d();m();f();c();p();d();m();function Si(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();var or={};Xe(or,{$:()=>Fi,bgBlack:()=>ll,bgBlue:()=>dl,bgCyan:()=>fl,bgGreen:()=>cl,bgMagenta:()=>ml,bgRed:()=>ul,bgWhite:()=>gl,bgYellow:()=>pl,black:()=>il,blue:()=>We,bold:()=>de,cyan:()=>Oe,dim:()=>St,gray:()=>It,green:()=>kt,grey:()=>al,hidden:()=>rl,inverse:()=>tl,italic:()=>el,magenta:()=>ol,red:()=>Je,reset:()=>Xa,strikethrough:()=>nl,underline:()=>Rt,white:()=>sl,yellow:()=>Ot});f();c();p();d();m();var cn,Ri,ki,Oi,Ii=!0;typeof y<"u"&&({FORCE_COLOR:cn,NODE_DISABLE_COLORS:Ri,NO_COLOR:ki,TERM:Oi}=y.env||{},Ii=y.stdout&&y.stdout.isTTY);var Fi={enabled:!Ri&&ki==null&&Oi!=="dumb"&&(cn!=null&&cn!=="0"||Ii)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xa=V(0,0),de=V(1,22),St=V(2,22),el=V(3,23),Rt=V(4,24),tl=V(7,27),rl=V(8,28),nl=V(9,29),il=V(30,39),Je=V(31,39),kt=V(32,39),Ot=V(33,39),We=V(34,39),ol=V(35,39),Oe=V(36,39),sl=V(37,39),It=V(90,39),al=V(90,39),ll=V(40,49),ul=V(41,49),cl=V(42,49),pl=V(43,49),dl=V(44,49),ml=V(45,49),fl=V(46,49),gl=V(47,49);f();c();p();d();m();var hl=100,Mi=["green","yellow","blue","magenta","cyan","red"],Ft=[],_i=Date.now(),yl=0,pn=typeof y<"u"?y.env:{};globalThis.DEBUG??=pn.DEBUG??"";globalThis.DEBUG_COLORS??=pn.DEBUG_COLORS?pn.DEBUG_COLORS==="true":!0;var Mt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function wl(e){let t={color:Mi[yl++%Mi.length],enabled:Mt.enabled(e),namespace:e,log:Mt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Ft.push([o,...n]),Ft.length>hl&&Ft.shift(),Mt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:bl(g)),u=`+${Date.now()-_i}ms`;_i=Date.now(),globalThis.DEBUG_COLORS?a(or[s](de(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var H=new Proxy(wl,{get:(e,t)=>Mt[t],set:(e,t,r)=>Mt[t]=r});function bl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Li(e=7500){let t=Ft.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Fe(t,e.queryRaw.bind(e)),executeRaw:Fe(t,e.executeRaw.bind(e)),executeScript:Fe(t,e.executeScript.bind(e)),dispose:Fe(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Fe(t,e.startTransaction.bind(e))(...n)).map(o=>Hl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=zl(t,e.getConnectionInfo.bind(e))),r},Hl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Fe(e,t.queryRaw.bind(t)),executeRaw:Fe(e,t.executeRaw.bind(t)),commit:Fe(e,t.commit.bind(t)),rollback:Fe(e,t.rollback.bind(t))});function Fe(e,t){return async(...r)=>{try{return ar(await t(...r))}catch(n){if(ji("[error@wrapAsync]",n),yn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function zl(e,t){return(...r)=>{try{return ar(t(...r))}catch(n){if(ji("[error@wrapSync]",n),yn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}f();c();p();d();m();var Qi=Re(Vi(),1);function bn(e){let t=(0,Qi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}f();c();p();d();m();var Gi="prisma+postgres",Ji=`${Gi}:`;function En(e){return e?.toString().startsWith(`${Ji}//`)??!1}var Lt={};Xe(Lt,{error:()=>Xl,info:()=>Zl,log:()=>Yl,query:()=>eu,should:()=>Hi,tags:()=>_t,warn:()=>xn});f();c();p();d();m();var _t={error:Je("prisma:error"),warn:Ot("prisma:warn"),info:Oe("prisma:info"),query:We("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Yl(...e){console.log(...e)}function xn(e,...t){Hi.warn()&&console.warn(`${_t.warn} ${e}`,...t)}function Zl(e,...t){console.info(`${_t.info} ${e}`,...t)}function Xl(e,...t){console.error(`${_t.error} ${e}`,...t)}function eu(e,...t){console.log(`${_t.query} ${e}`,...t)}f();c();p();d();m();function ur(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}f();c();p();d();m();function Me(e,t){throw new Error(t)}f();c();p();d();m();gn();function vn(e){return Ie.sep===Ie.posix.sep?e:e.split(Ie.sep).join(Ie.posix.sep)}f();c();p();d();m();function Tn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function Cn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),xn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");f();c();p();d();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};ue(se,"PrismaClientKnownRequestError");f();c();p();d();m();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");f();c();p();d();m();var J=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};ue(J,"PrismaClientUnknownRequestError");f();c();p();d();m();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var st=9e15,Be=1e9,An="0123456789abcdef",mr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",fr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},oo,_e,L=!0,hr="[DecimalError] ",$e=hr+"Invalid argument: ",so=hr+"Precision limit exceeded",ao=hr+"crypto unavailable",lo="[object Decimal]",re=Math.floor,W=Math.pow,ru=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,iu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,me=1e7,M=7,ou=9007199254740991,su=mr.length-1,Rn=fr.length-1,R={toStringTag:lo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};R.ceil=function(){return F(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error($e+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=au(n,go(n,r)),n.precision=e,n.rounding=t,F(_e==2||_e==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(L=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=j(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(F(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return L=!0,F(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return j(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return F(j(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return F(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/wr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return F(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=at(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/wr(5,e)),i=at(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,F(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,j(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?we(t,n,i):new t(0):new t(NaN):e.isZero()?we(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,L=!1,r=r.times(r).minus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,L=!1,r=r.times(r).plus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?F(new o(i),e,t,!0):(o.precision=r=n-i.e,i=j(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=we(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=we(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=we(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(L=!1,t=Math.ceil(a/M),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(L=!1,a=h+k,s=qe(u,a),n=t?gr(g,a+10):qe(e,a),l=j(s,n,a,1),Nt(l.d,i=h,T))do if(a+=10,s=qe(u,a),n=t?gr(g,a+10):qe(e,a),l=j(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=F(l,h+1,0));break}while(Nt(l.d,i+=10,T));return L=!0,F(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.constructor;if(e=new A(e),!k.d||!e.d)return!k.s||!e.s?e=new A(NaN):k.d?e.s=-e.s:e=new A(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(u=k.d,T=e.d,a=A.precision,l=A.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new A(k);else return new A(l===3?-0:0);return L?F(e,a,l):e}if(r=re(e.e/M),g=re(k.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=T.length,h=n0;--n)u[s++]=0;for(n=T.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/me|0,u[i]%=me;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=yr(u,n),L?F(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($e+e);return r.d?(t=co(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=uu(n,go(n,r)),n.precision=e,n.rounding=t,F(_e>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(L=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(j(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(F(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,l+1,1),e=!n.times(n).eq(s));break}return L=!0,F(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=j(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(_e==2||_e==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%me|0,t=a/me|0;o[i]=(o[i]+t)%me|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=yr(o,r),L?F(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return On(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),F(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=F(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=F(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.d,S=k.constructor;if(!A)return new S(k);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=co(A)-k.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(L=!1,a=new S(Z(A)),g=S.precision,S.precision=o=A.length*M*2;h=j(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=j(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=k.s,T=j(u,n,o,1).minus(k).abs().cmp(j(l,r,o,1).minus(k).abs())<1?[u,n]:[l,r],S.precision=g,L=!0,T};R.toHexadecimal=R.toHex=function(e,t){return On(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(L=!1,r=j(r,e,0,t,1).times(e),L=!0,F(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return On(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return F(a,n,o);if(t=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=ou)return i=po(l,a,r,n),e.s<0?new l(1).div(i):F(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(L=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=kn(e.times(qe(a,n+r)),n),i.d&&(i=F(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=F(kn(e.times(qe(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=F(i,n+1,0)))),i.s=s,L=!0,l.rounding=o,F(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=F(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),F(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return F(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error($e+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function pr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function au(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/wr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=at(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var j=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,k,A,S,I,_,D,O,q,Y,U,Ct,G,ie,Ae,X,Ze,tr=n.constructor,Xr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new tr(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Xr*0:Xr/0);for(l?(k=1,g=n.e-i.e):(l=me,k=M,g=re(n.e/k)-re(i.e/k)),X=B.length,ie=ee.length,_=new tr(Xr),D=_.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?(U=o=tr.precision,s=tr.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)D.push(1),A=!0;else{if(U=U/k+2|0,h=0,X==1){for(T=0,B=B[0],U++;(h1&&(B=e(B,T,l),ee=e(ee,T,l),X=B.length,ie=ee.length),G=X,O=ee.slice(0,X),q=O.length;q=l/2&&++Ae;do T=0,u=t(B,O,X,q),u<0?(Y=O[0],X!=q&&(Y=Y*l+(O[1]||0)),T=Y/Ae|0,T>1?(T>=l&&(T=l-1),S=e(B,T,l),I=S.length,q=O.length,u=t(S,O,I,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*k-1,F(_,a?o+_.e+1:o,s,A)}return _}}();function F(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==me&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=me)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return L&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function yr(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function gr(e,t,r){if(t>su)throw L=!0,r&&(e.precision=r),Error(so);return F(new e(mr),t,1,!0)}function we(e,t,r){if(t>Rn)throw Error(so);return F(new e(fr),t,r,!0)}function co(e){var t=e.length-1,r=t*M+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ne(e){for(var t="";e--;)t+="0";return t}function po(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(L=!1;;){if(r%2&&(o=o.times(t),no(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),no(t.d,s)}return L=!0,o}function ro(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(L=!1,l=A):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=F(o.times(e),l,1),r=r.times(++g),a=s.plus(j(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=F(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,k,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return F(s,T.precision=A,k,L=!0);else return T.precision=A,s}s=a}}function qe(e,t){var r,n,i,o,s,a,l,u,g,h,T,k=1,A=10,S=e,I=S.d,_=S.constructor,D=_.rounding,O=_.precision;if(S.s<0||!I||!I[0]||!S.e&&I[0]==1&&I.length==1)return new _(I&&!I[0]?-1/0:S.s!=1?NaN:I?0:S);if(t==null?(L=!1,g=O):g=t,_.precision=g+=A,r=Z(I),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=gr(_,g+2,O).times(o+""),S=qe(new _(n+"."+r.slice(1)),g-A).plus(u),_.precision=O,t==null?F(S,O,D,L=!0):S;for(h=S,l=s=S=j(S.minus(1),S.plus(1),g,1),T=F(S.times(S),g,1),i=3;;){if(s=F(s.times(T),g,1),u=l.plus(j(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(gr(_,g+2,O).times(o+""))),l=j(l,new _(k),g,1),t==null)if(Nt(l.d,g-A,D,a))_.precision=g+=A,u=s=S=j(h.minus(1),h.plus(1),g,1),T=F(S.times(S),g,1),i=a=1;else return F(l,_.precision=O,D,L=!0);else return _.precision=O,l;l=u,i+=2}}function fo(e){return String(e.s*e.s/0)}function dr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uo.test(t))return dr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nu.test(t))r=16,t=t.toLowerCase();else if(ru.test(t))r=2;else if(iu.test(t))r=8;else throw Error($e+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=po(n,new n(r),o,o*2)),u=pr(t,r,me),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=yr(u,g),e.d=u,L=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):He.pow(2,l))),L=!0,e)}function uu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/wr(5,r)),t=at(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function at(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/M);for(L=!1,l=r.times(r),a=new e(n);;){if(s=j(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=j(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return L=!0,s.d.length=h+1,s}function wr(e,t){for(var r=e;--t;)r*=e;return r}function go(e,t){var r,n=t.s<0,i=we(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return _e=n?4:1,t;if(r=t.divToInt(i),r.isZero())_e=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return _e=ro(r)?n?2:3:n?4:1,t;_e=ro(r)?n?1:4:n?3:2}return t.minus(i).abs()}function On(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor,A=r!==void 0;if(A?(ae(r,1,Be),n===void 0?n=k.rounding:ae(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=fo(e);else{for(g=be(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=pr(be(T),10,i),T.e=T.d.length),h=pr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=j(e,T,r,n,0,i),h=e.d,o=e.e,u=oo),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=pr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function cu(e){return new this(e).abs()}function pu(e){return new this(e).acos()}function du(e){return new this(e).acosh()}function mu(e,t){return new this(e).plus(t)}function fu(e){return new this(e).asin()}function gu(e){return new this(e).asinh()}function hu(e){return new this(e).atan()}function yu(e){return new this(e).atanh()}function wu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=we(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?we(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=we(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(j(e,t,o,1)),t=we(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(j(e,t,o,1)),r}function bu(e){return new this(e).cbrt()}function Eu(e){return F(e=new this(e),e.e+1,2)}function xu(e,t,r){return new this(e).clamp(t,r)}function Pu(e){if(!e||typeof e!="object")throw Error(hr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-st,0,"toExpPos",0,st,"maxE",0,st,"minE",-st,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=Sn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ao);else this[r]=!1;else throw Error($e+r+": "+n);return this}function vu(e){return new this(e).cos()}function Tu(e){return new this(e).cosh()}function ho(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,io(o)){u.s=o.s,L?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;L?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ao);else for(;o=10;i/=10)n++;npt,datamodelEnumToSchemaEnum:()=>Yu});f();c();p();d();m();f();c();p();d();m();function Yu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();c();p();d();m();var pt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(pt||{});var Po=Re(Ki());f();c();p();d();m();mn();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var bo={keyword:Oe,entity:Oe,value:e=>de(We(e)),punctuation:We,directive:Oe,function:Oe,variable:e=>de(We(e)),string:e=>de(kt(e)),boolean:Ot,number:Oe,comment:It};var Zu=e=>e,Er={},Xu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof fe){let t=e;return new fe(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof fe)continue;if(Y&&G!=t.length-1){D.lastIndex=ie;var h=D.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=G,l=ie;for(let B=t.length;a=l&&(++G,ie=l);if(t[G]instanceof fe)continue;u=a-G,Ae=e.slice(ie,l),h.index-=ie}else{D.lastIndex=0;var h=D.exec(Ae),u=1}if(!h){if(o)break;continue}q&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),T=g+h.length,k=Ae.slice(0,g),A=Ae.slice(T);let X=[G,u];k&&(++G,ie+=k.length,X.push(k));let Ze=new fe(S,O?N.tokenize(h,O):h,Ct,h,Y);if(X.push(Ze),A&&X.push(A),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,G,ie,!0,S),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:fe};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function fe(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return fe.stringify(r,t)}).join(""):ec(e.type)(e.content)};function ec(e){return bo[e]||Zu}function Eo(e){return tc(e,N.languages.javascript)}function tc(e,t){return N.tokenize(e,t).map(n=>fe.stringify(n)).join("")}f();c();p();d();m();function xo(e){return bn(e)}var xr=class e{firstLineNumber;lines;static read(t){let r;try{r=sr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,xo(n).split(` -`))}highlight(){let t=Eo(this.toString());return new e(this.firstLineNumber,t.split(` +"use strict";var Ea=Object.create;var tr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&tr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Se=(e,t,r)=>(r=e!=null?Ea(va(e)):{},ii(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),Ca=e=>ii(tr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var vi=Ae(nt=>{"use strict";m();c();p();d();f();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Aa=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=A.indexOf("=");F===-1&&(F=S);var _=F===S?0:4-F%4;return[F,_]}function l(A){var S=a(A),F=S[0],_=S[1];return(F+_)*3/4-_}function u(A,S,F){return(S+F)*3/4-F}function g(A){var S,F=a(A),_=F[0],L=F[1],O=new n(u(A,_,L)),q=0,Y=L>0?_-4:_,$;for($=0;$>16&255,O[q++]=S>>8&255,O[q++]=S&255;return L===2&&(S=r[A.charCodeAt($)]<<2|r[A.charCodeAt($+1)]>>4,O[q++]=S&255),L===1&&(S=r[A.charCodeAt($)]<<10|r[A.charCodeAt($+1)]<<4|r[A.charCodeAt($+2)]>>2,O[q++]=S>>8&255,O[q++]=S&255),O}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function T(A,S,F){for(var _,L=[],O=S;OY?Y:q+O));return _===1?(S=A[F-1],L.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(A[F-2]<<8)+A[F-1],L.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),L.join("")}}),Sa=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,A=t[r+T];for(T+=k,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,S=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+T>=1?r+=k/u:r+=k*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=S,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=S,a/=256,g-=8);t[n+A-S]|=F*128}}),Xr=Aa(),tt=Sa(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=C;nt.SlowBuffer=Ma;nt.INSPECT_MAX_BYTES=50;var rr=2147483647;nt.kMaxLength=rr;C.TYPED_ARRAY_SUPPORT=Ra();!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ra(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function Re(e){if(e>rr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}function C(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return rn(e)}return ci(e,t,r)}C.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return Oa(e,t);if(ArrayBuffer.isView(e))return Ia(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return di(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return C.from(n,t,r);let i=Fa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}C.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function pi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ka(e,t,r){return pi(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}C.alloc=function(e,t,r){return ka(e,t,r)};function rn(e){return pi(e),Re(e<0?0:nn(e)|0)}C.allocUnsafe=function(e){return rn(e)};C.allocUnsafeSlow=function(e){return rn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function en(e){let t=e.length<0?0:nn(e.length)|0,r=Re(t);for(let n=0;n=rr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rr.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),C.alloc(+e)}C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(C.isBuffer(o)||(o=C.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(C.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(C.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return tn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:tn(e).length;t=(""+t).toLowerCase(),i=!0}}C.byteLength=fi;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qa(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return $a(this,t,r);case"latin1":case"binary":return Va(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}C.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}C.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};oi&&(C.prototype[oi]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,sn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:si(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Da(this,e,t,r);case"utf8":case"utf-8":return La(this,e,t,r);case"ascii":case"latin1":case"binary":return Na(this,e,t,r);case"base64":return qa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?Xr.fromByteArray(e):Xr.fromByteArray(e.slice(t,r))}function gi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ua(n)}var ai=4096;function Ua(e){let t=e.length;if(t<=ai)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};C.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};C.prototype.writeUint8=C.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function hi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function yi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}C.prototype.writeBigUInt64LE=Le(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=Le(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};C.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};C.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};C.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};C.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};C.prototype.writeBigInt64LE=Le(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=Le(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}C.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}C.prototype.writeDoubleLE=function(e,t,r){return Ei(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return Ei(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ga(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ct(t,e.length-(r+1))}function xi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new et.ERR_OUT_OF_RANGE("value",a,e)}Ga(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function Ct(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Wa=/[^+/0-9A-Za-z-_]/g;function Ka(e){if(e=e.split("=")[0],e=e.trim().replace(Wa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return Xr.toByteArray(Ka(e))}function nr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function sn(e){return e!==e}var Ya=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Le(e){return typeof BigInt>"u"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,m=he(()=>{"use strict";w=Se(vi())});function El(){return!1}function pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xl(){return pn()}function Pl(){return[]}function vl(e){e(null,[])}function Tl(){return""}function Cl(){return""}function Al(){}function Sl(){}function Rl(){}function kl(){}function Ol(){}function Il(){}function Fl(){}function Ml(){}function _l(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Dl(e,t){t(null,pn())}var Ll,Nl,or,dn=he(()=>{"use strict";m();c();p();d();f();Ll={},Nl={existsSync:El,lstatSync:pn,stat:Dl,statSync:xl,readdirSync:Pl,readdir:vl,readlinkSync:Tl,realpathSync:Cl,chmodSync:Al,renameSync:Sl,mkdirSync:Rl,rmdirSync:kl,rmSync:Ol,unlinkSync:Il,watchFile:Fl,unwatchFile:Ml,watch:_l,promises:Ll},or=Nl});function ql(...e){return e.join("/")}function Bl(...e){return e.join("/")}function jl(e){let t=Li(e),r=Ni(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Li(e){let t=e.split("/");return t[t.length-1]}function Ni(e){return e.split("/").slice(0,-1).join("/")}function $l(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var qi,Ul,Vl,Ql,Oe,mn=he(()=>{"use strict";m();c();p();d();f();qi="/",Ul=":";Vl={sep:qi},Ql={basename:Li,delimiter:Ul,dirname:Ni,join:Bl,normalize:$l,parse:jl,posix:Vl,resolve:ql,sep:qi},Oe=Ql});var Bi=Ae((Uf,Jl)=>{Jl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var $i=Ae((Bm,Ui)=>{"use strict";m();c();p();d();f();Ui.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Wi=Ae((ng,Gi)=>{"use strict";m();c();p();d();f();Gi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Hi=Ae((gg,zi)=>{"use strict";m();c();p();d();f();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var xn=Ae((xg,Yi)=>{"use strict";m();c();p();d();f();var tu=Hi();Yi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var Zi=Ae((Gg,ur)=>{"use strict";m();c();p();d();f();ur.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};ur.exports.default=ur.exports});var In=Ae((l0,Po)=>{"use strict";m();c();p();d();f();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";m();c();p();d();f()});var Ro=he(()=>{"use strict";m();c();p();d();f()});var Zo=Ae((Fv,Jc)=>{Jc.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Br,Xo=he(()=>{"use strict";m();c();p();d();f();Br=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var pd={};Xe(pd,{DMMF:()=>qt,Debug:()=>z,Decimal:()=>_e,Extensions:()=>an,MetricsClient:()=>wt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>te,Public:()=>ln,Sql:()=>le,createParam:()=>Qo,defineDmmfProperty:()=>Ho,deserializeJsonResponse:()=>xt,deserializeRawResult:()=>Hr,dmmfToRuntimeDataModel:()=>ro,empty:()=>ts,getPrismaClient:()=>ya,getRuntime:()=>Fs,join:()=>es,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Yo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Lr,skip:()=>Dr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Dt});module.exports=Ca(pd);m();c();p();d();f();var an={};Xe(an,{defineExtension:()=>Ti,getExtensionContext:()=>Ci});m();c();p();d();f();m();c();p();d();f();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function Ci(e){return e}var ln={};Xe(ln,{validator:()=>Ai});m();c();p();d();f();m();c();p();d();f();function Ai(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var ir={};Xe(ir,{$:()=>Ii,bgBlack:()=>ll,bgBlue:()=>dl,bgCyan:()=>ml,bgGreen:()=>cl,bgMagenta:()=>fl,bgRed:()=>ul,bgWhite:()=>gl,bgYellow:()=>pl,black:()=>il,blue:()=>We,bold:()=>de,cyan:()=>ke,dim:()=>At,gray:()=>Ot,green:()=>Rt,grey:()=>al,hidden:()=>rl,inverse:()=>tl,italic:()=>el,magenta:()=>ol,red:()=>Ge,reset:()=>Xa,strikethrough:()=>nl,underline:()=>St,white:()=>sl,yellow:()=>kt});m();c();p();d();f();var un,Si,Ri,ki,Oi=!0;typeof y<"u"&&({FORCE_COLOR:un,NODE_DISABLE_COLORS:Si,NO_COLOR:Ri,TERM:ki}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var Ii={enabled:!Si&&Ri==null&&ki!=="dumb"&&(un!=null&&un!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ii.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xa=V(0,0),de=V(1,22),At=V(2,22),el=V(3,23),St=V(4,24),tl=V(7,27),rl=V(8,28),nl=V(9,29),il=V(30,39),Ge=V(31,39),Rt=V(32,39),kt=V(33,39),We=V(34,39),ol=V(35,39),ke=V(36,39),sl=V(37,39),Ot=V(90,39),al=V(90,39),ll=V(40,49),ul=V(41,49),cl=V(42,49),pl=V(43,49),dl=V(44,49),fl=V(45,49),ml=V(46,49),gl=V(47,49);m();c();p();d();f();var hl=100,Fi=["green","yellow","blue","magenta","cyan","red"],It=[],Mi=Date.now(),yl=0,cn=typeof y<"u"?y.env:{};globalThis.DEBUG??=cn.DEBUG??"";globalThis.DEBUG_COLORS??=cn.DEBUG_COLORS?cn.DEBUG_COLORS==="true":!0;var Ft={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function wl(e){let t={color:Fi[yl++%Fi.length],enabled:Ft.enabled(e),namespace:e,log:Ft.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&It.push([o,...n]),It.length>hl&&It.shift(),Ft.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:bl(g)),u=`+${Date.now()-Mi}ms`;Mi=Date.now(),globalThis.DEBUG_COLORS?a(ir[s](de(o)),...l,ir[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(wl,{get:(e,t)=>Ft[t],set:(e,t,r)=>Ft[t]=r});function bl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function _i(e=7500){let t=It.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ie(t,e.queryRaw.bind(e)),executeRaw:Ie(t,e.executeRaw.bind(e)),executeScript:Ie(t,e.executeScript.bind(e)),dispose:Ie(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Ie(t,e.startTransaction.bind(e))(...n)).map(o=>zl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=Hl(t,e.getConnectionInfo.bind(e))),r},zl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ie(e,t.queryRaw.bind(t)),executeRaw:Ie(e,t.executeRaw.bind(t)),commit:Ie(e,t.commit.bind(t)),rollback:Ie(e,t.rollback.bind(t))});function Ie(e,t){return async(...r)=>{try{return sr(await t(...r))}catch(n){if(ji("[error@wrapAsync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function Hl(e,t){return(...r)=>{try{return sr(t(...r))}catch(n){if(ji("[error@wrapSync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}m();c();p();d();f();var Vi=Se($i(),1);function wn(e){let t=(0,Vi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}m();c();p();d();f();var Qi="prisma+postgres",Ji=`${Qi}:`;function bn(e){return e?.toString().startsWith(`${Ji}//`)??!1}var _t={};Xe(_t,{error:()=>Xl,info:()=>Zl,log:()=>Yl,query:()=>eu,should:()=>Ki,tags:()=>Mt,warn:()=>En});m();c();p();d();f();var Mt={error:Ge("prisma:error"),warn:kt("prisma:warn"),info:ke("prisma:info"),query:We("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Yl(...e){console.log(...e)}function En(e,...t){Ki.warn()&&console.warn(`${Mt.warn} ${e}`,...t)}function Zl(e,...t){console.info(`${Mt.info} ${e}`,...t)}function Xl(e,...t){console.error(`${Mt.error} ${e}`,...t)}function eu(e,...t){console.log(`${Mt.query} ${e}`,...t)}m();c();p();d();f();function lr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function ze(e,t){throw new Error(t)}m();c();p();d();f();mn();function Pn(e){return Oe.sep===Oe.posix.sep?e:e.split(Oe.sep).join(Oe.posix.sep)}m();c();p();d();f();function vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();function cr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function Tn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Xi.has(e)||(Xi.add(e),En(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");m();c();p();d();f();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};ue(se,"PrismaClientKnownRequestError");m();c();p();d();f();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");m();c();p();d();f();var G=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};ue(G,"PrismaClientUnknownRequestError");m();c();p();d();f();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var we=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Ne(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function to(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}m();c();p();d();f();function Lt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function ro(e){return{models:Cn(e.models),enums:Cn(e.enums),types:Cn(e.types)}}function Cn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}m();c();p();d();f();function ot(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var st=9e15,Ue=1e9,An="0123456789abcdef",mr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},so,Fe,D=!0,yr="[DecimalError] ",je=yr+"Invalid argument: ",ao=yr+"Precision limit exceeded",lo=yr+"crypto unavailable",uo="[object Decimal]",re=Math.floor,W=Math.pow,ru=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,iu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,co=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,M=7,ou=9007199254740991,su=mr.length-1,Rn=gr.length-1,R={toStringTag:uo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};R.ceil=function(){return I(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(je+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=au(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe==2||Fe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(D=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return D=!0,I(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return U(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return I(U(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return I(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/br(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=at(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/br(5,e)),i=at(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?be(t,n,i):new t(0):new t(NaN):e.isZero()?be(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=be(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=be(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=be(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/M),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(D=!1,a=h+k,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),Nt(l.d,i=h,T))do if(a+=10,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Nt(l.d,i+=10,T));return D=!0,I(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.constructor;if(e=new A(e),!k.d||!e.d)return!k.s||!e.s?e=new A(NaN):k.d?e.s=-e.s:e=new A(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(u=k.d,T=e.d,a=A.precision,l=A.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new A(k);else return new A(l===3?-0:0);return D?I(e,a,l):e}if(r=re(e.e/M),g=re(k.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=T.length,h=n0;--n)u[s++]=0;for(n=T.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=wr(u,n),D?I(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(je+e);return r.d?(t=po(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=uu(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return D=!0,I(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Fe==2||Fe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=wr(o,r),D?I(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return On(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Ue),t===void 0?t=n.rounding:ae(t,0,8),I(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,!0):(ae(e,0,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e+1,t),r=Ee(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=Ee(i):(ae(e,0,Ue),t===void 0?t=o.rounding:ae(t,0,8),n=I(new o(i),e+i.e+1,t),r=Ee(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.d,S=k.constructor;if(!A)return new S(k);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=po(A)-k.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error(je+a);e=a.gt(t)?o>0?t:u:a}for(D=!1,a=new S(Z(A)),g=S.precision,S.precision=o=A.length*M*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=k.s,T=U(u,n,o,1).minus(k).abs().cmp(U(l,r,o,1).minus(k).abs())<1?[u,n]:[l,r],S.precision=g,D=!0,T};R.toHexadecimal=R.toHex=function(e,t){return On(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(D=!1,r=U(r,e,0,t,1).times(e),D=!0,I(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return On(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=ou)return i=fo(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(D=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=kn(e.times(Be(a,n+r)),n),i.d&&(i=I(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=I(kn(e.times(Be(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,D=!0,l.rounding=o,I(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e,t),r=Ee(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Ue),t===void 0?t=n.rounding:ae(t,0,8)),I(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return I(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(je+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function dr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function au(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/br(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=at(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,k,A,S,F,_,L,O,q,Y,$,Tt,J,ie,Ce,X,Ze,er=n.constructor,Zr=n.s==i.s?1:-1,ee=n.d,j=i.d;if(!ee||!ee[0]||!j||!j[0])return new er(!n.s||!i.s||(ee?j&&ee[0]==j[0]:!j)?NaN:ee&&ee[0]==0||!j?Zr*0:Zr/0);for(l?(k=1,g=n.e-i.e):(l=fe,k=M,g=re(n.e/k)-re(i.e/k)),X=j.length,ie=ee.length,_=new er(Zr),L=_.d=[],h=0;j[h]==(ee[h]||0);h++);if(j[h]>(ee[h]||0)&&g--,o==null?($=o=er.precision,s=er.rounding):a?$=o+(n.e-i.e)+1:$=o,$<0)L.push(1),A=!0;else{if($=$/k+2|0,h=0,X==1){for(T=0,j=j[0],$++;(h1&&(j=e(j,T,l),ee=e(ee,T,l),X=j.length,ie=ee.length),J=X,O=ee.slice(0,X),q=O.length;q=l/2&&++Ce;do T=0,u=t(j,O,X,q),u<0?(Y=O[0],X!=q&&(Y=Y*l+(O[1]||0)),T=Y/Ce|0,T>1?(T>=l&&(T=l-1),S=e(j,T,l),F=S.length,q=O.length,u=t(S,O,F,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*k-1,I(_,a?o+_.e+1:o,s,A)}return _}}();function I(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=fe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return D&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+qe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+qe(-i-1)+o,r&&(n=r-s)>0&&(o+=qe(n))):i>=s?(o+=qe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+qe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=qe(n))),o}function wr(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function hr(e,t,r){if(t>su)throw D=!0,r&&(e.precision=r),Error(ao);return I(new e(mr),t,1,!0)}function be(e,t,r){if(t>Rn)throw Error(ao);return I(new e(gr),t,r,!0)}function po(e){var t=e.length-1,r=t*M+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function qe(e){for(var t="";e--;)t+="0";return t}function fo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(D=!1;;){if(r%2&&(o=o.times(t),io(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),io(t.d,s)}return D=!0,o}function no(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(D=!1,l=A):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,k,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return I(s,T.precision=A,k,D=!0);else return T.precision=A,s}s=a}}function Be(e,t){var r,n,i,o,s,a,l,u,g,h,T,k=1,A=10,S=e,F=S.d,_=S.constructor,L=_.rounding,O=_.precision;if(S.s<0||!F||!F[0]||!S.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:S.s!=1?NaN:F?0:S);if(t==null?(D=!1,g=O):g=t,_.precision=g+=A,r=Z(F),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=hr(_,g+2,O).times(o+""),S=Be(new _(n+"."+r.slice(1)),g-A).plus(u),_.precision=O,t==null?I(S,O,L,D=!0):S;for(h=S,l=s=S=U(S.minus(1),S.plus(1),g,1),T=I(S.times(S),g,1),i=3;;){if(s=I(s.times(T),g,1),u=l.plus(U(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(hr(_,g+2,O).times(o+""))),l=U(l,new _(k),g,1),t==null)if(Nt(l.d,g-A,L,a))_.precision=g+=A,u=s=S=U(h.minus(1),h.plus(1),g,1),T=I(S.times(S),g,1),i=a=1;else return I(l,_.precision=O,L,D=!0);else return _.precision=O,l;l=u,i+=2}}function go(e){return String(e.s*e.s/0)}function fr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),co.test(t))return fr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nu.test(t))r=16,t=t.toLowerCase();else if(ru.test(t))r=2;else if(iu.test(t))r=8;else throw Error(je+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=fo(n,new n(r),o,o*2)),u=dr(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=wr(u,g),e.d=u,D=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Me.pow(2,l))),D=!0,e)}function uu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/br(5,r)),t=at(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function at(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/M);for(D=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return D=!0,s.d.length=h+1,s}function br(e,t){for(var r=e;--t;)r*=e;return r}function ho(e,t){var r,n=t.s<0,i=be(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Fe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Fe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Fe=no(r)?n?2:3:n?4:1,t;Fe=no(r)?n?1:4:n?3:2}return t.minus(i).abs()}function On(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor,A=r!==void 0;if(A?(ae(r,1,Ue),n===void 0?n=k.rounding:ae(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=go(e);else{for(g=Ee(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=dr(Ee(T),10,i),T.e=T.d.length),h=dr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=U(e,T,r,n,0,i),h=e.d,o=e.e,u=so),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=dr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function cu(e){return new this(e).abs()}function pu(e){return new this(e).acos()}function du(e){return new this(e).acosh()}function fu(e,t){return new this(e).plus(t)}function mu(e){return new this(e).asin()}function gu(e){return new this(e).asinh()}function hu(e){return new this(e).atan()}function yu(e){return new this(e).atanh()}function wu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=be(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?be(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=be(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=be(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function bu(e){return new this(e).cbrt()}function Eu(e){return I(e=new this(e),e.e+1,2)}function xu(e,t,r){return new this(e).clamp(t,r)}function Pu(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ue,"rounding",0,8,"toExpNeg",-st,0,"toExpPos",0,st,"maxE",0,st,"minE",-st,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(je+r+": "+n);if(r="crypto",i&&(this[r]=Sn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(lo);else this[r]=!1;else throw Error(je+r+": "+n);return this}function vu(e){return new this(e).cos()}function Tu(e){return new this(e).cosh()}function yo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,oo(o)){u.s=o.s,D?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;D?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(lo);else for(;o=10;i/=10)n++;nut,datamodelEnumToSchemaEnum:()=>zu});m();c();p();d();f();m();c();p();d();f();function zu(e){return{name:e.name,values:e.values.map(t=>t.name)}}m();c();p();d();f();var ut=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(ut||{});var xo=Se(Wi());m();c();p();d();f();dn();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var wo={keyword:ke,entity:ke,value:e=>de(We(e)),punctuation:We,directive:ke,function:ke,variable:e=>de(We(e)),string:e=>de(Rt(e)),boolean:kt,number:ke,comment:Ot};var Hu=e=>e,Er={},Yu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ce instanceof me)continue;if(Y&&J!=t.length-1){L.lastIndex=ie;var h=L.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=J,l=ie;for(let j=t.length;a=l&&(++J,ie=l);if(t[J]instanceof me)continue;u=a-J,Ce=e.slice(ie,l),h.index-=ie}else{L.lastIndex=0;var h=L.exec(Ce),u=1}if(!h){if(o)break;continue}q&&($=h[1]?h[1].length:0);var g=h.index+$,h=h[0].slice($),T=g+h.length,k=Ce.slice(0,g),A=Ce.slice(T);let X=[J,u];k&&(++J,ie+=k.length,X.push(k));let Ze=new me(S,O?N.tokenize(h,O):h,Tt,h,Y);if(X.push(Ze),A&&X.push(A),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,J,ie,!0,S),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):Zu(e.type)(e.content)};function Zu(e){return wo[e]||Hu}function bo(e){return Xu(e,N.languages.javascript)}function Xu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();function Eo(e){return wn(e)}var xr=class e{firstLineNumber;lines;static read(t){let r;try{r=or.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,Eo(n).split(` +`))}highlight(){let t=bo(this.toString());return new e(this.firstLineNumber,t.split(` `))}toString(){return this.lines.join(` -`)}};var rc={red:Je,gray:It,dim:St,bold:de,underline:Rt,highlightSource:e=>e.highlight()},nc={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function ic({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function oc({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=ic({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=xr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=ac(g),T=sc(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,A=>A.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let k=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((A,S)=>o.gray(String(S).padStart(k))+" "+A).mapLines(A=>o.dim(A)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let A=h+k+1;A+=2,s.callArguments=(0,Po.default)(i,A).slice(A)}}return s}function sc(e){let t=Object.keys(pt).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function ac(e){let t=0;for(let r=0;r"Unknown error")}function So(e){return e.errors.flatMap(t=>t.kind==="Union"?So(t):[t])}function cc(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:pc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function pc(e,t){return[...new Set(e.concat(t))]}function dc(e){return Cn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Co(t)-Co(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Co(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();ko();f();c();p();d();m();var dt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Ro();f();c();p();d();m();f();c();p();d();m();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},Oo={bold:de,red:Je,green:kt,dim:St,enabled:!0},mt={write(e){e.writeLine(",")}};f();c();p();d();m();var Pe=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ue=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ft=class extends Ue{items=[];addItem(t){return this.items.push(new Tr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Pe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(mt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var gt=class e extends Ue{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ft&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Pe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(mt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var z=class extends Ue{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Bt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(mt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function vr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":mc(e,t);break;case"IncludeOnScalar":fc(e,t);break;case"EmptySelection":gc(e,t,r);break;case"UnknownSelectionField":bc(e,t);break;case"InvalidSelectionValue":Ec(e,t);break;case"UnknownArgument":xc(e,t);break;case"UnknownInputField":Pc(e,t);break;case"RequiredArgumentMissing":vc(e,t);break;case"InvalidArgumentType":Tc(e,t);break;case"InvalidArgumentValue":Cc(e,t);break;case"ValueTooLarge":Ac(e,t);break;case"SomeFieldsMissing":Sc(e,t);break;case"TooManyFieldsGiven":Rc(e,t);break;case"Union":Ao(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function mc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function fc(e,t){let[r,n]=ht(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${jt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function gc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){hc(e,t,i);return}if(n.hasField("select")){yc(e,t);return}}if(r?.[je(e.outputType.name)]){wc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function hc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function yc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wc(e,t){let r=new Bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ht(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new gt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function bc(e,t){let r=Lo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":kc(n,e.outputType);break;case"omit":Oc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(jt(n)),i.join(" ")})}function Ec(e,t){let r=Lo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function xc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ic(n,e.arguments)),t.addErrorMessage(i=>Fo(i,r,e.arguments.map(o=>o.name)))}function Pc(e,t){let[r,n]=ht(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>Fo(o,n,e.inputType.fields.map(s=>s.name)))}function Fo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Mc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(jt(e)),n.join(" ")}function vc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ht(e.argumentPath),s=new Bt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=ht(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Tc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Cc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ac(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Sc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(jt(i)),o.join(" ")})}function Rc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function kc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ic(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function Lo(e,t){let[r,n]=ht(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ht(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function jt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Fc=3;function Mc(e,t){let r=1/0,n;for(let i of t){let o=(0,Io.default)(e,i);o>Fc||o`}};function yt(e){return e instanceof Ut}f();c();p();d();m();var Rr=Symbol(),_n=new WeakMap,Le=class{constructor(t){t===Rr?_n.set(this,`Prisma.${this._getName()}`):_n.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return _n.get(this)}},Vt=class extends Le{_getNamespace(){return"NullTypes"}},Qt=class extends Vt{#e};Ln(Qt,"DbNull");var Gt=class extends Vt{#e};Ln(Gt,"JsonNull");var Jt=class extends Vt{#e};Ln(Jt,"AnyNull");var kr={classes:{DbNull:Qt,JsonNull:Gt,AnyNull:Jt},instances:{DbNull:new Qt(Rr),JsonNull:new Gt(Rr),AnyNull:new Jt(Rr)}};function Ln(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var No=": ",Or=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+No.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(No).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function wt(e){return new Dn(qo(e))}function qo(e){let t=new gt;for(let[r,n]of Object.entries(e)){let i=new Or(r,$o(n));t.addField(i)}return t}function $o(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ct(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=br(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Le?new z(`Prisma.${e._getName()}`):yt(e)?new z(`prisma.${je(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?_c(e):typeof e=="object"?qo(e):new z(Object.prototype.toString.call(e))}function _c(e){let t=new ft;for(let r of e)t.addItem($o(r));return t}function Ir(e,t){let r=t==="pretty"?Oo:Ar,n=e.renderAllMessages(r),i=new dt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=wt(e);for(let h of t)vr(h,a,s);let{message:l,args:u}=Ir(a,r),g=Pr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();function ve(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function jo(e,t,r){let n=ve(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Lc({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function Lc(e){let t=new xe,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Dc(t,o,i)})):{}}function Dc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Vo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new xe;modelExtensionsCache=new xe;queryCallbacksCache=new xe;clientExtensions=qt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=qt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>jo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ve(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},bt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();var _r=class{constructor(t){this.name=t}};function Qo(e){return e instanceof _r}function Go(e){return new _r(e)}f();c();p();d();m();f();c();p();d();m();var Jo=Symbol(),Wt=class{constructor(t){if(t!==Jo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new Wt(Jo);function Te(e){return e instanceof Wt}var Nc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Wo="explicitly `undefined` values are not allowed";function Dr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=bt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Nc[t],query:Kt(r,h)}}function Kt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ho(r,n),selection:qc(e,t,i,n)}}function qc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Uc(e,n)):$c(n,t,r)}function $c(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Bc(n,t,e),jc(n,r,e),n}function Bc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(qn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Kt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Kt(i,o)}}function jc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Vo(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;qn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Uc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);qn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Kt({},a):r[o]=!0;continue}r[o]=Kt(s,a)}}return r}function Ko(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ut(e)){if(br(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Qo(e))return{$type:"Param",value:e.name};if(yt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Vc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Qc(e))return e.values;if(ct(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Le){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Gc(e))return e.toJSON();if(typeof e=="object")return Ho(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ho(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Ko(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Wo}))}return r}function Vc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[je(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Et=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};f();c();p();d();m();function Yo(e,t){let r=qt(()=>Jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Jc(e){return{datamodel:{models:$n(e.models),enums:$n(e.enums),types:$n(e.types)}}}function $n(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var Bn=new WeakMap,Nr="$$PrismaTypedSql",Ht=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Zo(e){return(...t)=>new Ht(e,t)}function qr(e){return e!=null&&e[Nr]===Nr}f();c();p();d();m();var ha=Re(Xo());f();c();p();d();m();es();mn();gn();f();c();p();d();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Br={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Br,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ns=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Kc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=is(Reflect.ownKeys(o),r),a=is(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Br,...l?.getPropertyDescriptor(s)}:Br:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ns]=function(){let o={...this};return delete o[ns],o},i}function Kc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function is(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function xt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Ur(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function os(e){if(e===void 0)return"";let t=wt(e);return new dt(0,{colors:Ar}).write(t).toString()}f();c();p();d();m();var Hc="P2037";function Vr({error:e,user_facing_error:t},r,n){return t.error_code?new se(zc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function zc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Hc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Yt="";function ss(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=Xc(n)||tp(n)||ip(n)||lp(n)||sp(n);return i&&r.push(i),r},[])}var Yc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Xc(e){var t=Yc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Zc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Yt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var ep=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function tp(e){var t=ep.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var rp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,np=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ip(e){var t=rp.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=np.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Yt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var op=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function sp(e){var t=op.exec(e);return t?{file:t[3],methodName:t[1]||Yt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var ap=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lp(e){var t=ap.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Vn=class{getLocation(){return null}},Qn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ss(t).find(i=>{if(!i.file)return!1;let o=vn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Vn:new Qn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var as={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Pt(e={}){let t=cp(e);return Object.entries(t).reduce((n,[i,o])=>(as[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function cp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ls(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:Pt})(e)}f();c();p();d();m();function pp(e={}){let{select:t,...r}=e;return typeof t=="object"?Pt({...r,_count:t}):Pt({...r,_count:{_all:!0}})}function dp(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function us(e,t){return t({action:"count",unpacker:dp(e),argsMapper:pp})(e)}f();c();p();d();m();function mp(e={}){let t=Pt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function fp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function cs(e,t){return t({action:"groupBy",unpacker:fp(e),argsMapper:mp})(e)}function ps(e,t,r){if(t==="aggregate")return n=>ls(n,r);if(t==="count")return n=>us(n,r);if(t==="groupBy")return n=>cs(n,r)}f();c();p();d();m();function ds(e,t){let r=t.fields.filter(i=>!i.relationName),n=yo(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ut(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var ms=e=>Array.isArray(e)?e:e.split("."),Gn=(e,t)=>ms(t).reduce((r,n)=>r&&r[n],e),fs=(e,t,r)=>ms(t).reduceRight((n,i,o,s)=>Object.assign({},Gn(e,s.slice(0,o)),{[i]:n}),r);function gp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hp(e,t,r){return t===void 0?e??{}:fs(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=gp(n,i),h=hp(l,o,g),T=r({dataPath:g,callsite:u})(h),k=yp(e,t);return new Proxy(T,{get(A,S){if(!k.includes(S))return A[S];let _=[a[S].type,r,S],D=[g,h];return Jn(e,..._,...D)},...jr([...k,...Object.getOwnPropertyNames(T)])})}}function yp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var wp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],bp=["aggregate","count","groupBy"];function Wn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Ep(e,t),Pp(e,t),zt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Ep(e,t){let r=ve(t),n=Object.keys(pt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ve(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return wp.includes(o)?Jn(e,t,s):xp(i)?ps(e,i,s):s({})}}}function xp(e){return bp.includes(e)}function Pp(e,t){return ze(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return ds(t,r)}))}f();c();p();d();m();function gs(e){return e.replace(/^./,t=>t.toUpperCase())}var Kn=Symbol();function Zt(e){let t=[vp(e),Tp(e),ne(Kn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(zt(r)),ge(e,t)}function vp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Tp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ve),n=[...new Set(t.concat(r))];return ze({getKeys(){return n},getPropertyValue(i){let o=gs(i);if(e._runtimeDataModel.models[o]!==void 0)return Wn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function hs(e){return e[Kn]?e[Kn]:e}function ys(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Zt(t)}f();c();p();d();m();f();c();p();d();m();function ws({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(xt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(xt(u))}Cp(e,l.needs)&&s.push(Ap(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function Cp(e,t){return t.every(r=>Tn(e,r))}function Ap(e,t){return ze(ne(e.name,()=>e.compute(t)))}f();c();p();d();m();function Gr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Gr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Es({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Gr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ve(l);return ws({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Sp=["$connect","$disconnect","$on","$transaction","$use","$extends"],xs=Sp;function Ps(e){if(e instanceof le)return Rp(e);if(qr(e))return kp(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Ps(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(o,l),a.args=s,Ts(e,a,r,n+1)}})})}function Cs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ts(e,t,s)}function As(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ss(r,n,0,e):e(r)}}function Ss(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(i,l),Ss(a,t,r+1,n)}})}var vs=e=>e;function Rs(e=vs,t=vs){return r=>e(t(r))}f();c();p();d();m();var ks=H("prisma:client"),Os={Vercel:"vercel","Netlify CI":"netlify"};function Is({postinstall:e,ciName:t,clientVersion:r}){if(ks("checkPlatformCaching:postinstall",e),ks("checkPlatformCaching:ciName",t),e===!0&&t&&t in Os){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +`)}};var ec={red:Ge,gray:Ot,dim:At,bold:de,underline:St,highlightSource:e=>e.highlight()},tc={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function rc({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function nc({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=rc({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=xr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=oc(g),T=ic(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,A=>A.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let k=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((A,S)=>o.gray(String(S).padStart(k))+" "+A).mapLines(A=>o.dim(A)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let A=h+k+1;A+=2,s.callArguments=(0,xo.default)(i,A).slice(A)}}return s}function ic(e){let t=Object.keys(ut).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function oc(e){let t=0;for(let r=0;r"Unknown error")}function Ao(e){return e.errors.flatMap(t=>t.kind==="Union"?Ao(t):[t])}function lc(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:uc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function uc(e,t){return[...new Set(e.concat(t))]}function cc(e){return Tn(e,(t,r)=>{let n=vo(t),i=vo(r);return n!==i?n-i:To(t)-To(r)})}function vo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function To(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();Ro();m();c();p();d();f();var ct=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};So();m();c();p();d();f();m();c();p();d();f();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},ko={bold:de,red:Ge,green:Rt,dim:At,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var $e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var dt=class extends $e{items=[];addItem(t){return this.items.push(new Tr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new xe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ft=class e extends $e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof dt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new xe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(pt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends $e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Bt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function vr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":pc(e,t);break;case"IncludeOnScalar":dc(e,t);break;case"EmptySelection":fc(e,t,r);break;case"UnknownSelectionField":yc(e,t);break;case"InvalidSelectionValue":wc(e,t);break;case"UnknownArgument":bc(e,t);break;case"UnknownInputField":Ec(e,t);break;case"RequiredArgumentMissing":xc(e,t);break;case"InvalidArgumentType":Pc(e,t);break;case"InvalidArgumentValue":vc(e,t);break;case"ValueTooLarge":Tc(e,t);break;case"SomeFieldsMissing":Cc(e,t);break;case"TooManyFieldsGiven":Ac(e,t);break;case"Union":Co(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function pc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function dc(e,t){let[r,n]=mt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${jt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){mc(e,t,i);return}if(n.hasField("select")){gc(e,t);return}}if(r?.[Ne(e.outputType.name)]){hc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function mc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function gc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Mo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function hc(e,t){let r=new Bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=mt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ft;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function yc(e,t){let r=_o(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Mo(n,e.outputType);break;case"include":Sc(n,e.outputType);break;case"omit":Rc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(jt(n)),i.join(" ")})}function wc(e,t){let r=_o(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function bc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),kc(n,e.arguments)),t.addErrorMessage(i=>Io(i,r,e.arguments.map(o=>o.name)))}function Ec(e,t){let[r,n]=mt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>Io(o,n,e.inputType.fields.map(s=>s.name)))}function Io(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ic(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(jt(e)),n.join(" ")}function xc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=mt(e.argumentPath),s=new Bt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Fo).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=mt(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Fo(e){return e.kind==="list"?`${Fo(e.elementType)}[]`:e.name}function Pc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function vc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Tc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Cc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(jt(i)),o.join(" ")})}function Ac(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Mo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function Sc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Rc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function kc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function _o(e,t){let[r,n]=mt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function mt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function jt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Oc=3;function Ic(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>Oc||o`}};function gt(e){return e instanceof Ut}m();c();p();d();f();var Rr=Symbol(),Mn=new WeakMap,De=class{constructor(t){t===Rr?Mn.set(this,`Prisma.${this._getName()}`):Mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mn.get(this)}},$t=class extends De{_getNamespace(){return"NullTypes"}},Vt=class extends $t{#e};_n(Vt,"DbNull");var Qt=class extends $t{#e};_n(Qt,"JsonNull");var Jt=class extends $t{#e};_n(Jt,"AnyNull");var kr={classes:{DbNull:Vt,JsonNull:Qt,AnyNull:Jt},instances:{DbNull:new Vt(Rr),JsonNull:new Qt(Rr),AnyNull:new Jt(Rr)}};function _n(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Lo=": ",Or=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ht(e){return new Dn(No(e))}function No(e){let t=new ft;for(let[r,n]of Object.entries(e)){let i=new Or(r,qo(n));t.addField(i)}return t}function qo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(lt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=pr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof De?new H(`Prisma.${e._getName()}`):gt(e)?new H(`prisma.${Ne(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fc(e):typeof e=="object"?No(e):new H(Object.prototype.toString.call(e))}function Fc(e){let t=new dt;for(let r of e)t.addItem(qo(r));return t}function Ir(e,t){let r=t==="pretty"?ko:Ar,n=e.renderAllMessages(r),i=new ct(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ht(e);for(let h of t)vr(h,a,s);let{message:l,args:u}=Ir(a,r),g=Pr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function jo(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Mc({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function Mc(e){let t=new we,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return cr(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?cr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:_c(t,o,i)})):{}}function _c(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Lt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>jo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},yt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();var _r=class{constructor(t){this.name=t}};function Vo(e){return e instanceof _r}function Qo(e){return new _r(e)}m();c();p();d();f();m();c();p();d();f();var Jo=Symbol(),Gt=class{constructor(t){if(t!==Jo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Dr:t}},Dr=new Gt(Jo);function ve(e){return e instanceof Gt}var Dc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Go="explicitly `undefined` values are not allowed";function Lr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=yt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Ln({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Dc[t],query:Wt(r,h)}}function Wt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:Lc(e,t,i,n)}}function Lc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),jc(e,n)):Nc(n,t,r)}function Nc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&qc(n,t,e),Bc(n,r,e),n}function qc(e,t,r){for(let[n,i]of Object.entries(t)){if(ve(i))continue;let o=r.nestSelection(n);if(Nn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Wt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Wt(i,o)}}function Bc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=$o(i,n);for(let[s,a]of Object.entries(o)){if(ve(a))continue;Nn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function jc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(ve(s))continue;let a=t.nestSelection(o);Nn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ve(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Wt({},a):r[o]=!0;continue}r[o]=Wt(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ot(e)){if(pr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Vo(e))return{$type:"Param",value:e.name};if(gt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Uc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if($c(e))return e.values;if(lt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof De){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Vc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ve(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Go}))}return r}function Uc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ne(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ze(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var wt=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Ho(e,t){let r=Lt(()=>Qc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Qc(e){return{datamodel:{models:qn(e.models),enums:qn(e.enums),types:qn(e.types)}}}function qn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Bn=new WeakMap,Nr="$$PrismaTypedSql",Kt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Yo(e){return(...t)=>new Kt(e,t)}function qr(e){return e!=null&&e[Nr]===Nr}m();c();p();d();f();var ha=Se(Zo());m();c();p();d();f();Xo();dn();mn();m();c();p();d();f();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var jr={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var rs=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Gc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ns(Reflect.ownKeys(o),r),a=ns(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...jr,...l?.getPropertyDescriptor(s)}:jr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[rs]=function(){let o={...this};return delete o[rs],o},i}function Gc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ns(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function bt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function $r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function is(e){if(e===void 0)return"";let t=ht(e);return new ct(0,{colors:Ar}).write(t).toString()}m();c();p();d();f();var Wc="P2037";function Vr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Kc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Kc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Wc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Ht="";function os(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=Yc(n)||Xc(n)||rp(n)||sp(n)||ip(n);return i&&r.push(i),r},[])}var zc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Yc(e){var t=zc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Hc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Ht,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Zc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Xc(e){var t=Zc.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ep=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rp(e){var t=ep.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=tp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Ht,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var np=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function ip(e){var t=np.exec(e);return t?{file:t[3],methodName:t[1]||Ht,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var op=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function sp(e){var t=op.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var $n=class{getLocation(){return null}},Vn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=os(t).find(i=>{if(!i.file)return!1;let o=Pn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $n:new Vn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var ss={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Et(e={}){let t=lp(e);return Object.entries(t).reduce((n,[i,o])=>(ss[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function lp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function as(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:Et})(e)}m();c();p();d();f();function up(e={}){let{select:t,...r}=e;return typeof t=="object"?Et({...r,_count:t}):Et({...r,_count:{_all:!0}})}function cp(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function ls(e,t){return t({action:"count",unpacker:cp(e),argsMapper:up})(e)}m();c();p();d();f();function pp(e={}){let t=Et(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function dp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function us(e,t){return t({action:"groupBy",unpacker:dp(e),argsMapper:pp})(e)}function cs(e,t,r){if(t==="aggregate")return n=>as(n,r);if(t==="count")return n=>ls(n,r);if(t==="groupBy")return n=>us(n,r)}m();c();p();d();f();function ps(e,t){let r=t.fields.filter(i=>!i.relationName),n=to(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ut(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var ds=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ds(t).reduce((r,n)=>r&&r[n],e),fs=(e,t,r)=>ds(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function fp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function mp(e,t,r){return t===void 0?e??{}:fs(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=fp(n,i),h=mp(l,o,g),T=r({dataPath:g,callsite:u})(h),k=gp(e,t);return new Proxy(T,{get(A,S){if(!k.includes(S))return A[S];let _=[a[S].type,r,S],L=[g,h];return Jn(e,..._,...L)},...Ur([...k,...Object.getOwnPropertyNames(T)])})}}function gp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var hp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],yp=["aggregate","count","groupBy"];function Gn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[wp(e,t),Ep(e,t),zt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function wp(e,t){let r=Pe(t),n=Object.keys(ut).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ve(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return hp.includes(o)?Jn(e,t,s):bp(i)?cs(e,i,s):s({})}}}function bp(e){return yp.includes(e)}function Ep(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return ps(t,r)}))}m();c();p();d();f();function ms(e){return e.replace(/^./,t=>t.toUpperCase())}var Wn=Symbol();function Yt(e){let t=[xp(e),Pp(e),ne(Wn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(zt(r)),ge(e,t)}function xp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Pp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=ms(i);if(e._runtimeDataModel.models[o]!==void 0)return Gn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Gn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function gs(e){return e[Wn]?e[Wn]:e}function hs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Yt(t)}m();c();p();d();f();m();c();p();d();f();function ys({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(bt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(bt(u))}vp(e,l.needs)&&s.push(Tp(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function vp(e,t){return t.every(r=>vn(e,r))}function Tp(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Jr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function bs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ys({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Cp=["$connect","$disconnect","$on","$transaction","$extends"],Es=Cp;function xs(e){if(e instanceof le)return Ap(e);if(qr(e))return Sp(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:xs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ss(o,l),a.args=s,vs(e,a,r,n+1)}})})}function Ts(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return vs(e,t,s)}function Cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?As(r,n,0,e):e(r)}}function As(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ss(i,l),As(a,t,r+1,n)}})}var Ps=e=>e;function Ss(e=Ps,t=Ps){return r=>e(t(r))}m();c();p();d();f();var Rs=z("prisma:client"),ks={Vercel:"vercel","Netlify CI":"netlify"};function Os({postinstall:e,ciName:t,clientVersion:r}){if(Rs("checkPlatformCaching:postinstall",e),Rs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ks){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${Os[t]}-build`;throw console.error(n),new Q(n,r)}}f();c();p();d();m();function Fs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();var Op=()=>globalThis.process?.release?.name==="node",Ip=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Fp=()=>!!globalThis.Deno,Mp=()=>typeof globalThis.Netlify=="object",_p=()=>typeof globalThis.EdgeRuntime=="object",Lp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Dp(){return[[Mp,"netlify"],[_p,"edge-light"],[Lp,"workerd"],[Fp,"deno"],[Ip,"bun"],[Op,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Np={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ms(){let e=Dp();return{id:e,prettyName:Np[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();var Hn=Re(Pn());f();c();p();d();m();function _s(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}f();c();p();d();m();function Ls(e){return e.split(` +Learn how: https://pris.ly/d/${ks[t]}-build`;throw console.error(n),new Q(n,r)}}m();c();p();d();f();function Is(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();var Rp=()=>globalThis.process?.release?.name==="node",kp=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Op=()=>!!globalThis.Deno,Ip=()=>typeof globalThis.Netlify=="object",Fp=()=>typeof globalThis.EdgeRuntime=="object",Mp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _p(){return[[Ip,"netlify"],[Fp,"edge-light"],[Mp,"workerd"],[Op,"deno"],[kp,"bun"],[Rp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Dp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Fs(){let e=_p();return{id:e,prettyName:Dp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var Kn=Se(xn());m();c();p();d();f();function Ms(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function _s(e){return e.split(` `).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}f();c();p();d();m();var Ds=Re(Xi());function Ns({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ds.default)({user:t,repo:r,template:n,title:e,body:i})}function qs({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Li(6e3-(s?.length??0)),l=Ls((0,Hn.default)(a)),u=n?`# Description +`)}m();c();p();d();f();var Ds=Se(Zi());function Ls({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ds.default)({user:t,repo:r,template:n,title:e,body:i})}function Ns({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=_i(6e3-(s?.length??0)),l=_s((0,Kn.default)(a)),u=n?`# Description \`\`\` ${n} -\`\`\``:"",g=(0,Hn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",g=(0,Kn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -49,35 +49,35 @@ ${l} ## Prisma Engine Query \`\`\` -${s?_s(s):""} +${s?Ms(s):""} \`\`\` -`),h=Ns({title:r,body:g});return`${r} +`),h=Ls({title:r,body:g});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. -${Rt(h)} +${St(h)} If you want the Prisma team to look into it, please open the link above \u{1F64F} To increase the chance of success, please post your schema and a snippet of how you used Prisma Client in the issue. -`}var $s="6.13.0";f();c();p();d();m();function Jr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();function Bs(e){if(e?.kind==="itx")return e.options.id}f();c();p();d();m();var zn=class{engineObject;constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},js={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:zn}}};var $p="P2036",Ce=H("prisma:client:libraryEngine");function Bp(e){return e.item_type==="query"&&"query"in e}function jp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var lk=[...fn,"native"],Up=0xffffffffffffffffn,Yn=1n;function Vp(){let e=Yn++;return Yn>Up&&(Yn=1n),e}var er=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=js,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Vp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Qp(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new J(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr));let r=await this.adapterPromise;r&&Ce("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Bp(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):jp(r)?this.loggerRustPanic=new ce(Zn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr)),await this.adapterPromise,Ce("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Ce("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new J(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Zn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ce("requestBatch");let i=Ur(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Bs(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new J(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Zn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Vr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===$p&&r){let n=t.meta?.id;ur(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return ur(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Qp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Zn(e,t){return qs({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}f();c();p();d();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let I=S.join(` -`);o.push({_tag:"error",value:I})},l=!!e?.startsWith("prisma://"),u=En(e),g=!!t,h=l||u;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:u,driverAdapters:g};function A(S){return S.length>0}return A(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Vs({copyEngine:e=!0},t){let r;try{r=Jr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Dt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new er(t)}f();c();p();d();m();function Wr({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Qs=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Gs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function vt(e){try{return Js(e,"fast")}catch{return Js(e,"slow")}}function Js(e,t){return JSON.stringify(e.map(r=>Ks(r,t)))}function Ks(e,t){if(Array.isArray(e))return e.map(r=>Ks(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ut(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ee.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Hs(e):e}function Gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Hs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():Hs(e)}var Jp=/^(\s*alter\s)/i,zs=H("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Jp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +`}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function qs(e,t){throw new Error(t)}function Lp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Np(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function xt(e){return e===null?e:Array.isArray(e)?e.map(xt):typeof e=="object"?Lp(e)?qp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Np(e,xt):e}function qp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Me(t);case"Json":return JSON.parse(t);default:qs(t,"Unknown tagged value")}}var Bs="6.14.0";m();c();p();d();f();function Gr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function js(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var zn=class{engineObject;constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Us={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:zn}}};var jp="P2036",Te=z("prisma:client:libraryEngine");function Up(e){return e.item_type==="query"&&"query"in e}function $p(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ak=[...fn,"native"],Vp=0xffffffffffffffffn,Hn=1n;function Qp(){let e=Hn++;return Hn>Vp&&(Hn=1n),e}var Xt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=Us,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Qp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Jp(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new G(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Te("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar));let r=await this.adapterPromise;r&&Te("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Up(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):$p(r)?this.loggerRustPanic=new ce(Yn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Te("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar)),await this.adapterPromise,Te("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Te("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Te("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Te("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Te(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Yn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Te("requestBatch");let i=$r(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),js(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Yn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Vr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===jp&&r){let n=t.meta?.id;lr(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return lr(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Jp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Yn(e,t){return Ns({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}m();c();p();d();f();function $s({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let F=S.join(` +`);o.push({_tag:"error",value:F})},l=!!e?.startsWith("prisma://"),u=bn(e),g=!!t,h=l||u;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:u,driverAdapters:g};function A(S){return S.length>0}return A(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Vs({copyEngine:e=!0},t){let r;try{r=Gr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=$s({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Dt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new Xt(t)}m();c();p();d();f();function Wr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Qs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Js=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Pt(e){try{return Gs(e,"fast")}catch{return Gs(e,"slow")}}function Gs(e,t){return JSON.stringify(e.map(r=>Ks(r,t)))}function Ks(e,t){if(Array.isArray(e))return e.map(r=>Ks(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ot(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(_e.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?zs(e):e}function Gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():zs(e)}var Wp=/^(\s*alter\s)/i,Hs=z("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Wp.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Gs(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?zs(`prisma.${e}(${n}, ${i.values})`):zs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ys={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Xs(r(s)):Xs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Wp=hn.split(".")[0],Kp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Wp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Kp}};function ea(){return new ri}f();c();p();d();m();function ta(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function ra(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Kr=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var ia=Re(Pn());f();c();p();d();m();function Hr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function na(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();c();p();d();m();var Hp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return Hp[e]}f();c();p();d();m();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Yr(e){let t=[],r=zp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Zp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:na(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Yp(t),Xp(t,i))throw t;if(t instanceof se&&ed(t)){let u=sa(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Pr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof J)throw new J(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ia.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Gn(o,s),l=i==="queryRaw"?Yr(a):lt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Zp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};Me(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function Xp(e,t){return Hr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function ed(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var aa=$s;f();c();p();d();m();var da=Re(Fn());f();c();p();d();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};ue($,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],td={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Tt(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&it(t.generator)==="client")throw new $('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Wr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(it(t.generator)==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ua.includes(e)){let t=Tt(e,ua);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ca.includes(r)){let n=Tt(r,ca);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Tt(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=nd(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(id(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Tt(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ma(e,t){for(let[r,n]of Object.entries(e)){if(!la.includes(r)){let i=Tt(r,la);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}td[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Tt(e,t){if(t.length===0||typeof e!="string")return"";let r=rd(e,t);return r?` Did you mean "${r}"?`:""}function rd(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,da.default)(e,i)}));r.sort((i,o)=>i.distanceje(n)===t);if(r)return e[r]}function id(e,t){let r=wt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ir(r,"colorless");return`Error validating "omit" option: +`)}var Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Js(r),i={values:Pt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Hs(`prisma.${e}(${n}, ${i.values})`):Hs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ys={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function ei(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Xs(r(s)):Xs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var Kp=gn.split(".")[0],zp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Kp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??zp}};function ea(){return new ti}m();c();p();d();f();function ta(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function ra(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();var ia=Se(xn());m();c();p();d();f();function Kr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function na(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}m();c();p();d();f();var Hp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return Hp[e]}m();c();p();d();f();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Hr(e){let t=[],r=Yp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Xp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:na(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Zp(t),ed(t,i))throw t;if(t instanceof se&&td(t)){let u=sa(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Pr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof G)throw new G(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ia.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Qn(o,s),l=i==="queryRaw"?Hr(a):xt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Xp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};ze(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function ed(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function td(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var aa=Bs;m();c();p();d();f();var da=Se(In());m();c();p();d();f();var B=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};ue(B,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],rd={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=vt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&it(t.generator)==="client")throw new B('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Wr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(it(t.generator)==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ua.includes(e)){let t=vt(e,ua);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ca.includes(r)){let n=vt(r,ca);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=vt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=id(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(od(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=vt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function fa(e,t){for(let[r,n]of Object.entries(e)){if(!la.includes(r)){let i=vt(r,la);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}rd[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function vt(e,t){if(t.length===0||typeof e!="string")return"";let r=nd(e,t);return r?` Did you mean "${r}"?`:""}function nd(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,da.default)(e,i)}));r.sort((i,o)=>i.distanceNe(n)===t);if(r)return e[r]}function od(e,t){let r=ht(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ir(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}f();c();p();d();m();function fa(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Hr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=H("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var od={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},sd=Symbol.for("prisma.client.transaction.id"),ad={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new Kr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Is(e),n&&ma(n,e);let i=new $r().on("error",()=>{});this._extensions=bt.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ea();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ie.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ie.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&H.enable("prisma:client");let h=Ie.resolve(e.dirname,e.relativePath);sr.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let T=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&ra(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Fs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Jr,getBatchRequestPayload:Ur,prismaGraphQLToJSError:Vr,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:H("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=Vs(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let k of l.log){let A=typeof k=="string"?k:k.emit==="stdout"?k.level:null;A&&this.$on(A,S=>{Lt.log(`${Lt.tags[A]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Di()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Qs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ad.nextId(),s=ta(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return fa(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return ge(Zt(ge(hs(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>ti(n)),ne(sd,()=>n.id)])),[xt(xs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??od,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,I=>g(u,_=>(I?.end(),l(_))));let{runInTransaction:h,args:T,...k}=u,A={...n,...k};T&&(A.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete A.transaction;let S=await Cs(this,A);return A.model?Es({result:S,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=u?u(n):n;let A={name:"serialize"},S=this._tracingHelper.runInChildSpan(A,()=>Dr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return H.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${os(n)})`),Qe("Generated request:"),Qe(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(A){throw A.clientVersion=this._clientVersion,A}}$metrics=new Et(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ys}return t}function ga(e,t){return ld(e)?[new le(e,t),Ys]:[e,Zs]}function ld(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var ud=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ud.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}m();c();p();d();f();function ma(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var sd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ad=Symbol.for("prisma.client.transaction.id"),ld={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ei();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Os(e),n&&fa(n,e);let i=new Br().on("error",()=>{});this._extensions=yt.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ea();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&z.enable("prisma:client");let h=Oe.resolve(e.dirname,e.relativePath);or.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let T=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&ra(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Is(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Gr,getBatchRequestPayload:$r,prismaGraphQLToJSError:Vr,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:z("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=Vs(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let k of l.log){let A=typeof k=="string"?k:k.emit==="stdout"?k.level:null;A&&this.$on(A,S=>{_t.log(`${_t.tags[A]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Yt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Di()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Qs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ld.nextId(),s=ta(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ma(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return ge(Yt(ge(gs(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>ei(n)),ne(ad,()=>n.id)])),[bt(Es)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??sd,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&u===!1&&delete T.transaction;let k=await Ts(this,T);return T.model?bs({result:k,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=u?u(n):n;let A={name:"serialize"},S=this._tracingHelper.runInChildSpan(A,()=>Lr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${is(n)})`),Qe("Generated request:"),Qe(JSON.stringify(S,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(A){throw A.clientVersion=this._clientVersion,A}}$metrics=new wt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=hs}return t}function ga(e,t){return ud(e)?[new le(e,t),Ys]:[e,Zs]}function ud(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var cd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!cd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=react-native.js.map diff --git a/src/generated/prisma/runtime/wasm-compiler-edge.js b/src/generated/prisma/runtime/wasm-compiler-edge.js index 404b280..ad54b8d 100644 --- a/src/generated/prisma/runtime/wasm-compiler-edge.js +++ b/src/generated/prisma/runtime/wasm-compiler-edge.js @@ -1,20 +1,20 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var cu=Object.create;var Jr=Object.defineProperty;var uu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty;var ge=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},Fo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pu(t))!du.call(e,i)&&i!==r&&Jr(e,i,{get:()=>t[i],enumerable:!(n=uu(t,i))||n.enumerable});return e};var Ce=(e,t,r)=>(r=e!=null?cu(mu(e)):{},Fo(t||!e||!e.__esModule?Jr(r,"default",{value:e,enumerable:!0}):r,e)),$o=e=>Fo(Jr({},"__esModule",{value:!0}),e);function li(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new w(hu.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new w([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new w([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new w(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(h=0){return Z(h,"offset"),me(h,"offset"),ee(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,A=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),S=yu[C];return Z(A,"offset"),me(A,"offset"),ee(A,"offset",this.length-1),gu(h,"value",S[0],S[1]),new DataView(this.buffer)[r[a]](A,h,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function qo(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Kr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=Eu+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function Z(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function me(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function gu(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Vo(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function xu(e,t="utf8"){return w.from(e,t)}var w,yu,hu,wu,bu,Eu,y,ci,c=ge(()=>{"use strict";w=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Vo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return li(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return bu.includes(t)}static compare(t,r){Kr(t,"buff1"),Kr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return li(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Z(t,"offset"),me(t,"offset"),ee(t,"offset",this.length-1),Z(r,"byteLength"),me(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Z(r,"offset"),me(r,"offset"),ee(r,"offset",this.length-1),Z(n,"byteLength"),me(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((C,S)=>this[h+S]===C))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return wu.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+ci(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+ci(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");qo(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};yu={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},hu=new TextEncoder,wu=new TextDecoder,bu=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Eu=4294967295;fu(w.prototype);y=new Proxy(xu,{construct(e,[t,r]){return w.from(t,r)},get(e,t){return w[t]}}),ci=String.fromCodePoint});var g,x,u=ge(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ge(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ge(()=>{"use strict";E=()=>{};E.prototype=E});var d=ge(()=>{"use strict"});function Ho(e,t){var r,n,i,o,s,a,f,h,A=e.constructor,C=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),W?V(t,C):t;if(f=e.d,h=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(C/Q),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,W?V(t,C):t}function Se(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Re(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(pi+X(e));if(!e.s)return new A(ye);for(t==null?(W=!1,a=C):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),h+=5;for(n=Math.log(ze(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new A(ye),A.precision=a;;){if(i=V(i.times(e),a),r=r.times(++f),s=o.plus(Le(i,r,a)),Re(s.d).slice(0,a)===Re(o.d).slice(0,a)){for(;h--;)o=V(o.times(o),a);return A.precision=C,t==null?(W=!0,V(o,C)):o}o=s}}function X(e){for(var t=e.e*Q,r=e.d[0];r>=10;r/=10)t++;return t}function ui(e,t,r){if(t>e.LN10.sd())throw W=!0,r&&(e.precision=r),Error(be+"LN10 precision limit exceeded");return V(new e(e.LN10),t)}function Ve(e){for(var t="";e--;)t+="0";return t}function Gt(e,t){var r,n,i,o,s,a,f,h,A,C=1,S=10,R=e,_=R.d,k=R.constructor,L=k.precision;if(R.s<1)throw Error(be+(R.s?"NaN":"-Infinity"));if(R.eq(ye))return new k(0);if(t==null?(W=!1,h=L):h=t,R.eq(10))return t==null&&(W=!0),ui(k,h);if(h+=S,k.precision=h,r=Re(_),n=r.charAt(0),o=X(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Re(R.d),n=r.charAt(0),C++;o=X(R),n>1?(R=new k("0."+r),o++):R=new k(n+"."+r.slice(1))}else return f=ui(k,h+2,L).times(o+""),R=Gt(new k(n+"."+r.slice(1)),h-S).plus(f),k.precision=L,t==null?(W=!0,V(R,L)):R;for(a=s=R=Le(R.minus(ye),R.plus(ye),h),A=V(R.times(R),h),i=3;;){if(s=V(s.times(A),h),f=a.plus(Le(s,new k(i),h)),Re(f.d).slice(0,h)===Re(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(ui(k,h+2,L).times(o+""))),a=Le(a,new k(C),h),k.precision=L,t==null?(W=!0,V(a,L)):a;a=f,i+=2}}function Bo(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dt(r/Q),e.d=[],n=(r+1)%Q,r<0&&(n+=Q),nzr||e.e<-zr))throw Error(pi+r)}else e.s=0,e.e=0,e.d=[0];return e}function V(e,t,r){var n,i,o,s,a,f,h,A,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=Q,i=t,h=C[A=0];else{if(A=Math.ceil((n+1)/Q),o=C.length,A>=o)return e;for(h=o=C[A],s=1;o>=10;o/=10)s++;n%=Q,i=n-Q+s}if(r!==void 0&&(o=ze(10,s-i-1),a=h/o%10|0,f=t<0||C[A+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/ze(10,s-i):0:C[A-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return f?(o=X(e),C.length=1,t=t-o-1,C[0]=ze(10,(Q-t%Q)%Q),e.e=dt(-t/Q)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=A,o=1,A--):(C.length=A+1,o=ze(10,Q-n),C[A]=i>0?(h/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(C[0]+=o)==te&&(C[0]=1,++e.e);break}else{if(C[A]+=o,C[A]!=te)break;C[A--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(W&&(e.e>zr||e.e<-zr))throw Error(pi+X(e));return e}function Wo(e,t){var r,n,i,o,s,a,f,h,A,C,S=e.constructor,R=S.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new S(e),W?V(t,R):t;if(f=e.d,C=t.d,n=t.e,h=e.e,f=f.slice(),s=h-n,s){for(A=s<0,A?(r=f,s=-s,a=C.length):(r=C,n=h,a=f.length),i=Math.max(Math.ceil(R/Q),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=C.length,A=i0;--i)f[a++]=0;for(i=C.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ve(-i-1)+o,r&&(n=r-s)>0&&(o+=Ve(n))):i>=s?(o+=Ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ve(n))),e.s<0?"-"+o:o}function jo(e,t){if(e.length>t)return e.length=t,!0}function Jo(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ye+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Bo(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Tu.test(o))Bo(s,o);else throw Error(Ye+o)}if(i.prototype=I,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Jo,i.config=i.set=vu,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,Pu,mi,W,be,Ye,pi,dt,ze,Tu,ye,te,Q,Qo,zr,I,Le,mi,Yr,Ko=ge(()=>{"use strict";c();u();p();m();d();l();mt=1e9,Pu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W=!0,be="[DecimalError] ",Ye=be+"Invalid argument: ",pi=be+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,Tu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,Q=7,Qo=9007199254740991,zr=dt(Qo/Q),I={};I.absoluteValue=I.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};I.comparedTo=I.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};I.decimalPlaces=I.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Q;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};I.dividedBy=I.div=function(e){return Le(this,new this.constructor(e))};I.dividedToIntegerBy=I.idiv=function(e){var t=this,r=t.constructor;return V(Le(t,new r(e),0,1),r.precision)};I.equals=I.eq=function(e){return!this.cmp(e)};I.exponent=function(){return X(this)};I.greaterThan=I.gt=function(e){return this.cmp(e)>0};I.greaterThanOrEqualTo=I.gte=function(e){return this.cmp(e)>=0};I.isInteger=I.isint=function(){return this.e>this.d.length-2};I.isNegative=I.isneg=function(){return this.s<0};I.isPositive=I.ispos=function(){return this.s>0};I.isZero=function(){return this.s===0};I.lessThan=I.lt=function(e){return this.cmp(e)<0};I.lessThanOrEqualTo=I.lte=function(e){return this.cmp(e)<1};I.logarithm=I.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(ye))throw Error(be+"NaN");if(r.s<1)throw Error(be+(r.s?"NaN":"-Infinity"));return r.eq(ye)?new n(0):(W=!1,t=Le(Gt(r,o),Gt(e,o),o),W=!0,V(t,i))};I.minus=I.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Wo(t,e):Ho(t,(e.s=-e.s,e))};I.modulo=I.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(be+"NaN");return r.s?(W=!1,t=Le(r,e,0,1).times(e),W=!0,r.minus(t)):V(new n(r),i)};I.naturalExponential=I.exp=function(){return Go(this)};I.naturalLogarithm=I.ln=function(){return Gt(this)};I.negated=I.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};I.plus=I.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ho(t,e):Wo(t,(e.s=-e.s,e))};I.precision=I.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=X(i)+1,n=i.d.length-1,r=n*Q+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};I.squareRoot=I.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(be+"NaN")}for(e=X(a),W=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Re(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(Le(a,o,s+2)).times(.5),Re(o.d).slice(0,s)===(t=Re(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(V(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return W=!0,V(n,r)};I.times=I.mul=function(e){var t,r,n,i,o,s,a,f,h,A=this,C=A.constructor,S=A.d,R=(e=new C(e)).d;if(!A.s||!e.s)return new C(0);for(e.s*=A.s,r=A.e+e.e,f=S.length,h=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*S[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,W?V(e,C.precision):e};I.toDecimalPlaces=I.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Se(e,0,mt),t===void 0?t=n.rounding:Se(t,0,8),V(r,e+X(r)+1,t))};I.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Se(e,0,mt),t===void 0?t=i.rounding:Se(t,0,8),n=V(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};I.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Se(e,0,mt),t===void 0?t=o.rounding:Se(t,0,8),n=V(new o(i),e+X(i)+1,t),r=Ze(n.abs(),!1,e+X(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};I.toInteger=I.toint=function(){var e=this,t=e.constructor;return V(new t(e),X(e)+1,t.rounding)};I.toNumber=function(){return+this};I.toPower=I.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,h=12,A=+(e=new f(e));if(!e.s)return new f(ye);if(a=new f(a),!a.s){if(e.s<1)throw Error(be+"Infinity");return a}if(a.eq(ye))return a;if(n=f.precision,e.eq(ye))return V(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Qo){for(i=new f(ye),t=Math.ceil(n/Q+4),W=!1;r%2&&(i=i.times(a),jo(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),jo(a.d,t);return W=!0,e.s<0?new f(ye).div(i):V(i,n)}}else if(o<0)throw Error(be+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,W=!1,i=e.times(Gt(a,n+h)),W=!0,i=Go(i),i.s=o,i};I.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=X(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Se(e,1,mt),t===void 0?t=o.rounding:Se(t,0,8),i=V(new o(i),e,t),r=X(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};I.toSignificantDigits=I.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Se(e,1,mt),t===void 0?t=n.rounding:Se(t,0,8)),V(new n(r),e,t)};I.toString=I.valueOf=I.val=I.toJSON=I[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=X(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};Le=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,h,A,C,S,R,_,k,L,Ee,ue,q,pe,Ke,ai,xe,Gr,Wr=n.constructor,lu=n.s==i.s?1:-1,Ae=n.d,Y=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(be+"Division by zero");for(f=n.e-i.e,xe=Y.length,Ke=Ae.length,R=new Wr(lu),_=R.d=[],h=0;Y[h]==(Ae[h]||0);)++h;if(Y[h]>(Ae[h]||0)&&--f,o==null?ue=o=Wr.precision:s?ue=o+(X(n)-X(i))+1:ue=o,ue<0)return new Wr(0);if(ue=ue/Q+2|0,h=0,xe==1)for(A=0,Y=Y[0],ue++;(h1&&(Y=e(Y,A),Ae=e(Ae,A),xe=Y.length,Ke=Ae.length),pe=xe,k=Ae.slice(0,xe),L=k.length;L=te/2&&++ai;do A=0,a=t(Y,k,xe,L),a<0?(Ee=k[0],xe!=L&&(Ee=Ee*te+(k[1]||0)),A=Ee/ai|0,A>1?(A>=te&&(A=te-1),C=e(Y,A),S=C.length,L=k.length,a=t(C,k,S,L),a==1&&(A--,r(C,xe{"use strict";Ko();v=class extends Yr{static isDecimal(t){return t instanceof Yr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Yr(`0.${n.slice(0,t)}`)}}},ne=v});function ku(){return!1}function hi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Ou(){return hi()}function Du(){return[]}function _u(e){e(null,[])}function Mu(){return""}function Lu(){return""}function Nu(){}function Uu(){}function Fu(){}function $u(){}function Vu(){}function qu(){}function Bu(){}function ju(){}function Qu(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Hu(e,t){t(null,hi())}var Gu,Wu,ms,ds=ge(()=>{"use strict";c();u();p();m();d();l();Gu={},Wu={existsSync:ku,lstatSync:hi,stat:Hu,statSync:Ou,readdirSync:Du,readdir:_u,readlinkSync:Mu,realpathSync:Lu,chmodSync:Nu,renameSync:Uu,mkdirSync:Fu,rmdirSync:$u,rmSync:Vu,unlinkSync:qu,watchFile:Bu,unwatchFile:ju,watch:Qu,promises:Gu},ms=Wu});var fs=se(()=>{"use strict";c();u();p();m();d();l()});function Ju(...e){return e.join("/")}function Ku(...e){return e.join("/")}function zu(e){let t=gs(e),r=ys(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function gs(e){let t=e.split("/");return t[t.length-1]}function ys(e){return e.split("/").slice(0,-1).join("/")}function Zu(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var hs,Yu,Xu,ep,tn,ws=ge(()=>{"use strict";c();u();p();m();d();l();hs="/",Yu=":";Xu={sep:hs},ep={basename:gs,delimiter:Yu,dirname:ys,join:Ku,normalize:Zu,parse:zu,posix:Xu,resolve:Ju,sep:hs},tn=ep});var bs=se((Vy,tp)=>{tp.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ei={};pt(Ei,{Hash:()=>Kt,createHash:()=>Es,default:()=>yt,randomFillSync:()=>nn,randomUUID:()=>rn,webcrypto:()=>zt});function rn(){return globalThis.crypto.randomUUID()}function nn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function Es(e){return new Kt(e)}var zt,Kt,yt,Xe=ge(()=>{"use strict";c();u();p();m();d();l();zt=globalThis.crypto;Kt=class{#e=[];#t;constructor(t){this.#t=t}update(t){this.#e.push(t)}async digest(){let t=new Uint8Array(this.#e.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#e)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#t,t);return new Uint8Array(n)}},yt={webcrypto:zt,randomUUID:rn,randomFillSync:nn,createHash:Es,Hash:Kt}});var xi=se((Dh,op)=>{op.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var xs=se(on=>{"use strict";c();u();p();m();d();l();Object.defineProperty(on,"__esModule",{value:!0});on.enginesVersion=void 0;on.enginesVersion=xi().prisma.enginesVersion});var vs=se((Wh,Ts)=>{"use strict";c();u();p();m();d();l();Ts.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Rs=se((aw,Cs)=>{"use strict";c();u();p();m();d();l();Cs.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var vi=se((fw,Ss)=>{"use strict";c();u();p();m();d();l();var up=Rs();Ss.exports=e=>typeof e=="string"?e.replace(up(),""):e});var Is=se((Sw,ln)=>{"use strict";c();u();p();m();d();l();ln.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};ln.exports.default=ln.exports});var Si=se((IP,Ms)=>{"use strict";c();u();p();m();d();l();Ms.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";c();u();p();m();d();l()});var Vs=ge(()=>{"use strict";c();u();p();m();d();l()});var Rn,ua=ge(()=>{"use strict";c();u();p();m();d();l();Rn=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Zi=se(rt=>{"use strict";c();u();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Yi;rt.abytes=sl;rt.ahash=Hm;rt.aexists=Gm;rt.aoutput=Wm;function Yi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Qm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function sl(e,...t){if(!Qm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Hm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Yi(e.outputLen),Yi(e.blockLen)}function Gm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Wm(e,t){sl(e);let r=t.outputLen;if(e.length{"use strict";c();u();p();m();d();l();Object.defineProperty(D,"__esModule",{value:!0});D.add5L=D.add5H=D.add4H=D.add4L=D.add3H=D.add3L=D.rotlBL=D.rotlBH=D.rotlSL=D.rotlSH=D.rotr32L=D.rotr32H=D.rotrBL=D.rotrBH=D.rotrSL=D.rotrSH=D.shrSL=D.shrSH=D.toBig=void 0;D.fromBig=eo;D.split=al;D.add=xl;var Ln=BigInt(2**32-1),Xi=BigInt(32);function eo(e,t=!1){return t?{h:Number(e&Ln),l:Number(e>>Xi&Ln)}:{h:Number(e>>Xi&Ln)|0,l:Number(e&Ln)|0}}function al(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);D.toBig=ll;var cl=(e,t,r)=>e>>>r;D.shrSH=cl;var ul=(e,t,r)=>e<<32-r|t>>>r;D.shrSL=ul;var pl=(e,t,r)=>e>>>r|t<<32-r;D.rotrSH=pl;var ml=(e,t,r)=>e<<32-r|t>>>r;D.rotrSL=ml;var dl=(e,t,r)=>e<<64-r|t>>>r-32;D.rotrBH=dl;var fl=(e,t,r)=>e>>>r-32|t<<64-r;D.rotrBL=fl;var gl=(e,t)=>t;D.rotr32H=gl;var yl=(e,t)=>e;D.rotr32L=yl;var hl=(e,t,r)=>e<>>32-r;D.rotlSH=hl;var wl=(e,t,r)=>t<>>32-r;D.rotlSL=wl;var bl=(e,t,r)=>t<>>64-r;D.rotlBH=bl;var El=(e,t,r)=>e<>>64-r;D.rotlBL=El;function xl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Pl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);D.add3L=Pl;var Tl=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;D.add3H=Tl;var vl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);D.add4L=vl;var Al=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;D.add4H=Al;var Cl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);D.add5L=Cl;var Rl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;D.add5H=Rl;var Jm={fromBig:eo,split:al,toBig:ll,shrSH:cl,shrSL:ul,rotrSH:pl,rotrSL:ml,rotrBH:dl,rotrBL:fl,rotr32H:gl,rotr32L:yl,rotlSH:hl,rotlSL:wl,rotlBH:bl,rotlBL:El,add:xl,add3L:Pl,add3H:Tl,add4L:vl,add4H:Al,add5H:Rl,add5L:Cl};D.default=Jm});var Il=se(Nn=>{"use strict";c();u();p();m();d();l();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.crypto=void 0;var He=(Xe(),$o(Ei));Nn.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Dl=se(U=>{"use strict";c();u();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=Km;U.u8=zm;U.u32=Ym;U.createView=Zm;U.rotr=Xm;U.rotl=ed;U.byteSwap=no;U.byteSwap32=td;U.bytesToHex=nd;U.hexToBytes=id;U.asyncLoop=sd;U.utf8ToBytes=Ol;U.toBytes=Un;U.concatBytes=ad;U.checkOpts=ld;U.wrapConstructor=cd;U.wrapConstructorWithOpts=ud;U.wrapXOFConstructorWithOpts=pd;U.randomBytes=md;var _t=Il(),ro=Zi();function Km(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function zm(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Ym(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Zm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Xm(e,t){return e<<32-t|e>>>t}function ed(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function no(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>no(e);function td(e){for(let t=0;tt.toString(16).padStart(2,"0"));function nd(e){(0,ro.abytes)(e);let t="";for(let r=0;r=Ue._0&&e<=Ue._9)return e-Ue._0;if(e>=Ue.A&&e<=Ue.F)return e-(Ue.A-10);if(e>=Ue.a&&e<=Ue.f)return e-(Ue.a-10)}function id(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=od;async function sd(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Un(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function ud(e){let t=(n,i)=>e(i).update(Un(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function pd(e){let t=(n,i)=>e(i).update(Un(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function md(e=32){if(_t.crypto&&typeof _t.crypto.getRandomValues=="function")return _t.crypto.getRandomValues(new Uint8Array(e));if(_t.crypto&&typeof _t.crypto.randomBytes=="function")return _t.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Vl=se(G=>{"use strict";c();u();p();m();d();l();Object.defineProperty(G,"__esModule",{value:!0});G.shake256=G.shake128=G.keccak_512=G.keccak_384=G.keccak_256=G.keccak_224=G.sha3_512=G.sha3_384=G.sha3_256=G.sha3_224=G.Keccak=void 0;G.keccakP=Fl;var Mt=Zi(),Er=Sl(),Fe=Dl(),Ll=[],Nl=[],Ul=[],dd=BigInt(0),br=BigInt(1),fd=BigInt(2),gd=BigInt(7),yd=BigInt(256),hd=BigInt(113);for(let e=0,t=br,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ll.push(2*(5*n+r)),Nl.push((e+1)*(e+2)/2%64);let i=dd;for(let o=0;o<7;o++)t=(t<>gd)*hd)%yd,t&fd&&(i^=br<<(br<r>32?(0,Er.rotlBH)(e,t,r):(0,Er.rotlSH)(e,t,r),Ml=(e,t,r)=>r>32?(0,Er.rotlBL)(e,t,r):(0,Er.rotlSL)(e,t,r);function Fl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,h=r[f],A=r[f+1],C=_l(h,A,1)^r[a],S=Ml(h,A,1)^r[a+1];for(let R=0;R<50;R+=10)e[s+R]^=C,e[s+R+1]^=S}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Nl[s],f=_l(i,o,a),h=Ml(i,o,a),A=Ll[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=h}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=wd[n],e[1]^=bd[n]}r.fill(0)}var xr=class e extends Fe.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Mt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Fe.u32)(this.state)}keccak(){Fe.isLE||(0,Fe.byteSwap32)(this.state32),Fl(this.state32,this.rounds),Fe.isLE||(0,Fe.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Mt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Fe.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Mt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Mt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};G.Keccak=xr;var Ge=(e,t,r)=>(0,Fe.wrapConstructor)(()=>new xr(t,e,r));G.sha3_224=Ge(6,144,224/8);G.sha3_256=Ge(6,136,256/8);G.sha3_384=Ge(6,104,384/8);G.sha3_512=Ge(6,72,512/8);G.keccak_224=Ge(1,144,224/8);G.keccak_256=Ge(1,136,256/8);G.keccak_384=Ge(1,104,384/8);G.keccak_512=Ge(1,72,512/8);var $l=(e,t,r)=>(0,Fe.wrapXOFConstructorWithOpts)((n={})=>new xr(t,e,n.dkLen===void 0?r:n.dkLen,!0));G.shake128=$l(31,168,128/8);G.shake256=$l(31,136,256/8)});var Jl=se((fN,We)=>{"use strict";c();u();p();m();d();l();var{sha3_512:Ed}=Vl(),Bl=24,Pr=32,io=(e=4,t=Math.random)=>{let r="";for(;r.lengthjl(Ed(e)).toString(36).slice(1),ql=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),xd=e=>ql[Math.floor(e()*ql.length)],Hl=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+io(Pr,t):io(Pr,t);return Ql(n).substring(0,Pr)},Gl=e=>()=>e++,Pd=476782367,Wl=({random:e=Math.random,counter:t=Gl(Math.floor(e()*Pd)),length:r=Bl,fingerprint:n=Hl({random:e})}={})=>function(){let o=xd(e),s=Date.now().toString(36),a=t().toString(36),f=io(r,e),h=`${s+f+a+n}`;return`${o+Ql(h).substring(1,r)}`},Td=Wl(),vd=(e,{minLength:t=2,maxLength:r=Pr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};We.exports.getConstants=()=>({defaultLength:Bl,bigLength:Pr});We.exports.init=Wl;We.exports.createId=Td;We.exports.bufToBigInt=jl;We.exports.createCounter=Gl;We.exports.createFingerprint=Hl;We.exports.isCuid=vd});var Kl=se((xN,Tr)=>{"use strict";c();u();p();m();d();l();var{createId:Ad,init:Cd,getConstants:Rd,isCuid:Sd}=Jl();Tr.exports.createId=Ad;Tr.exports.init=Cd;Tr.exports.getConstants=Rd;Tr.exports.isCuid=Sd});var Df={};pt(Df,{DMMF:()=>rr,Debug:()=>K,Decimal:()=>ne,Extensions:()=>di,MetricsClient:()=>St,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>ae,PrismaClientValidationError:()=>ie,Public:()=>fi,Sql:()=>de,createParam:()=>ra,defineDmmfProperty:()=>la,deserializeJsonResponse:()=>qe,deserializeRawResult:()=>oi,dmmfToRuntimeDataModel:()=>_s,empty:()=>ma,getPrismaClient:()=>ou,getRuntime:()=>Dt,join:()=>pa,makeStrictEnum:()=>su,makeTypedQueryFactory:()=>ca,objectEnumValues:()=>hn,raw:()=>Ui,serializeJsonQuery:()=>vn,skip:()=>Tn,sqltag:()=>Fi,warnEnvConflicts:()=>void 0,warnOnce:()=>Xt});module.exports=$o(Df);c();u();p();m();d();l();var di={};pt(di,{defineExtension:()=>zo,getExtensionContext:()=>Yo});c();u();p();m();d();l();c();u();p();m();d();l();function zo(e){return typeof e=="function"?e:t=>t.$extends(e)}c();u();p();m();d();l();function Yo(e){return e}var fi={};pt(fi,{validator:()=>Zo});c();u();p();m();d();l();c();u();p();m();d();l();function Zo(...e){return t=>t}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var gi,Xo,es,ts,rs=!0;typeof g<"u"&&({FORCE_COLOR:gi,NODE_DISABLE_COLORS:Xo,NO_COLOR:es,TERM:ts}=g.env||{},rs=g.stdout&&g.stdout.isTTY);var Au={enabled:!Xo&&es==null&&ts!=="dumb"&&(gi!=null&&gi!=="0"||rs)};function B(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Au.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var kg=B(0,0),Zr=B(1,22),Xr=B(2,22),Og=B(3,23),en=B(4,24),Dg=B(7,27),_g=B(8,28),Mg=B(9,29),Lg=B(30,39),ft=B(31,39),ns=B(32,39),is=B(33,39),os=B(34,39),Ng=B(35,39),ss=B(36,39),Ug=B(37,39),as=B(90,39),Fg=B(90,39),$g=B(40,49),Vg=B(41,49),qg=B(42,49),Bg=B(43,49),jg=B(44,49),Qg=B(45,49),Hg=B(46,49),Gg=B(47,49);c();u();p();m();d();l();var Cu=100,ls=["green","yellow","blue","magenta","cyan","red"],Wt=[],cs=Date.now(),Ru=0,yi=typeof g<"u"?g.env:{};globalThis.DEBUG??=yi.DEBUG??"";globalThis.DEBUG_COLORS??=yi.DEBUG_COLORS?yi.DEBUG_COLORS==="true":!0;var Jt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Su(e){let t={color:ls[Ru++%ls.length],enabled:Jt.enabled(e),namespace:e,log:Jt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Wt.push([o,...n]),Wt.length>Cu&&Wt.shift(),Jt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Iu(A)),h=`+${Date.now()-cs}ms`;cs=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(Su,{get:(e,t)=>Jt[t],set:(e,t,r)=>Jt[t]=r});function Iu(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function us(e=7500){let t=Wt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.lengthlp,info:()=>ap,log:()=>sp,query:()=>cp,should:()=>As,tags:()=>Yt,warn:()=>Ti});c();u();p();m();d();l();var Yt={error:ft("prisma:error"),warn:is("prisma:warn"),info:ss("prisma:info"),query:os("prisma:query")},As={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function sp(...e){console.log(...e)}function Ti(e,...t){As.warn()&&console.warn(`${Yt.warn} ${e}`,...t)}function ap(e,...t){console.info(`${Yt.info} ${e}`,...t)}function lp(e,...t){console.error(`${Yt.error} ${e}`,...t)}function cp(e,...t){console.log(`${Yt.query} ${e}`,...t)}c();u();p();m();d();l();function Pe(e,t){throw new Error(t)}c();u();p();m();d();l();function Ai(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();u();p();m();d();l();function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();u();p();m();d();l();function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ks.has(e)||(ks.add(e),Ti(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};O(F,"PrismaClientInitializationError");c();u();p();m();d();l();var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};O(z,"PrismaClientKnownRequestError");c();u();p();m();d();l();var le=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};O(le,"PrismaClientRustPanicError");c();u();p();m();d();l();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};O(ae,"PrismaClientUnknownRequestError");c();u();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};O(ie,"PrismaClientValidationError");c();u();p();m();d();l();l();function qe(e){return e===null?e:Array.isArray(e)?e.map(qe):typeof e=="object"?pp(e)?mp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ht(e,qe):e}function pp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function mp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ne(t);case"Json":return JSON.parse(t);default:Pe(t,"Unknown tagged value")}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Ie=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();u();p();m();d();l();function Be(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();u();p();m();d();l();function Ds(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}c();u();p();m();d();l();function er(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();u();p();m();d();l();function _s(e){return{models:Ri(e.models),enums:Ri(e.enums),types:Ri(e.types)}}function Ri(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}c();u();p();m();d();l();function wt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function cn(e){return e.toString()!=="Invalid Date"}c();u();p();m();d();l();l();function bt(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();u();p();m();d();l();c();u();p();m();d();l();var rr={};pt(rr,{ModelAction:()=>tr,datamodelEnumToSchemaEnum:()=>dp});c();u();p();m();d();l();c();u();p();m();d();l();function dp(e){return{name:e.name,values:e.values.map(t=>t.name)}}c();u();p();m();d();l();var tr=(q=>(q.findUnique="findUnique",q.findUniqueOrThrow="findUniqueOrThrow",q.findFirst="findFirst",q.findFirstOrThrow="findFirstOrThrow",q.findMany="findMany",q.create="create",q.createMany="createMany",q.createManyAndReturn="createManyAndReturn",q.update="update",q.updateMany="updateMany",q.updateManyAndReturn="updateManyAndReturn",q.upsert="upsert",q.delete="delete",q.deleteMany="deleteMany",q.groupBy="groupBy",q.count="count",q.aggregate="aggregate",q.findRaw="findRaw",q.aggregateRaw="aggregateRaw",q))(tr||{});var fp=Ce(vs());var gp={red:ft,gray:as,dim:Xr,bold:Zr,underline:en,highlightSource:e=>e.highlight()},yp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function hp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function wp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(bp(t))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function bp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function un(e){let t=e.showColors?gp:yp,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=hp(e),wp(r,t)}c();u();p();m();d();l();var Bs=Ce(Si());c();u();p();m();d();l();function Us(e,t,r){let n=Fs(e),i=Ep(n),o=Pp(i);o?pn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Fs(e){return e.errors.flatMap(t=>t.kind==="Union"?Fs(t):[t])}function Ep(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:xp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function xp(e,t){return[...new Set(e.concat(t))]}function Pp(e){return Ci(e,(t,r)=>{let n=Ls(t),i=Ls(r);return n!==i?n-i:Ns(t)-Ns(r)})}function Ls(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ns(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();u();p();m();d();l();var he=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();u();p();m();d();l();c();u();p();m();d();l();Vs();c();u();p();m();d();l();var Et=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};$s();c();u();p();m();d();l();c();u();p();m();d();l();var mn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();u();p();m();d();l();var dn=e=>e,fn={bold:dn,red:dn,green:dn,dim:dn,enabled:!1},qs={bold:Zr,red:ft,green:ns,dim:Xr,enabled:!0},xt={write(e){e.writeLine(",")}};c();u();p();m();d();l();var ke=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();u();p();m();d();l();var je=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Pt=class extends je{items=[];addItem(t){return this.items.push(new mn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new ke("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Tt=class e extends je{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Pt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new ke("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();u();p();m();d();l();var re=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ke(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();u();p();m();d();l();var nr=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(xt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Tp(e,t);break;case"IncludeOnScalar":vp(e,t);break;case"EmptySelection":Ap(e,t,r);break;case"UnknownSelectionField":Ip(e,t);break;case"InvalidSelectionValue":kp(e,t);break;case"UnknownArgument":Op(e,t);break;case"UnknownInputField":Dp(e,t);break;case"RequiredArgumentMissing":_p(e,t);break;case"InvalidArgumentType":Mp(e,t);break;case"InvalidArgumentValue":Lp(e,t);break;case"ValueTooLarge":Np(e,t);break;case"SomeFieldsMissing":Up(e,t);break;case"TooManyFieldsGiven":Fp(e,t);break;case"Union":Us(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Tp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function vp(e,t){let[r,n]=vt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new he(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ir(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ap(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Cp(e,t,i);return}if(n.hasField("select")){Rp(e,t);return}}if(r?.[Be(e.outputType.name)]){Sp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Cp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new he(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Rp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Hs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ir(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Sp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new he("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=vt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Tt;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ip(e,t){let r=Gs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Hs(n,e.outputType);break;case"include":$p(n,e.outputType);break;case"omit":Vp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ir(n)),i.join(" ")})}function kp(e,t){let r=Gs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Op(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),qp(n,e.arguments)),t.addErrorMessage(i=>js(i,r,e.arguments.map(o=>o.name)))}function Dp(e,t){let[r,n]=vt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ws(o,e.inputType)}t.addErrorMessage(o=>js(o,n,e.inputType.fields.map(s=>s.name)))}function js(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=jp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ir(e)),n.join(" ")}function _p(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=vt(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new he(o,s).makeRequired())}else{let f=e.inputTypes.map(Qs).join(" | ");a.addSuggestion(new he(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=vt(e.dependentArgumentPath);t.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function Qs(e){return e.kind==="list"?`${Qs(e.elementType)}[]`:e.name}function Mp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Lp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Np(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof re&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Up(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ws(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ir(i)),o.join(" ")})}function Fp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Hs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new he(r.name,"true"))}function $p(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new he(r.name,"true"))}function Vp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new he(r.name,"true"))}function qp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new he(r.name,r.typeNames.join(" | ")))}function Gs(e,t){let[r,n]=vt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ws(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new he(r.name,r.typeNames.join(" | ")))}function vt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ir({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Bp=3;function jp(e,t){let r=1/0,n;for(let i of t){let o=(0,Bs.default)(e,i);o>Bp||o`}};function At(e){return e instanceof or}c();u();p();m();d();l();var yn=Symbol(),ki=new WeakMap,Ne=class{constructor(t){t===yn?ki.set(this,`Prisma.${this._getName()}`):ki.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return ki.get(this)}},sr=class extends Ne{_getNamespace(){return"NullTypes"}},ar=class extends sr{#e};Oi(ar,"DbNull");var lr=class extends sr{#e};Oi(lr,"JsonNull");var cr=class extends sr{#e};Oi(cr,"AnyNull");var hn={classes:{DbNull:ar,JsonNull:lr,AnyNull:cr},instances:{DbNull:new ar(yn),JsonNull:new lr(yn),AnyNull:new cr(yn)}};function Oi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();u();p();m();d();l();var Js=": ",wn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Js.length}write(t){let r=new ke(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Js).write(this.value)}};var Di=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ct(e){return new Di(Ks(e))}function Ks(e){let t=new Tt;for(let[r,n]of Object.entries(e)){let i=new wn(r,zs(n));t.addField(i)}return t}function zs(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(bt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=cn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Ne?new re(`Prisma.${e._getName()}`):At(e)?new re(`prisma.${Be(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Qp(e):typeof e=="object"?Ks(e):new re(Object.prototype.toString.call(e))}function Qp(e){let t=new Pt;for(let r of e)t.addItem(zs(r));return t}function bn(e,t){let r=t==="pretty"?qs:fn,n=e.renderAllMessages(r),i=new Et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function En({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ct(e);for(let C of t)pn(C,a,s);let{message:f,args:h}=bn(a,r),A=un({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new ie(A,{clientVersion:o})}c();u();p();m();d();l();c();u();p();m();d();l();function Oe(e){return e.replace(/^./,t=>t.toLowerCase())}c();u();p();m();d();l();function Zs(e,t,r){let n=Oe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Hp({...e,...Ys(t.name,e,t.result.$allModels),...Ys(t.name,e,t.result[n])})}function Hp(e){let t=new Ie,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ht(e,n=>({...n,needs:r(n.name,new Set)}))}function Ys(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Gp(t,o,i)})):{}}function Gp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Xs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ea(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ie;modelExtensionsCache=new Ie;queryCallbacksCache=new Ie;clientExtensions=er(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=er(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Zs(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Oe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Rt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();u();p();m();d();l();var Pn=class{constructor(t){this.name=t}};function ta(e){return e instanceof Pn}function ra(e){return new Pn(e)}c();u();p();m();d();l();c();u();p();m();d();l();var na=Symbol(),ur=class{constructor(t){if(t!==na)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Tn:t}},Tn=new ur(na);function De(e){return e instanceof ur}var Wp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},ia="explicitly `undefined` values are not allowed";function vn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Rt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:A}){let C=new _i({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:A});return{modelName:e,action:Wp[t],query:pr(r,C)}}function pr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:sa(r,n),selection:Jp(e,t,i,n)}}function Jp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Zp(e,n)):Kp(n,t,r)}function Kp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&zp(n,t,e),Yp(n,r,e),n}function zp(e,t,r){for(let[n,i]of Object.entries(t)){if(De(i))continue;let o=r.nestSelection(n);if(Mi(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=pr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=pr(i,o)}}function Yp(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ea(i,n);for(let[s,a]of Object.entries(o)){if(De(a))continue;Mi(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Zp(e,t){let r={},n=t.getComputedFields(),i=Xs(e,n);for(let[o,s]of Object.entries(i)){if(De(s))continue;let a=t.nestSelection(o);Mi(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||De(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=pr({},a):r[o]=!0;continue}r[o]=pr(s,a)}}return r}function oa(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(wt(e)){if(cn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ta(e))return{$type:"Param",value:e.name};if(At(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Xp(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(em(e))return e.values;if(bt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ne){if(e!==hn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(tm(e))return e.toJSON();if(typeof e=="object")return sa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function sa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);De(i)||(i!==void 0?r[n]=oa(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:ia}))}return r}function Xp(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Be(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();u();p();m();d();l();function aa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var St=class{_client;constructor(t){this._client=t}prometheus(t){return aa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return aa(this._client),this._client._engine.metrics({format:"json",...t})}};c();u();p();m();d();l();function la(e,t){let r=er(()=>rm(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function rm(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();u();p();m();d();l();var Ni=new WeakMap,An="$$PrismaTypedSql",mr=class{constructor(t,r){Ni.set(this,{sql:t,values:r}),Object.defineProperty(this,An,{value:An})}get sql(){return Ni.get(this).sql}get values(){return Ni.get(this).values}};function ca(e){return(...t)=>new mr(e,t)}function Cn(e){return e!=null&&e[An]===An}c();u();p();m();d();l();var iu=Ce(xi());c();u();p();m();d();l();ua();ds();ws();c();u();p();m();d();l();var de=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();u();p();m();d();l();c();u();p();m();d();l();var Sn={enumerable:!0,configurable:!0,writable:!0};function In(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Sn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var da=Symbol.for("nodejs.util.inspect.custom");function Te(e,t){let r=nm(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=fa(Reflect.ownKeys(o),r),a=fa(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Sn,...f?.getPropertyDescriptor(s)}:Sn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[da]=function(){let o={...this};return delete o[da],o},i}function nm(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function fa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();u();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();u();p();m();d();l();function kt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();u();p();m();d();l();function ga(e){if(e===void 0)return"";let t=Ct(e);return new Et(0,{colors:fn}).write(t).toString()}c();u();p();m();d();l();var im="P2037";function kn({error:e,user_facing_error:t},r,n){return t.error_code?new z(om(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function om(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===im&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var $i=class{getLocation(){return null}};function Qe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ya={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=am(e);return Object.entries(t).reduce((n,[i,o])=>(ya[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function am(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function On(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ha(e,t){let r=On(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}c();u();p();m();d();l();function lm(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function cm(e={}){return typeof e.select=="object"?t=>On(e)(t)._count:t=>On(e)(t)._count._all}function wa(e,t){return t({action:"count",unpacker:cm(e),argsMapper:lm})(e)}c();u();p();m();d();l();function um(e={}){let t=Ot(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function pm(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ba(e,t){return t({action:"groupBy",unpacker:pm(e),argsMapper:um})(e)}function Ea(e,t,r){if(t==="aggregate")return n=>ha(n,r);if(t==="count")return n=>wa(n,r);if(t==="groupBy")return n=>ba(n,r)}c();u();p();m();d();l();function xa(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ds(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new or(e,o,s.type,s.isList,s.kind==="enum")},...In(Object.keys(n))})}c();u();p();m();d();l();c();u();p();m();d();l();var Pa=e=>Array.isArray(e)?e:e.split("."),Vi=(e,t)=>Pa(t).reduce((r,n)=>r&&r[n],e),Ta=(e,t,r)=>Pa(t).reduceRight((n,i,o,s)=>Object.assign({},Vi(e,s.slice(0,o)),{[i]:n}),r);function mm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function dm(e,t,r){return t===void 0?e??{}:Ta(t,r,e||!0)}function qi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Qe(e._errorFormat),A=mm(n,i),C=dm(f,o,A),S=r({dataPath:A,callsite:h})(C),R=fm(e,t);return new Proxy(S,{get(_,k){if(!R.includes(k))return _[k];let Ee=[a[k].type,r,k],ue=[A,C];return qi(e,...Ee,...ue)},...In([...R,...Object.getOwnPropertyNames(S)])})}}function fm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var gm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ym=["aggregate","count","groupBy"];function Bi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[hm(e,t),bm(e,t),dr(r),ce("name",()=>t),ce("$name",()=>t),ce("$parent",()=>e._appliedParent)];return Te({},n)}function hm(e,t){let r=Oe(t),n=Object.keys(tr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Qe(e._errorFormat);return e._createPrismaPromise(A=>{let C={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:h};return e._request({...C,...a})},{action:o,args:f,model:t})};return gm.includes(o)?qi(e,t,s):wm(i)?Ea(e,i,s):s({})}}}function wm(e){return ym.includes(e)}function bm(e,t){return et(ce("fields",()=>{let r=e._runtimeDataModel.models[t];return xa(t,r)}))}c();u();p();m();d();l();function va(e){return e.replace(/^./,t=>t.toUpperCase())}var ji=Symbol();function fr(e){let t=[Em(e),xm(e),ce(ji,()=>e),ce("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(dr(r)),Te(e,t)}function Em(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function xm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Oe),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=va(i);if(e._runtimeDataModel.models[o]!==void 0)return Bi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Bi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Aa(e){return e[ji]?e[ji]:e}function Ca(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return fr(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ra({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(A=>n[A]);h.length>0&&a.push(It(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(A=>!r[A]);h.length>0&&a.push(It(h))}Pm(e,f.needs)&&s.push(Tm(f,Te(e,s)))}return s.length>0||a.length>0?Te(e,[...s,...a]):e}function Pm(e,t){return t.every(r=>Ai(e,r))}function Tm(e,t){return et(ce(e.name,()=>e.compute(t)))}c();u();p();m();d();l();function Dn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};t[o]=Dn({visitor:i,result:t[o],args:h,modelName:f.type,runtimeDataModel:n})}}function Ia({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,h)=>{let A=Oe(f);return Ra({result:a,modelName:A,select:h.select,omit:h.select?void 0:{...o?.[A],...h.omit},extensions:n})}})}c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();var vm=["$connect","$disconnect","$on","$transaction","$use","$extends"],ka=vm;function Oa(e){if(e instanceof de)return Am(e);if(Cn(e))return Cm(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Oa(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ua(o,f),a.args=s,_a(e,a,r,n+1)}})})}function Ma(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return _a(e,t,s)}function La(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Na(r,n,0,e):e(r)}}function Na(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ua(i,f),Na(a,t,r+1,n)}})}var Da=e=>e;function Ua(e=Da,t=Da){return r=>e(t(r))}c();u();p();m();d();l();var Fa=K("prisma:client"),$a={Vercel:"vercel","Netlify CI":"netlify"};function Va({postinstall:e,ciName:t,clientVersion:r}){if(Fa("checkPlatformCaching:postinstall",e),Fa("checkPlatformCaching:ciName",t),e===!0&&t&&t in $a){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +"use strict";var gc=Object.create;var Kr=Object.defineProperty;var yc=Object.getOwnPropertyDescriptor;var hc=Object.getOwnPropertyNames;var wc=Object.getPrototypeOf,bc=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},Bo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of hc(t))!bc.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=yc(t,i))||n.enumerable});return e};var Ae=(e,t,r)=>(r=e!=null?gc(wc(e)):{},Bo(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e)),jo=e=>Bo(Kr({},"__esModule",{value:!0}),e);function ci(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Tc.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(w=0){return Y(w,"offset"),de(w,"offset"),ee(w,"offset",this.length-1),new DataView(this.buffer)[r[a]](w,f)},o=(a,f)=>function(w,A=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),I=Pc[C];return Y(A,"offset"),de(A,"offset"),ee(A,"offset",this.length-1),xc(w,"value",I[0],I[1]),new DataView(this.buffer)[r[a]](A,w,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Ho(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function zr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=Cc+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function Y(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function de(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function xc(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Qo(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Rc(e,t="utf8"){return h.from(e,t)}var h,Pc,Tc,vc,Ac,Cc,y,pi,u=ye(()=>{"use strict";h=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Qo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return ci(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return Ac.includes(t)}static compare(t,r){zr(t,"buff1"),zr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return ci(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Y(t,"offset"),de(t,"offset"),ee(t,"offset",this.length-1),Y(r,"byteLength"),de(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Y(r,"offset"),de(r,"offset"),ee(r,"offset",this.length-1),Y(n,"byteLength"),de(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,w)=>(i?w<=a:w>=a)&&this[w]===s[0]&&s.every((C,I)=>this[w+I]===C))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return vc.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+pi(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+pi(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");Ho(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Pc={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Tc=new TextEncoder,vc=new TextDecoder,Ac=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Cc=4294967295;Ec(h.prototype);y=new Proxy(Rc,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),pi=String.fromCodePoint});var g,x,c=ye(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ye(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ye(()=>{"use strict";E=()=>{};E.prototype=E});var d=ye(()=>{"use strict"});function Ko(e,t){var r,n,i,o,s,a,f,w,A=e.constructor,C=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),J?q(t,C):t;if(f=e.d,w=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=w.length):(n=w,i=s,a=f.length),s=Math.ceil(C/H),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=w.length,a-o<0&&(o=a,n=w,w=f,f=n),r=0;o;)r=(f[--o]=f[o]+w[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,J?q(t,C):t}function Re(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Ce(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(di+Z(e));if(!e.s)return new A(he);for(t==null?(J=!1,a=C):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),w+=5;for(n=Math.log(ze(2,w))/Math.LN10*2+5|0,a+=n,r=i=o=new A(he),A.precision=a;;){if(i=q(i.times(e),a),r=r.times(++f),s=o.plus(Me(i,r,a)),Ce(s.d).slice(0,a)===Ce(o.d).slice(0,a)){for(;w--;)o=q(o.times(o),a);return A.precision=C,t==null?(J=!0,q(o,C)):o}o=s}}function Z(e){for(var t=e.e*H,r=e.d[0];r>=10;r/=10)t++;return t}function mi(e,t,r){if(t>e.LN10.sd())throw J=!0,r&&(e.precision=r),Error(Ee+"LN10 precision limit exceeded");return q(new e(e.LN10),t)}function $e(e){for(var t="";e--;)t+="0";return t}function Wt(e,t){var r,n,i,o,s,a,f,w,A,C=1,I=10,R=e,L=R.d,k=R.constructor,M=k.precision;if(R.s<1)throw Error(Ee+(R.s?"NaN":"-Infinity"));if(R.eq(he))return new k(0);if(t==null?(J=!1,w=M):w=t,R.eq(10))return t==null&&(J=!0),mi(k,w);if(w+=I,k.precision=w,r=Ce(L),n=r.charAt(0),o=Z(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Ce(R.d),n=r.charAt(0),C++;o=Z(R),n>1?(R=new k("0."+r),o++):R=new k(n+"."+r.slice(1))}else return f=mi(k,w+2,M).times(o+""),R=Wt(new k(n+"."+r.slice(1)),w-I).plus(f),k.precision=M,t==null?(J=!0,q(R,M)):R;for(a=s=R=Me(R.minus(he),R.plus(he),w),A=q(R.times(R),w),i=3;;){if(s=q(s.times(A),w),f=a.plus(Me(s,new k(i),w)),Ce(f.d).slice(0,w)===Ce(a.d).slice(0,w))return a=a.times(2),o!==0&&(a=a.plus(mi(k,w+2,M).times(o+""))),a=Me(a,new k(C),w),k.precision=M,t==null?(J=!0,q(a,M)):a;a=f,i+=2}}function Go(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dt(r/H),e.d=[],n=(r+1)%H,r<0&&(n+=H),nYr||e.e<-Yr))throw Error(di+r)}else e.s=0,e.e=0,e.d=[0];return e}function q(e,t,r){var n,i,o,s,a,f,w,A,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=H,i=t,w=C[A=0];else{if(A=Math.ceil((n+1)/H),o=C.length,A>=o)return e;for(w=o=C[A],s=1;o>=10;o/=10)s++;n%=H,i=n-H+s}if(r!==void 0&&(o=ze(10,s-i-1),a=w/o%10|0,f=t<0||C[A+1]!==void 0||w%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?w/ze(10,s-i):0:C[A-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return f?(o=Z(e),C.length=1,t=t-o-1,C[0]=ze(10,(H-t%H)%H),e.e=dt(-t/H)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=A,o=1,A--):(C.length=A+1,o=ze(10,H-n),C[A]=i>0?(w/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(C[0]+=o)==te&&(C[0]=1,++e.e);break}else{if(C[A]+=o,C[A]!=te)break;C[A--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(J&&(e.e>Yr||e.e<-Yr))throw Error(di+Z(e));return e}function Yo(e,t){var r,n,i,o,s,a,f,w,A,C,I=e.constructor,R=I.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new I(e),J?q(t,R):t;if(f=e.d,C=t.d,n=t.e,w=e.e,f=f.slice(),s=w-n,s){for(A=s<0,A?(r=f,s=-s,a=C.length):(r=C,n=w,a=f.length),i=Math.max(Math.ceil(R/H),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=C.length,A=i0;--i)f[a++]=0;for(i=C.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+$e(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+$e(-i-1)+o,r&&(n=r-s)>0&&(o+=$e(n))):i>=s?(o+=$e(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+$e(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=$e(n))),e.s<0?"-"+o:o}function Jo(e,t){if(e.length>t)return e.length=t,!0}function Zo(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ye+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Go(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Sc.test(o))Go(s,o);else throw Error(Ye+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Zo,i.config=i.set=kc,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,Ic,fi,J,Ee,Ye,di,dt,ze,Sc,he,te,H,Wo,Yr,S,Me,fi,Zr,Xo=ye(()=>{"use strict";u();c();p();m();d();l();mt=1e9,Ic={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},J=!0,Ee="[DecimalError] ",Ye=Ee+"Invalid argument: ",di=Ee+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,Sc=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,H=7,Wo=9007199254740991,Yr=dt(Wo/H),S={};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};S.comparedTo=S.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*H;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(e){return Me(this,new this.constructor(e))};S.dividedToIntegerBy=S.idiv=function(e){var t=this,r=t.constructor;return q(Me(t,new r(e),0,1),r.precision)};S.equals=S.eq=function(e){return!this.cmp(e)};S.exponent=function(){return Z(this)};S.greaterThan=S.gt=function(e){return this.cmp(e)>0};S.greaterThanOrEqualTo=S.gte=function(e){return this.cmp(e)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(e){return this.cmp(e)<0};S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1};S.logarithm=S.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(he))throw Error(Ee+"NaN");if(r.s<1)throw Error(Ee+(r.s?"NaN":"-Infinity"));return r.eq(he)?new n(0):(J=!1,t=Me(Wt(r,o),Wt(e,o),o),J=!0,q(t,i))};S.minus=S.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yo(t,e):Ko(t,(e.s=-e.s,e))};S.modulo=S.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ee+"NaN");return r.s?(J=!1,t=Me(r,e,0,1).times(e),J=!0,r.minus(t)):q(new n(r),i)};S.naturalExponential=S.exp=function(){return zo(this)};S.naturalLogarithm=S.ln=function(){return Wt(this)};S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};S.plus=S.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ko(t,e):Yo(t,(e.s=-e.s,e))};S.precision=S.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=Z(i)+1,n=i.d.length-1,r=n*H+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};S.squareRoot=S.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(Ee+"NaN")}for(e=Z(a),J=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Ce(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(Me(a,o,s+2)).times(.5),Ce(o.d).slice(0,s)===(t=Ce(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(q(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return J=!0,q(n,r)};S.times=S.mul=function(e){var t,r,n,i,o,s,a,f,w,A=this,C=A.constructor,I=A.d,R=(e=new C(e)).d;if(!A.s||!e.s)return new C(0);for(e.s*=A.s,r=A.e+e.e,f=I.length,w=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*I[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,J?q(e,C.precision):e};S.toDecimalPlaces=S.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Re(e,0,mt),t===void 0?t=n.rounding:Re(t,0,8),q(r,e+Z(r)+1,t))};S.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Re(e,0,mt),t===void 0?t=i.rounding:Re(t,0,8),n=q(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};S.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Re(e,0,mt),t===void 0?t=o.rounding:Re(t,0,8),n=q(new o(i),e+Z(i)+1,t),r=Ze(n.abs(),!1,e+Z(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var e=this,t=e.constructor;return q(new t(e),Z(e)+1,t.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,w=12,A=+(e=new f(e));if(!e.s)return new f(he);if(a=new f(a),!a.s){if(e.s<1)throw Error(Ee+"Infinity");return a}if(a.eq(he))return a;if(n=f.precision,e.eq(he))return q(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Wo){for(i=new f(he),t=Math.ceil(n/H+4),J=!1;r%2&&(i=i.times(a),Jo(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),Jo(a.d,t);return J=!0,e.s<0?new f(he).div(i):q(i,n)}}else if(o<0)throw Error(Ee+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,J=!1,i=e.times(Wt(a,n+w)),J=!0,i=zo(i),i.s=o,i};S.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Z(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Re(e,1,mt),t===void 0?t=o.rounding:Re(t,0,8),i=q(new o(i),e,t),r=Z(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};S.toSignificantDigits=S.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Re(e,1,mt),t===void 0?t=n.rounding:Re(t,0,8)),q(new n(r),e,t)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Z(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};Me=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,w,A,C,I,R,L,k,M,_e,pe,B,me,Ke,ui,xe,Jr,Wr=n.constructor,fc=n.s==i.s?1:-1,ve=n.d,z=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(Ee+"Division by zero");for(f=n.e-i.e,xe=z.length,Ke=ve.length,R=new Wr(fc),L=R.d=[],w=0;z[w]==(ve[w]||0);)++w;if(z[w]>(ve[w]||0)&&--f,o==null?pe=o=Wr.precision:s?pe=o+(Z(n)-Z(i))+1:pe=o,pe<0)return new Wr(0);if(pe=pe/H+2|0,w=0,xe==1)for(A=0,z=z[0],pe++;(w1&&(z=e(z,A),ve=e(ve,A),xe=z.length,Ke=ve.length),me=xe,k=ve.slice(0,xe),M=k.length;M=te/2&&++ui;do A=0,a=t(z,k,xe,M),a<0?(_e=k[0],xe!=M&&(_e=_e*te+(k[1]||0)),A=_e/ui|0,A>1?(A>=te&&(A=te-1),C=e(z,A),I=C.length,M=k.length,a=t(C,k,I,M),a==1&&(A--,r(C,xe{"use strict";Xo();v=class extends Zr{static isDecimal(t){return t instanceof Zr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Zr(`0.${n.slice(0,t)}`)}}},ae=v});function Lc(){return!1}function bi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Uc(){return bi()}function Fc(){return[]}function Vc(e){e(null,[])}function $c(){return""}function qc(){return""}function Bc(){}function jc(){}function Qc(){}function Hc(){}function Gc(){}function Jc(){}function Wc(){}function Kc(){}function zc(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Yc(e,t){t(null,bi())}var Zc,Xc,ys,hs=ye(()=>{"use strict";u();c();p();m();d();l();Zc={},Xc={existsSync:Lc,lstatSync:bi,stat:Yc,statSync:Uc,readdirSync:Fc,readdir:Vc,readlinkSync:$c,realpathSync:qc,chmodSync:Bc,renameSync:jc,mkdirSync:Qc,rmdirSync:Hc,rmSync:Gc,unlinkSync:Jc,watchFile:Wc,unwatchFile:Kc,watch:zc,promises:Zc},ys=Xc});var ws=se(()=>{"use strict";u();c();p();m();d();l()});function ep(...e){return e.join("/")}function tp(...e){return e.join("/")}function rp(e){let t=bs(e),r=Es(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function bs(e){let t=e.split("/");return t[t.length-1]}function Es(e){return e.split("/").slice(0,-1).join("/")}function ip(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var xs,np,op,sp,rn,Ps=ye(()=>{"use strict";u();c();p();m();d();l();xs="/",np=":";op={sep:xs},sp={basename:bs,delimiter:np,dirname:Es,join:tp,normalize:ip,parse:rp,posix:op,resolve:ep,sep:xs},rn=sp});var Ts=se((eh,ap)=>{ap.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var xi={};pt(xi,{Hash:()=>Yt,createHash:()=>vs,default:()=>yt,randomFillSync:()=>sn,randomUUID:()=>on,webcrypto:()=>Zt});function on(){return globalThis.crypto.randomUUID()}function sn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function vs(e){return new Yt(e)}var Zt,Yt,yt,Xe=ye(()=>{"use strict";u();c();p();m();d();l();Zt=globalThis.crypto;Yt=class{#e=[];#t;constructor(t){this.#t=t}update(t){this.#e.push(t)}async digest(){let t=new Uint8Array(this.#e.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#e)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#t,t);return new Uint8Array(n)}},yt={webcrypto:Zt,randomUUID:on,randomFillSync:sn,createHash:vs,Hash:Yt}});var Pi=se((Gh,pp)=>{pp.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var As=se(an=>{"use strict";u();c();p();m();d();l();Object.defineProperty(an,"__esModule",{value:!0});an.enginesVersion=void 0;an.enginesVersion=Pi().prisma.enginesVersion});var Is=se((aw,Rs)=>{"use strict";u();c();p();m();d();l();Rs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Os=se((xw,ks)=>{"use strict";u();c();p();m();d();l();ks.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ai=se((Iw,Ds)=>{"use strict";u();c();p();m();d();l();var yp=Os();Ds.exports=e=>typeof e=="string"?e.replace(yp(),""):e});var _s=se((Bw,cn)=>{"use strict";u();c();p();m();d();l();cn.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};cn.exports.default=cn.exports});var Si=se((MP,Fs)=>{"use strict";u();c();p();m();d();l();Fs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();p();m();d();l()});var Qs=ye(()=>{"use strict";u();c();p();m();d();l()});var kn,fa=ye(()=>{"use strict";u();c();p();m();d();l();kn=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var eo=se(rt=>{"use strict";u();c();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Xi;rt.abytes=pl;rt.ahash=Ym;rt.aexists=Zm;rt.aoutput=Xm;function Xi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function zm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pl(e,...t){if(!zm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ym(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Xi(e.outputLen),Xi(e.blockLen)}function Zm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Xm(e,t){pl(e);let r=t.outputLen;if(e.length{"use strict";u();c();p();m();d();l();Object.defineProperty(_,"__esModule",{value:!0});_.add5L=_.add5H=_.add4H=_.add4L=_.add3H=_.add3L=_.rotlBL=_.rotlBH=_.rotlSL=_.rotlSH=_.rotr32L=_.rotr32H=_.rotrBL=_.rotrBH=_.rotrSL=_.rotrSH=_.shrSL=_.shrSH=_.toBig=void 0;_.fromBig=ro;_.split=ml;_.add=Cl;var Fn=BigInt(2**32-1),to=BigInt(32);function ro(e,t=!1){return t?{h:Number(e&Fn),l:Number(e>>to&Fn)}:{h:Number(e>>to&Fn)|0,l:Number(e&Fn)|0}}function ml(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);_.toBig=dl;var fl=(e,t,r)=>e>>>r;_.shrSH=fl;var gl=(e,t,r)=>e<<32-r|t>>>r;_.shrSL=gl;var yl=(e,t,r)=>e>>>r|t<<32-r;_.rotrSH=yl;var hl=(e,t,r)=>e<<32-r|t>>>r;_.rotrSL=hl;var wl=(e,t,r)=>e<<64-r|t>>>r-32;_.rotrBH=wl;var bl=(e,t,r)=>e>>>r-32|t<<64-r;_.rotrBL=bl;var El=(e,t)=>t;_.rotr32H=El;var xl=(e,t)=>e;_.rotr32L=xl;var Pl=(e,t,r)=>e<>>32-r;_.rotlSH=Pl;var Tl=(e,t,r)=>t<>>32-r;_.rotlSL=Tl;var vl=(e,t,r)=>t<>>64-r;_.rotlBH=vl;var Al=(e,t,r)=>e<>>64-r;_.rotlBL=Al;function Cl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Rl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);_.add3L=Rl;var Il=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;_.add3H=Il;var Sl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);_.add4L=Sl;var kl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;_.add4H=kl;var Ol=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);_.add5L=Ol;var Dl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;_.add5H=Dl;var ed={fromBig:ro,split:ml,toBig:dl,shrSH:fl,shrSL:gl,rotrSH:yl,rotrSL:hl,rotrBH:wl,rotrBL:bl,rotr32H:El,rotr32L:xl,rotlSH:Pl,rotlSL:Tl,rotlBH:vl,rotlBL:Al,add:Cl,add3L:Rl,add3H:Il,add4L:Sl,add4H:kl,add5H:Dl,add5L:Ol};_.default=ed});var Ml=se(Vn=>{"use strict";u();c();p();m();d();l();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.crypto=void 0;var He=(Xe(),jo(xi));Vn.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Ul=se(U=>{"use strict";u();c();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=td;U.u8=rd;U.u32=nd;U.createView=id;U.rotr=od;U.rotl=sd;U.byteSwap=oo;U.byteSwap32=ad;U.bytesToHex=ud;U.hexToBytes=cd;U.asyncLoop=md;U.utf8ToBytes=Ll;U.toBytes=$n;U.concatBytes=dd;U.checkOpts=fd;U.wrapConstructor=gd;U.wrapConstructorWithOpts=yd;U.wrapXOFConstructorWithOpts=hd;U.randomBytes=wd;var Mt=Ml(),io=eo();function td(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rd(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function nd(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function id(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function od(e,t){return e<<32-t|e>>>t}function sd(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function oo(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>oo(e);function ad(e){for(let t=0;tt.toString(16).padStart(2,"0"));function ud(e){(0,io.abytes)(e);let t="";for(let r=0;r=Ue._0&&e<=Ue._9)return e-Ue._0;if(e>=Ue.A&&e<=Ue.F)return e-(Ue.A-10);if(e>=Ue.a&&e<=Ue.f)return e-(Ue.a-10)}function cd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=pd;async function md(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update($n(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function yd(e){let t=(n,i)=>e(i).update($n(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function hd(e){let t=(n,i)=>e(i).update($n(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function wd(e=32){if(Mt.crypto&&typeof Mt.crypto.getRandomValues=="function")return Mt.crypto.getRandomValues(new Uint8Array(e));if(Mt.crypto&&typeof Mt.crypto.randomBytes=="function")return Mt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Hl=se(G=>{"use strict";u();c();p();m();d();l();Object.defineProperty(G,"__esModule",{value:!0});G.shake256=G.shake128=G.keccak_512=G.keccak_384=G.keccak_256=G.keccak_224=G.sha3_512=G.sha3_384=G.sha3_256=G.sha3_224=G.Keccak=void 0;G.keccakP=jl;var Nt=eo(),xr=_l(),Fe=Ul(),$l=[],ql=[],Bl=[],bd=BigInt(0),Er=BigInt(1),Ed=BigInt(2),xd=BigInt(7),Pd=BigInt(256),Td=BigInt(113);for(let e=0,t=Er,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],$l.push(2*(5*n+r)),ql.push((e+1)*(e+2)/2%64);let i=bd;for(let o=0;o<7;o++)t=(t<>xd)*Td)%Pd,t&Ed&&(i^=Er<<(Er<r>32?(0,xr.rotlBH)(e,t,r):(0,xr.rotlSH)(e,t,r),Vl=(e,t,r)=>r>32?(0,xr.rotlBL)(e,t,r):(0,xr.rotlSL)(e,t,r);function jl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,w=r[f],A=r[f+1],C=Fl(w,A,1)^r[a],I=Vl(w,A,1)^r[a+1];for(let R=0;R<50;R+=10)e[s+R]^=C,e[s+R+1]^=I}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=ql[s],f=Fl(i,o,a),w=Vl(i,o,a),A=$l[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=w}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=vd[n],e[1]^=Ad[n]}r.fill(0)}var Pr=class e extends Fe.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Nt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Fe.u32)(this.state)}keccak(){Fe.isLE||(0,Fe.byteSwap32)(this.state32),jl(this.state32,this.rounds),Fe.isLE||(0,Fe.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Nt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Fe.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Nt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Nt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};G.Keccak=Pr;var Ge=(e,t,r)=>(0,Fe.wrapConstructor)(()=>new Pr(t,e,r));G.sha3_224=Ge(6,144,224/8);G.sha3_256=Ge(6,136,256/8);G.sha3_384=Ge(6,104,384/8);G.sha3_512=Ge(6,72,512/8);G.keccak_224=Ge(1,144,224/8);G.keccak_256=Ge(1,136,256/8);G.keccak_384=Ge(1,104,384/8);G.keccak_512=Ge(1,72,512/8);var Ql=(e,t,r)=>(0,Fe.wrapXOFConstructorWithOpts)((n={})=>new Pr(t,e,n.dkLen===void 0?r:n.dkLen,!0));G.shake128=Ql(31,168,128/8);G.shake256=Ql(31,136,256/8)});var Xl=se((FN,Je)=>{"use strict";u();c();p();m();d();l();var{sha3_512:Cd}=Hl(),Jl=24,Tr=32,so=(e=4,t=Math.random)=>{let r="";for(;r.lengthWl(Cd(e)).toString(36).slice(1),Gl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),Rd=e=>Gl[Math.floor(e()*Gl.length)],zl=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+so(Tr,t):so(Tr,t);return Kl(n).substring(0,Tr)},Yl=e=>()=>e++,Id=476782367,Zl=({random:e=Math.random,counter:t=Yl(Math.floor(e()*Id)),length:r=Jl,fingerprint:n=zl({random:e})}={})=>function(){let o=Rd(e),s=Date.now().toString(36),a=t().toString(36),f=so(r,e),w=`${s+f+a+n}`;return`${o+Kl(w).substring(1,r)}`},Sd=Zl(),kd=(e,{minLength:t=2,maxLength:r=Tr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:Jl,bigLength:Tr});Je.exports.init=Zl;Je.exports.createId=Sd;Je.exports.bufToBigInt=Wl;Je.exports.createCounter=Yl;Je.exports.createFingerprint=zl;Je.exports.isCuid=kd});var eu=se((HN,vr)=>{"use strict";u();c();p();m();d();l();var{createId:Od,init:Dd,getConstants:_d,isCuid:Md}=Xl();vr.exports.createId=Od;vr.exports.init=Dd;vr.exports.getConstants=_d;vr.exports.isCuid=Md});var Gf={};pt(Gf,{DMMF:()=>ir,Debug:()=>K,Decimal:()=>ae,Extensions:()=>gi,MetricsClient:()=>Rt,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>ie,Public:()=>yi,Sql:()=>fe,createParam:()=>sa,defineDmmfProperty:()=>ma,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>ai,dmmfToRuntimeDataModel:()=>Us,empty:()=>ya,getPrismaClient:()=>pc,getRuntime:()=>Ot,join:()=>ga,makeStrictEnum:()=>mc,makeTypedQueryFactory:()=>da,objectEnumValues:()=>En,raw:()=>Fi,serializeJsonQuery:()=>Rn,skip:()=>Cn,sqltag:()=>Vi,warnEnvConflicts:()=>void 0,warnOnce:()=>tr});module.exports=jo(Gf);u();c();p();m();d();l();var gi={};pt(gi,{defineExtension:()=>es,getExtensionContext:()=>ts});u();c();p();m();d();l();u();c();p();m();d();l();function es(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();p();m();d();l();function ts(e){return e}var yi={};pt(yi,{validator:()=>rs});u();c();p();m();d();l();u();c();p();m();d();l();function rs(...e){return t=>t}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var hi,ns,is,os,ss=!0;typeof g<"u"&&({FORCE_COLOR:hi,NODE_DISABLE_COLORS:ns,NO_COLOR:is,TERM:os}=g.env||{},ss=g.stdout&&g.stdout.isTTY);var Oc={enabled:!ns&&is==null&&os!=="dumb"&&(hi!=null&&hi!=="0"||ss)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Oc.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Qg=j(0,0),Xr=j(1,22),en=j(2,22),Hg=j(3,23),tn=j(4,24),Gg=j(7,27),Jg=j(8,28),Wg=j(9,29),Kg=j(30,39),ft=j(31,39),as=j(32,39),ls=j(33,39),us=j(34,39),zg=j(35,39),cs=j(36,39),Yg=j(37,39),ps=j(90,39),Zg=j(90,39),Xg=j(40,49),ey=j(41,49),ty=j(42,49),ry=j(43,49),ny=j(44,49),iy=j(45,49),oy=j(46,49),sy=j(47,49);u();c();p();m();d();l();var Dc=100,ms=["green","yellow","blue","magenta","cyan","red"],Kt=[],ds=Date.now(),_c=0,wi=typeof g<"u"?g.env:{};globalThis.DEBUG??=wi.DEBUG??"";globalThis.DEBUG_COLORS??=wi.DEBUG_COLORS?wi.DEBUG_COLORS==="true":!0;var zt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Mc(e){let t={color:ms[_c++%ms.length],enabled:zt.enabled(e),namespace:e,log:zt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Kt.push([o,...n]),Kt.length>Dc&&Kt.shift(),zt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Nc(A)),w=`+${Date.now()-ds}ms`;ds=Date.now(),a(o,...f,w)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(Mc,{get:(e,t)=>zt[t],set:(e,t,r)=>zt[t]=r});function Nc(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function fs(e=7500){let t=Kt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.lengthfp,info:()=>dp,log:()=>mp,query:()=>gp,should:()=>Ss,tags:()=>Xt,warn:()=>vi});u();c();p();m();d();l();var Xt={error:ft("prisma:error"),warn:ls("prisma:warn"),info:cs("prisma:info"),query:us("prisma:query")},Ss={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function mp(...e){console.log(...e)}function vi(e,...t){Ss.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function dp(e,...t){console.info(`${Xt.info} ${e}`,...t)}function fp(e,...t){console.error(`${Xt.error} ${e}`,...t)}function gp(e,...t){console.log(`${Xt.query} ${e}`,...t)}u();c();p();m();d();l();function Ne(e,t){throw new Error(t)}u();c();p();m();d();l();function Ci(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();p();m();d();l();function pn(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();p();m();d();l();function Ri(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ms.has(e)||(Ms.add(e),vi(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};D(F,"PrismaClientInitializationError");u();c();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};D(X,"PrismaClientKnownRequestError");u();c();p();m();d();l();var le=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};D(le,"PrismaClientRustPanicError");u();c();p();m();d();l();var ne=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};D(ne,"PrismaClientUnknownRequestError");u();c();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};D(ie,"PrismaClientValidationError");u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Ie=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};u();c();p();m();d();l();function qe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();p();m();d();l();function Ls(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}u();c();p();m();d();l();function rr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}u();c();p();m();d();l();function Us(e){return{models:Ii(e.models),enums:Ii(e.enums),types:Ii(e.types)}}function Ii(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}u();c();p();m();d();l();function ht(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}u();c();p();m();d();l();l();function wt(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}u();c();p();m();d();l();u();c();p();m();d();l();var ir={};pt(ir,{ModelAction:()=>nr,datamodelEnumToSchemaEnum:()=>hp});u();c();p();m();d();l();u();c();p();m();d();l();function hp(e){return{name:e.name,values:e.values.map(t=>t.name)}}u();c();p();m();d();l();var nr=(B=>(B.findUnique="findUnique",B.findUniqueOrThrow="findUniqueOrThrow",B.findFirst="findFirst",B.findFirstOrThrow="findFirstOrThrow",B.findMany="findMany",B.create="create",B.createMany="createMany",B.createManyAndReturn="createManyAndReturn",B.update="update",B.updateMany="updateMany",B.updateManyAndReturn="updateManyAndReturn",B.upsert="upsert",B.delete="delete",B.deleteMany="deleteMany",B.groupBy="groupBy",B.count="count",B.aggregate="aggregate",B.findRaw="findRaw",B.aggregateRaw="aggregateRaw",B))(nr||{});var wp=Ae(Is());var bp={red:ft,gray:ps,dim:en,bold:Xr,underline:tn,highlightSource:e=>e.highlight()},Ep={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function xp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Pp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(Tp(t))),i){a.push("");let w=[i.toString()];o&&(w.push(o),w.push(s.dim(")"))),a.push(w.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Tp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function dn(e){let t=e.showColors?bp:Ep,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=xp(e),Pp(r,t)}u();c();p();m();d();l();var Gs=Ae(Si());u();c();p();m();d();l();function qs(e,t,r){let n=Bs(e),i=vp(n),o=Cp(i);o?fn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Bs(e){return e.errors.flatMap(t=>t.kind==="Union"?Bs(t):[t])}function vp(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ap(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ap(e,t){return[...new Set(e.concat(t))]}function Cp(e){return Ri(e,(t,r)=>{let n=Vs(t),i=Vs(r);return n!==i?n-i:$s(t)-$s(r)})}function Vs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function $s(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();p();m();d();l();var we=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};u();c();p();m();d();l();u();c();p();m();d();l();Qs();u();c();p();m();d();l();var bt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};js();u();c();p();m();d();l();u();c();p();m();d();l();var gn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();p();m();d();l();var yn=e=>e,hn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},Hs={bold:Xr,red:ft,green:as,dim:en,enabled:!0},Et={write(e){e.writeLine(",")}};u();c();p();m();d();l();var Se=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();p();m();d();l();var Be=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var xt=class extends Be{items=[];addItem(t){return this.items.push(new gn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Se("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Et,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Pt=class e extends Be{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof xt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Se("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(Et,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();p();m();d();l();var re=class extends Be{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Se(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();p();m();d();l();var or=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Et,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function fn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Rp(e,t);break;case"IncludeOnScalar":Ip(e,t);break;case"EmptySelection":Sp(e,t,r);break;case"UnknownSelectionField":_p(e,t);break;case"InvalidSelectionValue":Mp(e,t);break;case"UnknownArgument":Np(e,t);break;case"UnknownInputField":Lp(e,t);break;case"RequiredArgumentMissing":Up(e,t);break;case"InvalidArgumentType":Fp(e,t);break;case"InvalidArgumentValue":Vp(e,t);break;case"ValueTooLarge":$p(e,t);break;case"SomeFieldsMissing":qp(e,t);break;case"TooManyFieldsGiven":Bp(e,t);break;case"Union":qs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Rp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ip(e,t){let[r,n]=Tt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new we(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${sr(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Sp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){kp(e,t,i);return}if(n.hasField("select")){Op(e,t);return}}if(r?.[qe(e.outputType.name)]){Dp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function kp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new we(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Op(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ks(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${sr(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Dp(e,t){let r=new or;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new we("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Tt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Pt;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function _p(e,t){let r=zs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ks(n,e.outputType);break;case"include":jp(n,e.outputType);break;case"omit":Qp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(sr(n)),i.join(" ")})}function Mp(e,t){let r=zs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Np(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Hp(n,e.arguments)),t.addErrorMessage(i=>Js(i,r,e.arguments.map(o=>o.name)))}function Lp(e,t){let[r,n]=Tt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ys(o,e.inputType)}t.addErrorMessage(o=>Js(o,n,e.inputType.fields.map(s=>s.name)))}function Js(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Jp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(sr(e)),n.join(" ")}function Up(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Tt(e.argumentPath),s=new or,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new we(o,s).makeRequired())}else{let f=e.inputTypes.map(Ws).join(" | ");a.addSuggestion(new we(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=Tt(e.dependentArgumentPath);t.addErrorMessage(w=>`Argument \`${w.green(o)}\` is required because argument \`${w.green(f)}\` was provided.`)}}}function Ws(e){return e.kind==="list"?`${Ws(e.elementType)}[]`:e.name}function Fp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=wn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Vp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=wn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function $p(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof re&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function qp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ys(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${wn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(sr(i)),o.join(" ")})}function Bp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${wn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ks(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,"true"))}function jp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new we(r.name,"true"))}function Qp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new we(r.name,"true"))}function Hp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function zs(e,t){let[r,n]=Tt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ys(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Tt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function sr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function wn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Gp=3;function Jp(e,t){let r=1/0,n;for(let i of t){let o=(0,Gs.default)(e,i);o>Gp||o`}};function vt(e){return e instanceof ar}u();c();p();m();d();l();var bn=Symbol(),Oi=new WeakMap,Le=class{constructor(t){t===bn?Oi.set(this,`Prisma.${this._getName()}`):Oi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oi.get(this)}},lr=class extends Le{_getNamespace(){return"NullTypes"}},ur=class extends lr{#e};Di(ur,"DbNull");var cr=class extends lr{#e};Di(cr,"JsonNull");var pr=class extends lr{#e};Di(pr,"AnyNull");var En={classes:{DbNull:ur,JsonNull:cr,AnyNull:pr},instances:{DbNull:new ur(bn),JsonNull:new cr(bn),AnyNull:new pr(bn)}};function Di(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();p();m();d();l();var Zs=": ",xn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Zs.length}write(t){let r=new Se(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Zs).write(this.value)}};var _i=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function At(e){return new _i(Xs(e))}function Xs(e){let t=new Pt;for(let[r,n]of Object.entries(e)){let i=new xn(r,ea(n));t.addField(i)}return t}function ea(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(wt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Le?new re(`Prisma.${e._getName()}`):vt(e)?new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Wp(e):typeof e=="object"?Xs(e):new re(Object.prototype.toString.call(e))}function Wp(e){let t=new xt;for(let r of e)t.addItem(ea(r));return t}function Pn(e,t){let r=t==="pretty"?Hs:hn,n=e.renderAllMessages(r),i=new bt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Tn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let C of t)fn(C,a,s);let{message:f,args:w}=Pn(a,r),A=dn({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:w});throw new ie(A,{clientVersion:o})}u();c();p();m();d();l();u();c();p();m();d();l();function ke(e){return e.replace(/^./,t=>t.toLowerCase())}u();c();p();m();d();l();function ra(e,t,r){let n=ke(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Kp({...e,...ta(t.name,e,t.result.$allModels),...ta(t.name,e,t.result[n])})}function Kp(e){let t=new Ie,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return pn(e,n=>({...n,needs:r(n.name,new Set)}))}function ta(e,t,r){return r?pn(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:zp(t,o,i)})):{}}function zp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function na(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ia(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ie;modelExtensionsCache=new Ie;queryCallbacksCache=new Ie;clientExtensions=rr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=rr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ra(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ke(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();p();m();d();l();var An=class{constructor(t){this.name=t}};function oa(e){return e instanceof An}function sa(e){return new An(e)}u();c();p();m();d();l();u();c();p();m();d();l();var aa=Symbol(),mr=class{constructor(t){if(t!==aa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Cn:t}},Cn=new mr(aa);function Oe(e){return e instanceof mr}var Yp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},la="explicitly `undefined` values are not allowed";function Rn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A}){let C=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A});return{modelName:e,action:Yp[t],query:dr(r,C)}}function dr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:ca(r,n),selection:Zp(e,t,i,n)}}function Zp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),rm(e,n)):Xp(n,t,r)}function Xp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&em(n,t,e),tm(n,r,e),n}function em(e,t,r){for(let[n,i]of Object.entries(t)){if(Oe(i))continue;let o=r.nestSelection(n);if(Ni(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=dr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=dr(i,o)}}function tm(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ia(i,n);for(let[s,a]of Object.entries(o)){if(Oe(a))continue;Ni(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function rm(e,t){let r={},n=t.getComputedFields(),i=na(e,n);for(let[o,s]of Object.entries(i)){if(Oe(s))continue;let a=t.nestSelection(o);Ni(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||Oe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=dr({},a):r[o]=!0;continue}r[o]=dr(s,a)}}return r}function ua(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ht(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(oa(e))return{$type:"Param",value:e.name};if(vt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return nm(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(im(e))return e.values;if(wt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Le){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(om(e))return e.toJSON();if(typeof e=="object")return ca(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function ca(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Oe(i)||(i!==void 0?r[n]=ua(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:la}))}return r}function nm(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[qe(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ne(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();p();m();d();l();function pa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Rt=class{_client;constructor(t){this._client=t}prometheus(t){return pa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return pa(this._client),this._client._engine.metrics({format:"json",...t})}};u();c();p();m();d();l();function ma(e,t){let r=rr(()=>sm(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function sm(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();p();m();d();l();var Ui=new WeakMap,In="$$PrismaTypedSql",fr=class{constructor(t,r){Ui.set(this,{sql:t,values:r}),Object.defineProperty(this,In,{value:In})}get sql(){return Ui.get(this).sql}get values(){return Ui.get(this).values}};function da(e){return(...t)=>new fr(e,t)}function Sn(e){return e!=null&&e[In]===In}u();c();p();m();d();l();var cc=Ae(Pi());u();c();p();m();d();l();fa();hs();Ps();u();c();p();m();d();l();var fe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}u();c();p();m();d();l();u();c();p();m();d();l();var On={enumerable:!0,configurable:!0,writable:!0};function Dn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>On,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ha=Symbol.for("nodejs.util.inspect.custom");function Pe(e,t){let r=am(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=wa(Reflect.ownKeys(o),r),a=wa(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...On,...f?.getPropertyDescriptor(s)}:On:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ha]=function(){let o={...this};return delete o[ha],o},i}function am(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function wa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();p();m();d();l();function St(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();p();m();d();l();function ba(e){if(e===void 0)return"";let t=At(e);return new bt(0,{colors:hn}).write(t).toString()}u();c();p();m();d();l();var lm="P2037";function _n({error:e,user_facing_error:t},r,n){return t.error_code?new X(um(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ne(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function um(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===lm&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var $i=class{getLocation(){return null}};function je(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $i}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Ea={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function kt(e={}){let t=pm(e);return Object.entries(t).reduce((n,[i,o])=>(Ea[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function pm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Mn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function xa(e,t){let r=Mn(e);return t({action:"aggregate",unpacker:r,argsMapper:kt})(e)}u();c();p();m();d();l();function mm(e={}){let{select:t,...r}=e;return typeof t=="object"?kt({...r,_count:t}):kt({...r,_count:{_all:!0}})}function dm(e={}){return typeof e.select=="object"?t=>Mn(e)(t)._count:t=>Mn(e)(t)._count._all}function Pa(e,t){return t({action:"count",unpacker:dm(e),argsMapper:mm})(e)}u();c();p();m();d();l();function fm(e={}){let t=kt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function gm(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ta(e,t){return t({action:"groupBy",unpacker:gm(e),argsMapper:fm})(e)}function va(e,t,r){if(t==="aggregate")return n=>xa(n,r);if(t==="count")return n=>Pa(n,r);if(t==="groupBy")return n=>Ta(n,r)}u();c();p();m();d();l();function Aa(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ls(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new ar(e,o,s.type,s.isList,s.kind==="enum")},...Dn(Object.keys(n))})}u();c();p();m();d();l();u();c();p();m();d();l();var Ca=e=>Array.isArray(e)?e:e.split("."),qi=(e,t)=>Ca(t).reduce((r,n)=>r&&r[n],e),Ra=(e,t,r)=>Ca(t).reduceRight((n,i,o,s)=>Object.assign({},qi(e,s.slice(0,o)),{[i]:n}),r);function ym(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hm(e,t,r){return t===void 0?e??{}:Ra(t,r,e||!0)}function Bi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,w)=>({...f,[w.name]:w}),{});return f=>{let w=je(e._errorFormat),A=ym(n,i),C=hm(f,o,A),I=r({dataPath:A,callsite:w})(C),R=wm(e,t);return new Proxy(I,{get(L,k){if(!R.includes(k))return L[k];let _e=[a[k].type,r,k],pe=[A,C];return Bi(e,..._e,...pe)},...Dn([...R,...Object.getOwnPropertyNames(I)])})}}function wm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var bm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Em=["aggregate","count","groupBy"];function ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[xm(e,t),Tm(e,t),gr(r),ue("name",()=>t),ue("$name",()=>t),ue("$parent",()=>e._appliedParent)];return Pe({},n)}function xm(e,t){let r=ke(t),n=Object.keys(nr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let w=je(e._errorFormat);return e._createPrismaPromise(A=>{let C={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:w};return e._request({...C,...a})},{action:o,args:f,model:t})};return bm.includes(o)?Bi(e,t,s):Pm(i)?va(e,i,s):s({})}}}function Pm(e){return Em.includes(e)}function Tm(e,t){return et(ue("fields",()=>{let r=e._runtimeDataModel.models[t];return Aa(t,r)}))}u();c();p();m();d();l();function Ia(e){return e.replace(/^./,t=>t.toUpperCase())}var Qi=Symbol();function yr(e){let t=[vm(e),Am(e),ue(Qi,()=>e),ue("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Pe(e,t)}function vm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Am(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ke),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=Ia(i);if(e._runtimeDataModel.models[o]!==void 0)return ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Sa(e){return e[Qi]?e[Qi]:e}function ka(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return yr(t)}u();c();p();m();d();l();u();c();p();m();d();l();function Oa({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let w=f.needs.filter(A=>n[A]);w.length>0&&a.push(It(w))}else if(r){if(!r[f.name])continue;let w=f.needs.filter(A=>!r[A]);w.length>0&&a.push(It(w))}Cm(e,f.needs)&&s.push(Rm(f,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function Cm(e,t){return t.every(r=>Ci(e,r))}function Rm(e,t){return et(ue(e.name,()=>e.compute(t)))}u();c();p();m();d();l();function Nn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let w=typeof s=="object"?s:{};t[o]=Nn({visitor:i,result:t[o],args:w,modelName:f.type,runtimeDataModel:n})}}function _a({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Nn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,w)=>{let A=ke(f);return Oa({result:a,modelName:A,select:w.select,omit:w.select?void 0:{...o?.[A],...w.omit},extensions:n})}})}u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();var Im=["$connect","$disconnect","$on","$transaction","$extends"],Ma=Im;function Na(e){if(e instanceof fe)return Sm(e);if(Sn(e))return km(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Na(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=qa(o,f),a.args=s,Ua(e,a,r,n+1)}})})}function Fa(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ua(e,t,s)}function Va(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?$a(r,n,0,e):e(r)}}function $a(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=qa(i,f),$a(a,t,r+1,n)}})}var La=e=>e;function qa(e=La,t=La){return r=>e(t(r))}u();c();p();m();d();l();var Ba=K("prisma:client"),ja={Vercel:"vercel","Netlify CI":"netlify"};function Qa({postinstall:e,ciName:t,clientVersion:r}){if(Ba("checkPlatformCaching:postinstall",e),Ba("checkPlatformCaching:ciName",t),e===!0&&t&&t in ja){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${$a[t]}-build`;throw console.error(n),new F(n,r)}}c();u();p();m();d();l();function qa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();u();p();m();d();l();c();u();p();m();d();l();var Rm=()=>globalThis.process?.release?.name==="node",Sm=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Im=()=>!!globalThis.Deno,km=()=>typeof globalThis.Netlify=="object",Om=()=>typeof globalThis.EdgeRuntime=="object",Dm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _m(){return[[km,"netlify"],[Om,"edge-light"],[Dm,"workerd"],[Im,"deno"],[Sm,"bun"],[Rm,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Mm={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Dt(){let e=_m();return{id:e,prettyName:Mm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();u();p();m();d();l();c();u();p();m();d();l();var Qi=Ce(vi());c();u();p();m();d();l();function Ba(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}c();u();p();m();d();l();function ja(e){return e.split(` +Learn how: https://pris.ly/d/${ja[t]}-build`;throw console.error(n),new F(n,r)}}u();c();p();m();d();l();function Ha(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();p();m();d();l();u();c();p();m();d();l();var Om=()=>globalThis.process?.release?.name==="node",Dm=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,_m=()=>!!globalThis.Deno,Mm=()=>typeof globalThis.Netlify=="object",Nm=()=>typeof globalThis.EdgeRuntime=="object",Lm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Um(){return[[Mm,"netlify"],[Nm,"edge-light"],[Lm,"workerd"],[_m,"deno"],[Dm,"bun"],[Om,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Fm={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ot(){let e=Um();return{id:e,prettyName:Fm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();p();m();d();l();u();c();p();m();d();l();var Hi=Ae(Ai());u();c();p();m();d();l();function Ga(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}u();c();p();m();d();l();function Ja(e){return e.split(` `).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}c();u();p();m();d();l();var Qa=Ce(Is());function Ha({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Qa.default)({user:t,repo:r,template:n,title:e,body:i})}function Ga({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=us(6e3-(s?.length??0)),f=ja((0,Qi.default)(a)),h=n?`# Description +`)}u();c();p();m();d();l();var Wa=Ae(_s());function Ka({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Wa.default)({user:t,repo:r,template:n,title:e,body:i})}function za({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=fs(6e3-(s?.length??0)),f=Ja((0,Hi.default)(a)),w=n?`# Description \`\`\` ${n} -\`\`\``:"",A=(0,Qi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",A=(0,Hi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -25,7 +25,7 @@ ${n} | Query Engine | ${i?.padEnd(19)}| | Database | ${o?.padEnd(19)}| -${h} +${w} ## Logs \`\`\` @@ -44,40 +44,40 @@ ${f} ## Prisma Engine Query \`\`\` -${s?Ba(s):""} +${s?Ga(s):""} \`\`\` -`),C=Ha({title:r,body:A});return`${r} +`),C=Ka({title:r,body:A});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. -${en(C)} +${tn(C)} If you want the Prisma team to look into it, please open the link above \u{1F64F} To increase the chance of success, please post your schema and a snippet of how you used Prisma Client in the issue. -`}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();l();function H(e,t){throw new Error(t)}function Hi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Hi(e[r],t[r]))}function yr(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ne.isDecimal(e[o])||ne.isDecimal(t[o])){let s=Wa(e[o]),a=Wa(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Ja(e[o]),a=Ja(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Ka(e[o])?.getTime()===Ka(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return za(e[o])===za(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return Ya(e[o])===Ya(t[o])}return Hi(e[o],t[o])})}function Wa(e){return ne.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ne(e):void 0}function Ja(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Ka(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function za(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function Ya(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function hr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r instanceof Uint8Array?y.from(r).toString("base64"):r)}var J=class extends Error{name="DataMapperError"};function el(e,t,r){switch(t.type){case"AffectedRows":if(typeof e!="number")throw new J(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"Object":return Gi(e,t.fields,r);case"Value":return Wi(e,"",t.resultType,r);default:H(t,`Invalid data mapping type: '${t.type}'`)}}function Gi(e,t,r){if(e===null)return null;if(Array.isArray(e))return e.map(i=>Za(i,t,r));if(typeof e=="object")return Za(e,t,r);if(typeof e=="string"){let n;try{n=JSON.parse(e)}catch(i){throw new J("Expected an array or object, got a string that is not valid JSON",{cause:i})}return Gi(n,t,r)}throw new J(`Expected an array or an object, got: ${typeof e}`)}function Za(e,t,r){if(typeof e!="object")throw new J(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"AffectedRows":throw new J(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"Object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new J(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Gi(s,o.fields,r);break}case"Value":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=Wi(e[s],s,o.resultType,r);else throw new J(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:H(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function Wi(e,t,r,n){if(e===null)return r.type==="Array"?[]:null;switch(r.type){case"Any":return e;case"String":{if(typeof e!="string")throw new J(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"Int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new J(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new J(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new J(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"BigInt":{if(typeof e!="number"&&typeof e!="string")throw new J(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"Float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new J(`Expected a float in column '${t}', got string: ${e}`);return i}throw new J(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"Boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new J(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(e instanceof Uint8Array){for(let i of e)if(i!==0)return!0;return!1}throw new J(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"Decimal":if(typeof e!="number"&&typeof e!="string"&&!ne.isDecimal(e))throw new J(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"Date":{if(typeof e=="string")return{$type:"DateTime",value:Xa(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new J(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"Time":{if(typeof e=="string")return{$type:"DateTime",value:`1970-01-01T${Xa(e)}`};throw new J(`Expected a time in column '${t}', got ${typeof e}: ${e}`)}case"Array":return e.map((o,s)=>Wi(o,`${t}[${s}]`,r.inner,n));case"Object":return{$type:"Json",value:typeof e=="string"?e:hr(e)};case"Bytes":{if(typeof e=="string"&&e.startsWith("\\x"))return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new J(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`)}case"Enum":{let i=n[r.inner];if(i===void 0)throw new J(`Unknown enum '${r.inner}'`);let o=i[`${e}`];if(o===void 0)throw new J(`Unknown enum value '${e}' for enum '${r.inner}'`);return o}default:H(r,`DataMapper: Unknown result type: ${r.type}`)}}var Lm=/Z$|(?{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}c();u();p();m();d();l();var _e=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function tl(e){if(!bi(e))throw e;let t=Um(e),r=Fm(e);throw!t||!r?e:new _e(r,t,{driverAdapterError:e})}function Um(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:H(e.cause,`Unknown error: ${e.cause}`)}}function Fm(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Ji(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Ji(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Ji(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Invalid isolation level \`${e.cause.level}\``;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:H(e.cause,`Unknown error: ${e.cause}`)}}function Ji(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var rl=Ce(fs(),1);function $m(){try{return rl.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var nl=2,Vm=tt(g.pid.toString(36),nl),il=$m(),qm=il.length,Bm=tt(il.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+qm+36).toString(36),nl);function Ki(){return Vm+Bm}c();u();p();m();d();l();c();u();p();m();d();l();function Mn(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function zi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(zt.getRandomValues(nt),Lt=0),Lt+=e}function oo(e=21){kd(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Md(){return Ud()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function Ld(e,t){let r="";for(;e>0;e--)r=Dd(t)+r;return r}function Nd(e,t=Xl){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>Yl)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Yl}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%vr,n=Zl.charAt(r)+n,e=(e-r)/vr;return n}function Ud(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function ec(e,t){let r=t||_d(),n=!e||isNaN(e)?Date.now():e;return Nd(n,Xl)+Ld(Od,r)}c();u();p();m();d();l();c();u();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function Fn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}c();u();p();m();d();l();Xe();var Vn=new Uint8Array(256),$n=Vn.length;function Nt(){return $n>Vn.length-16&&(nn(Vn),$n=0),Vn.slice($n,$n+=16)}c();u();p();m();d();l();c();u();p();m();d();l();Xe();var so={randomUUID:rn};function Fd(e,t,r){if(so.randomUUID&&!t&&!e)return so.randomUUID();e=e||{};let n=e.random??e.rng?.()??Nt();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Fn(n)}var ao=Fd;c();u();p();m();d();l();var lo={};function $d(e,t,r){let n;if(e)n=tc(e.random??e.rng?.()??Nt(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Nt();Vd(lo,i,o),n=tc(o,lo.msecs,lo.seq,t,r)}return t??Fn(n)}function Vd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function tc(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var co=$d;var qn=class{#e={};constructor(){this.register("uuid",new mo),this.register("cuid",new fo),this.register("ulid",new go),this.register("nanoid",new yo),this.register("product",new ho)}snapshot(t){return Object.create(this.#e,{now:{value:t==="mysql"?new po:new uo}})}register(t,r){this.#e[t]=r}},uo=class{#e=new Date;generate(){return this.#e.toISOString()}},po=class{#e=new Date;generate(){return this.#e.toISOString().replace("T"," ").replace("Z","")}},mo=class{generate(t){if(t===4)return ao();if(t===7)return co();throw new Error("Invalid UUID generator arguments")}},fo=class{generate(t){if(t===1)return ol();if(t===2)return(0,rc.createId)();throw new Error("Invalid CUID generator arguments")}},go=class{generate(){return ec()}},yo=class{generate(t){if(typeof t=="number")return oo(t);if(t===void 0)return oo();throw new Error("Invalid Nanoid generator arguments")}},ho=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};c();u();p();m();d();l();c();u();p();m();d();l();function wo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function bo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function nc(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bytes"}function ic(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bigint"}function xo(e,t,r){let n=e.type;switch(n){case"rawSql":return sc(e.sql,oc(e.params,t,r));case"templateSql":return qd(e.fragments,e.placeholderFormat,oc(e.params,t,r));default:H(n,"Invalid query type")}}function oc(e,t,r){return e.map(n=>ve(n,t,r))}function ve(e,t,r){let n=e;for(;jd(n);)if(wo(n)){let i=t[n.prisma__value.name];if(i===void 0)throw new Error(`Missing value for query variable ${n.prisma__value.name}`);n=i}else if(bo(n)){let{name:i,args:o}=n.prisma__value,s=r[i];if(!s)throw new Error(`Encountered an unknown generator '${i}'`);n=s.generate(...o.map(a=>ve(a,t,r)))}else H(n,`Unexpected unevaluated value type: ${n}`);return Array.isArray(n)?n=n.map(i=>ve(i,t,r)):nc(n)?n=y.from(n.prisma__value,"base64"):ic(n)&&(n=BigInt(n.prisma__value)),n}function qd(e,t,r){let n=0,i=1,o=[],s=e.map(a=>{let f=a.type;switch(f){case"parameter":if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);return o.push(r[n++]),Eo(t,i++);case"stringChunk":return a.chunk;case"parameterTuple":{if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);let h=r[n++],A=Array.isArray(h)?h:[h];return`(${A.length==0?"NULL":A.map(S=>(o.push(S),Eo(t,i++))).join(",")})`}case"parameterTupleList":{if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);let h=r[n++];if(!Array.isArray(h))throw new Error("Malformed query template. Tuple list expected.");if(h.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");return h.map(C=>{if(!Array.isArray(C))throw new Error("Malformed query template. Tuple expected.");let S=C.map(R=>(o.push(R),Eo(t,i++))).join(a.itemSeparator);return`${a.itemPrefix}${S}${a.itemSuffix}`}).join(a.groupSeparator)}default:H(f,"Invalid fragment type")}}).join("");return sc(s,o)}function Eo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function sc(e,t){let r=t.map(n=>Bd(n));return{sql:e,args:t,argTypes:r}}function Bd(e){return typeof e=="string"?"Text":typeof e=="number"?"Numeric":typeof e=="boolean"?"Boolean":Array.isArray(e)?"Array":y.isBuffer(e)?"Bytes":"Unknown"}function jd(e){return wo(e)||bo(e)}c();u();p();m();d();l();function lc(e){let t=e.columnTypes.map(r=>{switch(r){case M.Bytes:return n=>Array.isArray(n)?new Uint8Array(n):n;default:return n=>n}});return e.rows.map(r=>r.map((n,i)=>t[i](n)).reduce((n,i,o)=>{let s=e.columnNames[o].split("."),a=n;for(let f=0;fac(n)).map(n=>{switch(n){case"bytes":return i=>Array.isArray(i)?new Uint8Array(i):i;case"int":return i=>i===null?null:typeof i=="number"?i:parseInt(`${i}`,10);case"bigint":return i=>i===null?null:typeof i=="bigint"?i:BigInt(`${i}`);case"json":return i=>typeof i=="string"?JSON.parse(i):i;case"bool":return i=>typeof i=="string"?i==="true"||i==="1":typeof i=="number"?i===1:i;default:return i=>i}});return{columns:e.columnNames,types:e.columnTypes.map(n=>ac(n)),rows:e.rows.map(n=>n.map((i,o)=>r[o](i)))}}function ac(e){switch(e){case M.Int32:return"int";case M.Int64:return"bigint";case M.Float:return"float";case M.Double:return"double";case M.Text:return"string";case M.Enum:return"enum";case M.Bytes:return"bytes";case M.Boolean:return"bool";case M.Character:return"char";case M.Numeric:return"decimal";case M.Json:return"json";case M.Uuid:return"uuid";case M.DateTime:return"datetime";case M.Date:return"date";case M.Time:return"time";case M.Int32Array:return"int-array";case M.Int64Array:return"bigint-array";case M.FloatArray:return"float-array";case M.DoubleArray:return"double-array";case M.TextArray:return"string-array";case M.EnumArray:return"string-array";case M.BytesArray:return"bytes-array";case M.BooleanArray:return"bool-array";case M.CharacterArray:return"char-array";case M.NumericArray:return"decimal-array";case M.JsonArray:return"json-array";case M.UuidArray:return"uuid-array";case M.DateTimeArray:return"datetime-array";case M.DateArray:return"date-array";case M.TimeArray:return"time-array";case M.UnknownNumber:return"unknown";case M.Set:return"string";default:H(e,`Unexpected column type: ${e}`)}}c();u();p();m();d();l();function uc(e,t,r){if(!t.every(n=>Po(e,n))){let n=Qd(e,r),i=Hd(r);throw new _e(n,i,r.context)}}function Po(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:H(t,`Unknown rule type: ${t.type}`)}}function Qd(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:H(t,`Unknown error identifier: ${t}`)}}function Hd(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:H(e,`Unknown error identifier: ${e}`)}}var Cr=class e{#e;#t;#r;#n=new qn;#o;#i;#s;#a;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a}){this.#e=t,this.#t=r,this.#r=n,this.#o=i,this.#i=o,this.#s=s??o,this.#a=a}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:lc,rawSerializer:cc,provider:t.provider})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#t,this.#n.snapshot(r.provider)).catch(i=>tl(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:ve(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!pc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(Ar(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>Me(s)+Me(a)):0}}case"execute":{let o=xo(t.args,n,i);return this.#l(o,r,async()=>({value:await r.executeRaw(o)}))}case"query":{let o=xo(t.args,n,i);return this.#l(o,r,async()=>{let s=await r.queryRaw(o);return t.args.type==="rawSql"?{value:this.#s(s),lastInsertId:s.lastInsertId}:{value:this.#i(s),lastInsertId:s.lastInsertId}})}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(pc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:dc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:Gd(o,a),lastInsertId:s}}case"transaction":{if(!this.#e.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#e.manager,s=await o.startTransaction(),a=o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:el(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return uc(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return Po(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=new Set(Ar(s));return{value:Ar(o).filter(f=>!a.has(f))}}case"distinctBy":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=new Set,f=[];for(let h of Ar(o)){let A=Bn(h,t.args.fields);a.has(A)||(a.add(A),f.push(h))}return{value:f,lastInsertId:s}}case"paginate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=Ar(o),f=t.args.pagination.linkingFields;if(f!==null){let h=new Map;for(let C of a){let S=Bn(C,f);h.has(S)||h.set(S,[]),h.get(S).push(C)}let A=Array.from(h.entries());return A.sort(([C],[S])=>CS?1:0),{value:A.flatMap(([,C])=>mc(C,t.args.pagination)),lastInsertId:s}}return{value:mc(a,t.args.pagination),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=Wd(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:To(o);for(let[f,h]of Object.entries(t.args.fields))a[f]=Jd(h,a[f],n,i);return{value:a,lastInsertId:s}}default:H(t,`Unexpected node type: ${t.type}`)}}#l(t,r,n){return _n({query:t,execute:n,provider:this.#a??r.provider,tracingHelper:this.#o,onQuery:this.#r})}};function pc(e){return Array.isArray(e)?e.length===0:e==null}function Ar(e){return Array.isArray(e)?e:[e]}function Me(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function To(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function dc(e,t){return Array.isArray(e)?e.map(r=>dc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function Gd(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=To(a),h=Bn(f,i);s[h]||(s[h]=[]),s[h].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Bn(To(a),o);for(let h of s[f]??[])r.isRelationUnique?h[r.parentField]=a:h[r.parentField].push(a)}}return e}function mc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>yr(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Bn(e,t){return JSON.stringify(t.map(r=>e[r]))}function Wd(e,t,r,n){switch(e.type){case"value":return ve(e.value,r,n);case"lastInsertId":return t;default:H(e,`Unexpected field initializer type: ${e.type}`)}}function Jd(e,t,r,n){switch(e.type){case"set":return ve(e.value,r,n);case"add":return Me(t)+Me(ve(e.value,r,n));case"subtract":return Me(t)-Me(ve(e.value,r,n));case"multiply":return Me(t)*Me(ve(e.value,r,n));case"divide":{let i=Me(t),o=Me(ve(e.value,r,n));return o===0?null:i/o}default:H(e,`Unexpected field operation type: ${e.type}`)}}c();u();p();m();d();l();c();u();p();m();d();l();async function Kd(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),Ei))}async function fc(){return(await Kd()).randomUUID()}c();u();p();m();d();l();var we=class extends _e{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Rr=class extends we{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},jn=class extends we{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Qn=class extends we{constructor(t){super(`Transaction is being closed: A ${t} cannot be executed on a closing transaction.`)}},Hn=class extends we{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Gn=class extends we{constructor(){super("Unable to start a transaction in the given time.")}},Wn=class extends we{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction`,{operation:t,timeout:r,timeTaken:n})}},Ut=class extends we{constructor(t){super(`Internal Consistency Error: ${t}`)}},Jn=class extends we{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var zd=100,Sr=K("prisma:client:transactionManager"),Yd=()=>({sql:"COMMIT",args:[],argTypes:[]}),Zd=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),Xd=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),ef=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),Ir=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#e;#t;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#e=i,this.#t=o}async startTransaction(t){return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(t))}async#r(t){let r=t!==void 0?this.validateOptions(t):this.transactionOptions,n={id:await fc(),status:"waiting",timer:void 0,timeout:r.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(n.id,n);let i=!1,o=setTimeout(()=>i=!0,r.maxWait);switch(n.transaction=await this.driverAdapter.startTransaction(r.isolationLevel),clearTimeout(o),n.status){case"waiting":if(i)throw await this.closeTransaction(n,"timed_out"),new Gn;return n.status="running",n.timer=this.startTransactionTimeout(n.id,r.timeout),{id:n.id};case"closing":case"timed_out":case"running":case"committed":case"rolled_back":throw new Ut(`Transaction in invalid state ${n.status} although it just finished startup.`);default:H(n.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.getActiveTransaction(t,"commit");await this.closeTransaction(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.getActiveTransaction(t,"rollback");await this.closeTransaction(r,"rolled_back")})}getTransaction(t,r){let n=this.getActiveTransaction(t.id,r);if(!n.transaction)throw new Rr;return n.transaction}getActiveTransaction(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Sr("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Ut("Active transaction found in closed transactions list.");case"committed":throw new jn(r);case"rolled_back":throw new Hn(r);case"timed_out":throw new Wn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Sr("Transaction not found.",t),new Rr}if(n.status==="closing")throw new Qn(r);if(["committed","rolled_back","timed_out"].includes(n.status))throw new Ut("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.closeTransaction(t,"rolled_back")))}startTransactionTimeout(t,r){let n=Date.now();return setTimeout(async()=>{Sr("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let i=this.transactions.get(t);i&&["running","waiting"].includes(i.status)?await this.closeTransaction(i,"timed_out"):Sr("Transaction already committed or rolled back when timeout happened.",t)},r)}async closeTransaction(t,r){Sr("Closing transaction.",{transactionId:t.id,status:r}),t.status="closing";try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#n(Xd(),t.transaction,()=>t.transaction.commit());else{let n=Yd();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#n(ef(),t.transaction,()=>t.transaction.rollback());else{let n=Zd();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>zd&&this.closedTransactions.shift()}}validateOptions(t){if(!t.timeout)throw new we("timeout is required");if(!t.maxWait)throw new we("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Jn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#n(t,r,n){return _n({query:t,execute:n,provider:this.#t??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#e})}};var Kn="6.13.0";c();u();p();m();d();l();var zn=class e{#e;#t;#r;constructor(t,r,n){this.#e=t,this.#t=r,this.#r=n}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new Ir({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#t.getConnectionInfo?.()??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#t.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#t;return await Cr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#e.onQuery,tracingHelper:this.#e.tracingHelper,provider:this.#e.provider}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#t.dispose()}}};c();u();p();m();d();l();c();u();p();m();d();l();var Yn=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function gc(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Yn.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!Yn.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Yn.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!Yn.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!rf(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function rf(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function yc(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=nf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let h=f.split("="),A=(h.shift()||"").trimStart().toLowerCase(),C=h.join("=");switch(A){case"expires":{a.expires=new Date(C);break}case"max-age":{a.maxAge=Number.parseInt(C,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=C;break}default:a[A]=C}}return a}function nf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}c();u();p();m();d();l();c();u();p();m();d();l();function Ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Dt().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. +`}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();l();function $(e,t){throw new Error(t)}function Gi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Gi(e[r],t[r]))}function Dt(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ae.isDecimal(e[o])||ae.isDecimal(t[o])){let s=Ya(e[o]),a=Ya(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Za(e[o]),a=Za(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Xa(e[o])?.getTime()===Xa(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return el(e[o])===el(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return tl(e[o])===tl(t[o])}return Gi(e[o],t[o])})}function Ya(e){return ae.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ae(e):void 0}function Za(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Xa(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function el(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function tl(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function wr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r instanceof Uint8Array?y.from(r).toString("base64"):r)}function Vm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function $m(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?Vm(e)?qm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:$m(e,Qe):e}function qm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new v(t);case"Json":return JSON.parse(t);default:$(t,"Unknown tagged value")}}u();c();p();m();d();l();var ce=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function _t(e){if(!nn(e))throw e;let t=Bm(e),r=rl(e);throw!t||!r?e:new ce(r,t,{driverAdapterError:e})}function Wi(e){throw nn(e)?new ce(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??rl(e)}\``,"P2010",{driverAdapterError:e}):e}function Bm(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function rl(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Ji(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Ji(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Ji(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Ji(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function nl(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Dt(s,i));if(o===-1)return t.expectNonEmpty?new ce("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}u();c();p();m();d();l();l();var W=class extends Error{name="DataMapperError"};function sl(e,t,r){switch(t.type){case"AffectedRows":if(typeof e!="number")throw new W(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"Object":return Ki(e,t.fields,r,t.skipNulls);case"Value":return zi(e,"",t.resultType,r);default:$(t,`Invalid data mapping type: '${t.type}'`)}}function Ki(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>il(o,t,r))}if(typeof e=="object")return il(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new W("Expected an array or object, got a string that is not valid JSON",{cause:o})}return Ki(i,t,r,n)}throw new W(`Expected an array or an object, got: ${typeof e}`)}function il(e,t,r){if(typeof e!="object")throw new W(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"AffectedRows":throw new W(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"Object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new W(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Ki(s,o.fields,r,o.skipNulls);break}case"Value":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=zi(e[s],s,o.resultType,r);else throw new W(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:$(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function zi(e,t,r,n){if(e===null)return r.type==="Array"?[]:null;switch(r.type){case"Any":return e;case"String":{if(typeof e!="string")throw new W(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"Int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new W(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new W(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new W(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"BigInt":{if(typeof e!="number"&&typeof e!="string")throw new W(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"Float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new W(`Expected a float in column '${t}', got string: ${e}`);return i}throw new W(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"Boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(e instanceof Uint8Array){for(let i of e)if(i!==0)return!0;return!1}throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"Decimal":if(typeof e!="number"&&typeof e!="string"&&!ae.isDecimal(e))throw new W(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"Date":{if(typeof e=="string")return{$type:"DateTime",value:ol(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new W(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"Time":{if(typeof e=="string")return{$type:"DateTime",value:`1970-01-01T${ol(e)}`};throw new W(`Expected a time in column '${t}', got ${typeof e}: ${e}`)}case"Array":return e.map((o,s)=>zi(o,`${t}[${s}]`,r.inner,n));case"Object":return{$type:"Json",value:wr(e)};case"Json":return{$type:"Json",value:`${e}`};case"Bytes":{if(typeof e=="string"&&e.startsWith("\\x"))return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new W(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`)}case"Enum":{let i=n[r.inner];if(i===void 0)throw new W(`Unknown enum '${r.inner}'`);let o=i[`${e}`];if(o===void 0)throw new W(`Value '${e}' not found in enum '${r.inner}'`);return o}default:$(r,`DataMapper: Unknown result type: ${r.type}`)}}var jm=/Z$|(?{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var al=Ae(ws(),1);function Hm(){try{return al.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var ll=2,Gm=tt(g.pid.toString(36),ll),ul=Hm(),Jm=ul.length,Wm=tt(ul.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+Jm+36).toString(36),ll);function Yi(){return Gm+Wm}u();c();p();m();d();l();u();c();p();m();d();l();function Un(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function Zi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(Zt.getRandomValues(nt),Lt=0),Lt+=e}function ao(e=21){Ld(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function $d(){return jd()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function qd(e,t){let r="";for(;e>0;e--)r=Fd(t)+r;return r}function Bd(e,t=iu){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>ru)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${ru}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Ar,n=nu.charAt(r)+n,e=(e-r)/Ar;return n}function jd(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function ou(e,t){let r=t||Vd(),n=!e||isNaN(e)?Date.now():e;return Bd(n,iu)+qd(Ud,r)}u();c();p();m();d();l();u();c();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function qn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}u();c();p();m();d();l();Xe();var jn=new Uint8Array(256),Bn=jn.length;function Ut(){return Bn>jn.length-16&&(sn(jn),Bn=0),jn.slice(Bn,Bn+=16)}u();c();p();m();d();l();u();c();p();m();d();l();Xe();var lo={randomUUID:on};function Qd(e,t,r){if(lo.randomUUID&&!t&&!e)return lo.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ut();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return qn(n)}var uo=Qd;u();c();p();m();d();l();var co={};function Hd(e,t,r){let n;if(e)n=su(e.random??e.rng?.()??Ut(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ut();Gd(co,i,o),n=su(o,co.msecs,co.seq,t,r)}return t??qn(n)}function Gd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function su(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var po=Hd;var Qn=class{#e={};constructor(){this.register("uuid",new go),this.register("cuid",new yo),this.register("ulid",new ho),this.register("nanoid",new wo),this.register("product",new bo)}snapshot(t){return Object.create(this.#e,{now:{value:t==="mysql"?new fo:new mo}})}register(t,r){this.#e[t]=r}},mo=class{#e=new Date;generate(){return this.#e.toISOString()}},fo=class{#e=new Date;generate(){return this.#e.toISOString().replace("T"," ").replace("Z","")}},go=class{generate(t){if(t===4)return uo();if(t===7)return po();throw new Error("Invalid UUID generator arguments")}},yo=class{generate(t){if(t===1)return cl();if(t===2)return(0,au.createId)();throw new Error("Invalid CUID generator arguments")}},ho=class{generate(){return ou()}},wo=class{generate(t){if(typeof t=="number")return ao(t);if(t===void 0)return ao();throw new Error("Invalid Nanoid generator arguments")}},bo=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};u();c();p();m();d();l();function Hn(e,t){return e==null?e:typeof e=="string"?Hn(JSON.parse(e),t):Array.isArray(e)?Wd(e,t):Jd(e,t)}function Jd(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Dt(e,i))return null}return uu(e,t.nested)}function uu(e,t){for(let[r,n]of Object.entries(t))e[r]=Hn(e[r],n);return e}function Wd(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=Kd(e,r)}return t.pagination&&(e=zd(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>uu(r,t.nested))}function Kd(e,t){let r=new Set,n=[];for(let i of e){let o=Cr(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function zd(e,t,r){if(r===null)return lu(e,t);let n=new Map;for(let o of e){let s=Cr(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>lu(o,t))}function lu(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Dt(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Cr(e,t){return JSON.stringify(t.map(r=>e[r]))}u();c();p();m();d();l();u();c();p();m();d();l();function Eo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function xo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function cu(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bytes"}function pu(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bigint"}function vo(e,t,r,n){let i=e.type,o=mu(e.params,t,r);switch(i){case"rawSql":return[du(e.sql,mu(e.params,t,r))];case"templateSql":return(e.chunkable?tf(e.fragments,o,n):[o]).map(a=>{if(n!==void 0&&a.length>n)throw new ce("The query parameter limit supported by your database is exceeded.","P2029");return Yd(e.fragments,e.placeholderFormat,a)});default:$(i,"Invalid query type")}}function mu(e,t,r){return e.map(n=>Te(n,t,r))}function Te(e,t,r){let n=e;for(;ef(n);)if(Eo(n)){let i=t[n.prisma__value.name];if(i===void 0)throw new Error(`Missing value for query variable ${n.prisma__value.name}`);n=i}else if(xo(n)){let{name:i,args:o}=n.prisma__value,s=r[i];if(!s)throw new Error(`Encountered an unknown generator '${i}'`);n=s.generate(...o.map(a=>Te(a,t,r)))}else $(n,`Unexpected unevaluated value type: ${n}`);return Array.isArray(n)?n=n.map(i=>Te(i,t,r)):cu(n)?n=y.from(n.prisma__value,"base64"):pu(n)&&(n=BigInt(n.prisma__value)),n}function Yd(e,t,r){let n="",i={placeholderNumber:1},o=[];for(let s of To(e,r))o.push(...fu(s)),n+=Zd(s,t,i);return du(n,o)}function Zd(e,t,r){let n=e.type;switch(n){case"parameter":return Po(t,r.placeholderNumber++);case"stringChunk":return e.chunk;case"parameterTuple":return`(${e.value.length==0?"NULL":e.value.map(()=>Po(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Po(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:$(n,"Invalid fragment type")}}function Po(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function du(e,t){let r=t.map(n=>Xd(n));return{sql:e,args:t,argTypes:r}}function Xd(e){return typeof e=="string"?"Text":typeof e=="number"?"Numeric":typeof e=="boolean"?"Boolean":Array.isArray(e)?"Array":y.isBuffer(e)?"Bytes":"Unknown"}function ef(e){return Eo(e)||xo(e)}function*To(e,t){let r=0;for(let n of e)switch(n.type){case"parameter":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...n,value:t[r++]};break}case"stringChunk":{yield n;break}case"parameterTuple":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let i=t[r++];yield{...n,value:Array.isArray(i)?i:[i]};break}case"parameterTupleList":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let i=t[r++];if(!Array.isArray(i))throw new Error("Malformed query template. Tuple list expected.");if(i.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let o of i)if(!Array.isArray(o))throw new Error("Malformed query template. Tuple expected.");yield{...n,value:i};break}}}function*fu(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function tf(e,t,r){let n=0,i=0;for(let s of To(e,t)){let a=0;for(let f of fu(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of To(e,t))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,f=[];if(r&&o.length===1&&a===i&&n>r&&n-af.map(A=>[...w,A]));break}case"parameterTupleList":{let a=s.value.reduce((C,I)=>C+I.length,0),f=[],w=[],A=0;for(let C of s.value)r&&o.length===1&&a===i&&w.length>0&&n-a+A+C.length>r&&(f.push(w),w=[],A=0),w.push(C),A+=C.length;w.length>0&&f.push(w),o=o.flatMap(C=>f.map(I=>[...C,I]));break}}return o}function rf(e,t){let r=[];for(let n=0;n{switch(r){case O.Bytes:return n=>Array.isArray(n)?new Uint8Array(n):n;default:return n=>n}});return e.rows.map(r=>r.map((n,i)=>t[i](n)).reduce((n,i,o)=>{let s=e.columnNames[o].split("."),a=n;for(let f=0;fnf(t)),rows:e.rows.map(t=>t.map((r,n)=>Ft(r,e.columnTypes[n])))}}function Ft(e,t){if(e===null)return null;switch(t){case O.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case O.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>Ft(r,O.Int32));case O.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case O.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>Ft(r,O.Int64));case O.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case O.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>Ft(r,O.Json));case O.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case O.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>Ft(r,O.Bytes));case O.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case O.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>Ft(r,O.Boolean));default:return e}}function nf(e){switch(e){case O.Int32:return"int";case O.Int64:return"bigint";case O.Float:return"float";case O.Double:return"double";case O.Text:return"string";case O.Enum:return"enum";case O.Bytes:return"bytes";case O.Boolean:return"bool";case O.Character:return"char";case O.Numeric:return"decimal";case O.Json:return"json";case O.Uuid:return"uuid";case O.DateTime:return"datetime";case O.Date:return"date";case O.Time:return"time";case O.Int32Array:return"int-array";case O.Int64Array:return"bigint-array";case O.FloatArray:return"float-array";case O.DoubleArray:return"double-array";case O.TextArray:return"string-array";case O.EnumArray:return"string-array";case O.BytesArray:return"bytes-array";case O.BooleanArray:return"bool-array";case O.CharacterArray:return"char-array";case O.NumericArray:return"decimal-array";case O.JsonArray:return"json-array";case O.UuidArray:return"uuid-array";case O.DateTimeArray:return"datetime-array";case O.DateArray:return"date-array";case O.TimeArray:return"time-array";case O.UnknownNumber:return"unknown";case O.Set:return"string";default:$(e,`Unexpected column type: ${e}`)}}u();c();p();m();d();l();function hu(e,t,r){if(!t.every(n=>Ao(e,n))){let n=of(e,r),i=sf(r);throw new ce(n,i,r.context)}}function Ao(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:$(t,`Unknown rule type: ${t.type}`)}}function of(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:$(t,`Unknown error identifier: ${t}`)}}function sf(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:$(e,`Unknown error identifier: ${e}`)}}var Rr=class e{#e;#t;#r;#n=new Qn;#o;#i;#u;#s;#l;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:f}){this.#e=t,this.#t=r,this.#r=n,this.#o=i,this.#i=o,this.#u=s??o,this.#s=a,this.#l=f}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:gu,rawSerializer:yu,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#t,this.#n.snapshot(r.provider)).catch(i=>_t(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:Te(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!wu(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(Co(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>De(s)+De(a)):0}}case"execute":{let o=vo(t.args,n,i,this.#a()),s=0;for(let a of o)s+=await this.#c(a,r,()=>r.executeRaw(a).catch(f=>t.args.type==="rawSql"?Wi(f):_t(f)));return{value:s}}case"query":{let o=vo(t.args,n,i,this.#a()),s;for(let a of o){let f=await this.#c(a,r,()=>r.queryRaw(a).catch(w=>t.args.type==="rawSql"?Wi(w):_t(w)));s===void 0?s=f:(s.rows.push(...f.rows),s.lastInsertId=f.lastInsertId)}return{value:t.args.type==="rawSql"?this.#u(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(wu(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:bu(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:af(o,a),lastInsertId:s}}case"transaction":{if(!this.#e.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#e.manager,s=await o.startTransaction(),a=o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:sl(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return hu(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return Ao(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=new Set(Co(s).map(f=>JSON.stringify(f)));return{value:Co(o).filter(f=>!a.has(JSON.stringify(f)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:Hn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=lf(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Ro(o);for(let[f,w]of Object.entries(t.args.fields))a[f]=uf(w,a[f],n,i);return{value:a,lastInsertId:s}}default:$(t,`Unexpected node type: ${t.type}`)}}#a(){return this.#l?.maxBindValues!==void 0?this.#l.maxBindValues:this.#p()}#p(){if(this.#s!==void 0)switch(this.#s){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:$(this.#s,`Unexpected provider: ${this.#s}`)}}#c(t,r,n){return Ln({query:t,execute:n,provider:this.#s??r.provider,tracingHelper:this.#o,onQuery:this.#r})}};function wu(e){return Array.isArray(e)?e.length===0:e==null}function Co(e){return Array.isArray(e)?e:[e]}function De(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Ro(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function bu(e,t){return Array.isArray(e)?e.map(r=>bu(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function af(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=Ro(a),w=Cr(f,i);s[w]||(s[w]=[]),s[w].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Cr(Ro(a),o);for(let w of s[f]??[])r.isRelationUnique?w[r.parentField]=a:w[r.parentField].push(a)}}return e}function lf(e,t,r,n){switch(e.type){case"value":return Te(e.value,r,n);case"lastInsertId":return t;default:$(e,`Unexpected field initializer type: ${e.type}`)}}function uf(e,t,r,n){switch(e.type){case"set":return Te(e.value,r,n);case"add":return De(t)+De(Te(e.value,r,n));case"subtract":return De(t)-De(Te(e.value,r,n));case"multiply":return De(t)*De(Te(e.value,r,n));case"divide":{let i=De(t),o=De(Te(e.value,r,n));return o===0?null:i/o}default:$(e,`Unexpected field operation type: ${e.type}`)}}u();c();p();m();d();l();u();c();p();m();d();l();async function cf(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),xi))}async function Eu(){return(await cf()).randomUUID()}u();c();p();m();d();l();var be=class extends ce{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Ir=class extends be{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Gn=class extends be{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Jn=class extends be{constructor(t){super(`Transaction is being closed: A ${t} cannot be executed on a closing transaction.`)}},Wn=class extends be{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Kn=class extends be{constructor(){super("Unable to start a transaction in the given time.")}},zn=class extends be{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},Vt=class extends be{constructor(t){super(`Internal Consistency Error: ${t}`)}},Yn=class extends be{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var pf=100,Sr=K("prisma:client:transactionManager"),mf=()=>({sql:"COMMIT",args:[],argTypes:[]}),df=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),ff=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),gf=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),kr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#e;#t;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#e=i,this.#t=o}async startTransaction(t){return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(t))}async#r(t){let r=t!==void 0?this.validateOptions(t):this.transactionOptions,n={id:await Eu(),status:"waiting",timer:void 0,timeout:r.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(n.id,n);let i=!1,o=setTimeout(()=>i=!0,r.maxWait);switch(n.transaction=await this.driverAdapter.startTransaction(r.isolationLevel).catch(_t),clearTimeout(o),n.status){case"waiting":if(i)throw await this.closeTransaction(n,"timed_out"),new Kn;return n.status="running",n.timer=this.startTransactionTimeout(n.id,r.timeout),{id:n.id};case"closing":case"timed_out":case"running":case"committed":case"rolled_back":throw new Vt(`Transaction in invalid state ${n.status} although it just finished startup.`);default:$(n.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.getActiveTransaction(t,"commit");await this.closeTransaction(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.getActiveTransaction(t,"rollback");await this.closeTransaction(r,"rolled_back")})}getTransaction(t,r){let n=this.getActiveTransaction(t.id,r);if(!n.transaction)throw new Ir;return n.transaction}getActiveTransaction(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Sr("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Vt("Active transaction found in closed transactions list.");case"committed":throw new Gn(r);case"rolled_back":throw new Wn(r);case"timed_out":throw new zn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Sr("Transaction not found.",t),new Ir}if(n.status==="closing")throw new Jn(r);if(["committed","rolled_back","timed_out"].includes(n.status))throw new Vt("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.closeTransaction(t,"rolled_back")))}startTransactionTimeout(t,r){let n=Date.now();return setTimeout(async()=>{Sr("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let i=this.transactions.get(t);i&&["running","waiting"].includes(i.status)?await this.closeTransaction(i,"timed_out"):Sr("Transaction already committed or rolled back when timeout happened.",t)},r)}async closeTransaction(t,r){Sr("Closing transaction.",{transactionId:t.id,status:r}),t.status="closing";try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#n(ff(),t.transaction,()=>t.transaction.commit());else{let n=mf();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#n(gf(),t.transaction,()=>t.transaction.rollback());else{let n=df();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>pf&&this.closedTransactions.shift()}}validateOptions(t){if(!t.timeout)throw new be("timeout is required");if(!t.maxWait)throw new be("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Yn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#n(t,r,n){return Ln({query:t,execute:n,provider:this.#t??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#e})}};var Zn="6.14.0";u();c();p();m();d();l();var Xn=class e{#e;#t;#r;#n;constructor(t,r,n){this.#e=t,this.#t=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new kr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#t.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#t;return await Rr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#e.onQuery,tracingHelper:this.#e.tracingHelper,provider:this.#e.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#t.dispose()}}};u();c();p();m();d();l();u();c();p();m();d();l();var ei=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function xu(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ei.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!ei.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ei.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!ei.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!hf(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function hf(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function Pu(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=wf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let w=f.split("="),A=(w.shift()||"").trimStart().toLowerCase(),C=w.join("=");switch(A){case"expires":{a.expires=new Date(C);break}case"max-age":{a.maxAge=Number.parseInt(C,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=C;break}default:a[A]=C}}return a}function wf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}u();c();p();m();d();l();u();c();p();m();d();l();function $t({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ot().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Zn=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var fe=class extends Zn{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};c();u();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends fe{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};O(st,"InvalidDatasourceError");function Xn(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=Ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==sn)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Pi(i)?"http:":"https:",h=new URL(i.href.replace(o,f));return{apiKey:a,url:h}}c();u();p();m();d();l();var hc=Ce(xs()),$t=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":hc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};c();u();p();m();d();l();function of(e){return e[0]*1e3+e[1]/1e6}function Vt(e){return new Date(of(e))}var wc=K("prisma:client:clientEngine:remoteExecutor"),ei=class{#e;#t;#r;#n;#o;constructor(t){this.#e=t.clientVersion,this.#n=t.logEmitter,this.#o=t.tracingHelper;let{url:r,apiKey:n}=Xn({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new vo(r),this.#t=new $t({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#t.build(),body:n,fetch:i});s.ok||await this.#s(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#a(a.extensions),a}async#s(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new z(s,{clientVersion:this.#e,code:n??"P6000",batchRequestIdx:r,meta:a})}#a(t){if(t.logs)for(let r of t.logs)this.#l(r);t.traces&&this.#o.dispatchEngineSpans(t.traces)}#l(t){switch(t.level){case"debug":case"trace":wc(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:Vt(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:Vt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},vo=class{#e;#t;#r;constructor(t){this.#e=t,this.#t=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#e),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return wc(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#o(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#t){if(o.expires&&o.expires0?r.join("; "):void 0}#o(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=yc(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#t.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};c();u();p();m();d();l();var Ao,bc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);return Ao===void 0&&(Ao=(async()=>{let n=await r.getRuntime(),i=await r.getQueryCompilerWasmModule();if(i==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let o={"./query_compiler_bg.js":n},s=new WebAssembly.Instance(i,o),a=s.exports.__wbindgen_start;return n.__wbg_set_wasm(s.exports),a(),n.QueryCompiler})()),await Ao}};var Ec="P2038",kr=K("prisma:client:clientEngine"),Pc=globalThis;Pc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new le(e,Kn)}};var Or=class{name="ClientEngine";#e;#t={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#o;constructor(t,r,n){if(!t.previewFeatures?.includes("driverAdapters")&&!r)throw new F("EngineType `client` requires the driverAdapters preview feature to be enabled.",t.clientVersion,Ec);if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},kr("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,Ec);this.#r=n??bc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#o=i=>{this.logEmitter.emit("query",{...i,params:hr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#t.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#s(),n=await this.#a(r)}catch(o){throw this.#t={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#t={type:"connected",engine:i},i});return this.#t={type:"connecting",promise:t},await t}case"connecting":return await this.#t.promise;case"connected":return this.#t.engine;case"disconnecting":return await this.#t.promise,await this.#i()}}async#s(){return this.#n.remote?new ei({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await zn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#o,provider:this.config.activeProvider})}async#a(t){let r=this.#e;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#e=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#p(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#l(o)}}#l(t){if(t instanceof le)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#c(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new le(xc(this,t.message,r),this.config.clientVersion);if(t instanceof _e)return new z(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ae(`${n.message} -${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#u(t){return t instanceof le?t:typeof t.message=="string"&&typeof t.code=="string"?new z(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):t}#p(t,r,n=!0){let i=Pc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#e=void 0,n&&this.stop().catch(s=>kr("failed to disconnect:",s)),new le(xc(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#t.type){case"disconnected":return;case"connecting":return await this.#t.promise,await this.stop();case"connected":{let t=this.#t.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#t={type:"disconnected"}}});return this.#t={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#t.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Pe(t,"Invalid transaction action.")}catch(s){throw this.#c(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){kr("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#c(f,i)}),a;try{a=this.#p(()=>s.compile(i),i)}catch(f){throw this.#u(f)}try{kr("query plan created",a);let f={},h=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return kr("query plan executed"),{data:{[t.action]:h}}}catch(f){throw this.#c(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(kt(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(h=>{throw this.#c(h,o)}),f;try{f=a.compileBatch(o)}catch(h){throw this.#u(h)}try{let h;r?.kind==="itx"&&(h=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let R=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;h=await this.transaction("start",{},R)}let C=[],S=!1;for(let[R,_]of f.plans.entries())try{let k=await s.execute({plan:_,placeholderValues:A,model:t[R].modelName,operation:t[R].action,batchIndex:R,transaction:h,customFetch:n?.(globalThis.fetch)});C.push({data:{[t[R].action]:k}})}catch(k){C.push(k),S=!0;break}return h!==void 0&&r?.kind!=="itx"&&(S?await this.transaction("rollback",{},h):await this.transaction("commit",{},h)),C}case"compacted":{if(!t.every(R=>R.action===i))throw new Error("All queries in a batch must have the same action");let C=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:h,customFetch:n?.(globalThis.fetch)});return this.#d(C,f,i)}}}catch(h){throw this.#c(h,o)}}metrics(t){throw new Error("Method not implemented.")}#d(t,r,n){let i=t.map(s=>r.keys.reduce((a,f)=>(a[f]=qe(s[f]),a),{})),o=new Set(r.nestedSelection);return r.arguments.map(s=>{let a=i.findIndex(f=>yr(f,s));if(a===-1)return r.expectNonEmpty?new z("An operation failed because it depends on one or more records that were required but not found",{code:"P2025",clientVersion:this.config.clientVersion}):{data:{[n]:null}};{let f=Object.entries(t[a]).filter(([h])=>o.has(h));return{data:{[n]:Object.fromEntries(f)}}}})}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new z(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}};function xc(e,t,r){return Ga({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}c();u();p();m();d();l();c();u();p();m();d();l();var qt=class extends fe{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};O(qt,"ForcedRetryError");c();u();p();m();d();l();var at=class extends fe{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};O(at,"NotImplementedYetError");c();u();p();m();d();l();c();u();p();m();d();l();var j=class extends fe{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends j{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};O(lt,"SchemaMissingError");c();u();p();m();d();l();c();u();p();m();d();l();var Co="This request could not be understood by the server",Dr=class extends j{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Co,N(t,!1)),n&&(this.code=n)}};O(Dr,"BadRequestError");c();u();p();m();d();l();var _r=class extends j{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};O(_r,"HealthcheckTimeoutError");c();u();p();m();d();l();var Mr=class extends j{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};O(Mr,"EngineStartupError");c();u();p();m();d();l();var Lr=class extends j{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};O(Lr,"EngineVersionNotSupportedError");c();u();p();m();d();l();var Ro="Request timed out",Nr=class extends j{name="GatewayTimeoutError";code="P5009";constructor(t,r=Ro){super(r,N(t,!1))}};O(Nr,"GatewayTimeoutError");c();u();p();m();d();l();var sf="Interactive transaction error",Ur=class extends j{name="InteractiveTransactionError";code="P5015";constructor(t,r=sf){super(r,N(t,!1))}};O(Ur,"InteractiveTransactionError");c();u();p();m();d();l();var af="Request parameters are invalid",Fr=class extends j{name="InvalidRequestError";code="P5011";constructor(t,r=af){super(r,N(t,!1))}};O(Fr,"InvalidRequestError");c();u();p();m();d();l();var So="Requested resource does not exist",$r=class extends j{name="NotFoundError";code="P5003";constructor(t,r=So){super(r,N(t,!1))}};O($r,"NotFoundError");c();u();p();m();d();l();var Io="Unknown server error",Bt=class extends j{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Io,N(t,!0)),this.logs=n}};O(Bt,"ServerError");c();u();p();m();d();l();var ko="Unauthorized, check your connection string",Vr=class extends j{name="UnauthorizedError";code="P5007";constructor(t,r=ko){super(r,N(t,!1))}};O(Vr,"UnauthorizedError");c();u();p();m();d();l();var Oo="Usage exceeded, retry again later",qr=class extends j{name="UsageExceededError";code="P5008";constructor(t,r=Oo){super(r,N(t,!0))}};O(qr,"UsageExceededError");async function lf(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Br(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await lf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Bt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Mr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new _r(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ur(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Fr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Vr(r,jt(ko,n));if(e.status===404)return new $r(r,jt(So,n));if(e.status===429)throw new qr(r,jt(Oo,n));if(e.status===504)throw new Nr(r,jt(Ro,n));if(e.status>=500)throw new Bt(r,jt(Io,n));if(e.status>=400)throw new Dr(r,jt(Co,n))}function jt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}c();u();p();m();d();l();function Tc(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}c();u();p();m();d();l();var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function vc(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,h,A;for(let C=0;C>18,a=(A&258048)>>12,f=(A&4032)>>6,h=A&63,r+=$e[s]+$e[a]+$e[f]+$e[h];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=$e[s]+$e[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=$e[s]+$e[a]+$e[f]+"="),r}c();u();p();m();d();l();function Ac(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}c();u();p();m();d();l();var Cc={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};c();u();p();m();d();l();c();u();p();m();d();l();var jr=class extends fe{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,N(r,!0))}};O(jr,"RequestError");async function ct(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new jr(a,{clientVersion:n,cause:s})}}var uf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Rc=K("prisma:client:dataproxyEngine");async function pf(e,t){let r=Cc["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&uf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,h]=s.split("."),A=mf(`<=${a}.${f}.${h}`),C=await ct(A,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let S=await C.text();Rc("length of body fetched from unpkg.com",S.length);let R;try{R=JSON.parse(S)}catch(_){throw console.error("JSON.parse error: body fetched from unpkg.com: ",S),_}return R.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Sc(e,t){let r=await pf(e,t);return Rc("version",r),r}function mf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ic=3,Qr=K("prisma:client:dataproxyEngine"),Hr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ac(t),this.config=t,this.env=t.env,this.inlineSchema=vc(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new $t({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Sc(this.host,this.config),Qr("host",this.host),Qr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Qr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Vt(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Vt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Qr("schema response status",r.status);let n=await Br(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=kt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Qr("graphql response status",a.status),await this.handleError(await Br(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Br(f,this.clientVersion));let h=await f.json(),{extensions:A}=h;A&&this.propagateResponseExtensions(A);let C=h.id,S=h["data-proxy"].endpoint;return{id:C,payload:{endpoint:S}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Br(a,this.clientVersion));let f=await a.json(),{extensions:h}=f;h&&this.propagateResponseExtensions(h);return}}})}getURLAndAPIKey(){return Xn({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof fe)||!i.isRetryable)throw i;if(r>=Ic)throw i instanceof qt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ic} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Tc(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new qt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?kn(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};c();u();p();m();d();l();function kc({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let L=k.join(` -`);o.push({_tag:"error",value:L})},f=!!e?.startsWith("prisma://"),h=an(e),A=!!t,C=f||h;!A&&r&&C&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let S=C||!r;A&&(S||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let R={accelerate:S,ppg:h,driverAdapters:A};function _(k){return k.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function Oc({copyEngine:e=!0},t){let r;try{r=Ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=kc({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let C of o.warnings)Xt(...C.value);if(!n){let C=o.errors[0];throw new ie(C.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",h=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;if(h)return new Or(t,A);if(i.accelerate)return new Hr(t);i.driverAdapters,i.accelerate;{let C=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Dt().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new ie(C.join(` -`),{clientVersion:t.clientVersion})}return"wasm-compiler-edge"}c();u();p();m();d();l();function ti({generator:e}){return e?.previewFeatures??[]}c();u();p();m();d();l();var Dc=e=>({command:e});c();u();p();m();d();l();c();u();p();m();d();l();var _c=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();u();p();m();d();l();l();function Qt(e){try{return Mc(e,"fast")}catch{return Mc(e,"slow")}}function Mc(e,t){return JSON.stringify(e.map(r=>Nc(r,t)))}function Nc(e,t){if(Array.isArray(e))return e.map(r=>Nc(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(wt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ne.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(df(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Uc(e):e}function df(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Uc(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Lc);let t={};for(let r of Object.keys(e))t[r]=Lc(e[r]);return t}function Lc(e){return typeof e=="bigint"?e.toString():Uc(e)}var ff=/^(\s*alter\s)/i,Fc=K("prisma:client");function Do(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&ff.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var ti=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ge=class extends ti{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};u();c();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends ge{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};D(st,"InvalidDatasourceError");function ri(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=$t({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==ln)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Ti(i)?"http:":"https:",w=new URL(i.href.replace(o,f));return{apiKey:a,url:w}}u();c();p();m();d();l();var Tu=Ae(As()),qt=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Tu.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};u();c();p();m();d();l();function bf(e){return e[0]*1e3+e[1]/1e6}function Bt(e){return new Date(bf(e))}var vu=K("prisma:client:clientEngine:remoteExecutor"),ni=class{#e;#t;#r;#n;#o;constructor(t){this.#e=t.clientVersion,this.#n=t.logEmitter,this.#o=t.tracingHelper;let{url:r,apiKey:n}=ri({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Io(r),this.#t=new qt({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#t.build(),body:n,fetch:i});s.ok||await this.#u(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#s(a.extensions),a}async#u(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new X(s,{clientVersion:this.#e,code:n??"P6000",batchRequestIdx:r,meta:a})}#s(t){if(t.logs)for(let r of t.logs)this.#l(r);t.traces&&this.#o.dispatchEngineSpans(t.traces)}#l(t){switch(t.level){case"debug":case"trace":vu(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:Bt(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:Bt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Io=class{#e;#t;#r;constructor(t){this.#e=t,this.#t=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#e),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return vu(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#o(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#t){if(o.expires&&o.expires0?r.join("; "):void 0}#o(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=Pu(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#t.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};u();c();p();m();d();l();var So,Au={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);return So===void 0&&(So=(async()=>{let n=await r.getRuntime(),i=await r.getQueryCompilerWasmModule();if(i==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let o={"./query_compiler_bg.js":n},s=new WebAssembly.Instance(i,o),a=s.exports.__wbindgen_start;return n.__wbg_set_wasm(s.exports),a(),n.QueryCompiler})()),await So}};var Cu="P2038",Or=K("prisma:client:clientEngine"),Iu=globalThis;Iu.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new le(e,Zn)}};var Dr=class{name="ClientEngine";#e;#t={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#o;constructor(t,r,n){if(!t.previewFeatures?.includes("driverAdapters")&&!r)throw new F("EngineType `client` requires the driverAdapters preview feature to be enabled.",t.clientVersion,Cu);if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Or("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,Cu);this.#r=n??Au,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#o=i=>{this.logEmitter.emit("query",{...i,params:wr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#t.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#u(),n=await this.#s(r)}catch(o){throw this.#t={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#t={type:"connected",engine:i},i});return this.#t={type:"connecting",promise:t},await t}case"connecting":return await this.#t.promise;case"connected":return this.#t.engine;case"disconnecting":return await this.#t.promise,await this.#i()}}async#u(){return this.#n.remote?new ni({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await Xn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#o,provider:this.config.activeProvider})}async#s(t){let r=this.#e;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#e=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#c(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#l(o)}}#l(t){if(t instanceof le)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#a(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new le(Ru(this,t.message,r),this.config.clientVersion);if(t instanceof ce)return new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ne(`${n.message} +${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof le?t:typeof t.message=="string"&&typeof t.code=="string"?new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new ne(t.message,{clientVersion:this.config.clientVersion}):t}#c(t,r,n=!0){let i=Iu.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#e=void 0,n&&this.stop().catch(s=>Or("failed to disconnect:",s)),new le(Ru(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#t.type){case"disconnected":return;case"connecting":return await this.#t.promise,await this.stop();case"connected":{let t=this.#t.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#t={type:"disconnected"}}});return this.#t={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#t.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Ne(t,"Invalid transaction action.")}catch(s){throw this.#a(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Or("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#a(f,i)}),a;try{a=this.#c(()=>s.compile(i),i)}catch(f){throw this.#p(f)}try{Or("query plan created",a);let f={},w=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Or("query plan executed"),{data:{[t.action]:w}}}catch(f){throw this.#a(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(St(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(w=>{throw this.#a(w,o)}),f;try{f=a.compileBatch(o)}catch(w){throw this.#p(w)}try{let w;r?.kind==="itx"&&(w=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let R=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;w=await this.transaction("start",{},R)}let C=[],I=!1;for(let[R,L]of f.plans.entries())try{let k=await s.execute({plan:L,placeholderValues:A,model:t[R].modelName,operation:t[R].action,batchIndex:R,transaction:w,customFetch:n?.(globalThis.fetch)});C.push({data:{[t[R].action]:k}})}catch(k){C.push(k),I=!0;break}return w!==void 0&&r?.kind!=="itx"&&(I?await this.transaction("rollback",{},w):await this.transaction("commit",{},w)),C}case"compacted":{if(!t.every(R=>R.action===i))throw new Error("All queries in a batch must have the same action");let C=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:w,customFetch:n?.(globalThis.fetch)});return nl(C,f).map(R=>({data:{[i]:R}}))}}}catch(w){throw this.#a(w,o)}}metrics(t){throw new Error("Method not implemented.")}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}};function Ru(e,t,r){return za({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}u();c();p();m();d();l();u();c();p();m();d();l();var jt=class extends ge{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};D(jt,"ForcedRetryError");u();c();p();m();d();l();var at=class extends ge{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};D(at,"NotImplementedYetError");u();c();p();m();d();l();u();c();p();m();d();l();var Q=class extends ge{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends Q{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};D(lt,"SchemaMissingError");u();c();p();m();d();l();u();c();p();m();d();l();var ko="This request could not be understood by the server",_r=class extends Q{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||ko,N(t,!1)),n&&(this.code=n)}};D(_r,"BadRequestError");u();c();p();m();d();l();var Mr=class extends Q{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};D(Mr,"HealthcheckTimeoutError");u();c();p();m();d();l();var Nr=class extends Q{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};D(Nr,"EngineStartupError");u();c();p();m();d();l();var Lr=class extends Q{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};D(Lr,"EngineVersionNotSupportedError");u();c();p();m();d();l();var Oo="Request timed out",Ur=class extends Q{name="GatewayTimeoutError";code="P5009";constructor(t,r=Oo){super(r,N(t,!1))}};D(Ur,"GatewayTimeoutError");u();c();p();m();d();l();var Ef="Interactive transaction error",Fr=class extends Q{name="InteractiveTransactionError";code="P5015";constructor(t,r=Ef){super(r,N(t,!1))}};D(Fr,"InteractiveTransactionError");u();c();p();m();d();l();var xf="Request parameters are invalid",Vr=class extends Q{name="InvalidRequestError";code="P5011";constructor(t,r=xf){super(r,N(t,!1))}};D(Vr,"InvalidRequestError");u();c();p();m();d();l();var Do="Requested resource does not exist",$r=class extends Q{name="NotFoundError";code="P5003";constructor(t,r=Do){super(r,N(t,!1))}};D($r,"NotFoundError");u();c();p();m();d();l();var _o="Unknown server error",Qt=class extends Q{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||_o,N(t,!0)),this.logs=n}};D(Qt,"ServerError");u();c();p();m();d();l();var Mo="Unauthorized, check your connection string",qr=class extends Q{name="UnauthorizedError";code="P5007";constructor(t,r=Mo){super(r,N(t,!1))}};D(qr,"UnauthorizedError");u();c();p();m();d();l();var No="Usage exceeded, retry again later",Br=class extends Q{name="UsageExceededError";code="P5008";constructor(t,r=No){super(r,N(t,!0))}};D(Br,"UsageExceededError");async function Pf(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Pf(e);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Qt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Nr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Mr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Fr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Vr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new qr(r,Ht(Mo,n));if(e.status===404)return new $r(r,Ht(Do,n));if(e.status===429)throw new Br(r,Ht(No,n));if(e.status===504)throw new Ur(r,Ht(Oo,n));if(e.status>=500)throw new Qt(r,Ht(_o,n));if(e.status>=400)throw new _r(r,Ht(ko,n))}function Ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}u();c();p();m();d();l();function Su(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}u();c();p();m();d();l();var Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ku(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,w,A;for(let C=0;C>18,a=(A&258048)>>12,f=(A&4032)>>6,w=A&63,r+=Ve[s]+Ve[a]+Ve[f]+Ve[w];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=Ve[s]+Ve[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=Ve[s]+Ve[a]+Ve[f]+"="),r}u();c();p();m();d();l();function Ou(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}u();c();p();m();d();l();var Du={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};u();c();p();m();d();l();u();c();p();m();d();l();var Qr=class extends ge{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,N(r,!0))}};D(Qr,"RequestError");async function ut(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Qr(a,{clientVersion:n,cause:s})}}var vf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,_u=K("prisma:client:dataproxyEngine");async function Af(e,t){let r=Du["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&vf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,w]=s.split("."),A=Cf(`<=${a}.${f}.${w}`),C=await ut(A,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let I=await C.text();_u("length of body fetched from unpkg.com",I.length);let R;try{R=JSON.parse(I)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",I),L}return R.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Mu(e,t){let r=await Af(e,t);return _u("version",r),r}function Cf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nu=3,Hr=K("prisma:client:dataproxyEngine"),Gr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ou(t),this.config=t,this.env=t.env,this.inlineSchema=ku(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new qt({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Mu(this.host,this.config),Hr("host",this.host),Hr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Hr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Bt(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Bt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ut(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hr("schema response status",r.status);let n=await jr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=St(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hr("graphql response status",a.status),await this.handleError(await jr(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await jr(f,this.clientVersion));let w=await f.json(),{extensions:A}=w;A&&this.propagateResponseExtensions(A);let C=w.id,I=w["data-proxy"].endpoint;return{id:C,payload:{endpoint:I}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await jr(a,this.clientVersion));let f=await a.json(),{extensions:w}=f;w&&this.propagateResponseExtensions(w);return}}})}getURLAndAPIKey(){return ri({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ge)||!i.isRetryable)throw i;if(r>=Nu)throw i instanceof jt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Nu} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Su(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new jt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_n(t[0],this.config.clientVersion,this.config.activeProvider):new ne(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};u();c();p();m();d();l();function Lu({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` +`);o.push({_tag:"error",value:M})},f=!!e?.startsWith("prisma://"),w=un(e),A=!!t,C=f||w;!A&&r&&C&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let I=C||!r;A&&(I||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let R={accelerate:I,ppg:w,driverAdapters:A};function L(k){return k.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function Uu({copyEngine:e=!0},t){let r;try{r=$t({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Lu({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let C of o.warnings)tr(...C.value);if(!n){let C=o.errors[0];throw new ie(C.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",w=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;if(w)return new Dr(t,A);if(i.accelerate)return new Gr(t);i.driverAdapters,i.accelerate;{let C=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ot().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new ie(C.join(` +`),{clientVersion:t.clientVersion})}return"wasm-compiler-edge"}u();c();p();m();d();l();function ii({generator:e}){return e?.previewFeatures??[]}u();c();p();m();d();l();var Fu=e=>({command:e});u();c();p();m();d();l();u();c();p();m();d();l();var Vu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();p();m();d();l();l();function Gt(e){try{return $u(e,"fast")}catch{return $u(e,"slow")}}function $u(e,t){return JSON.stringify(e.map(r=>Bu(r,t)))}function Bu(e,t){if(Array.isArray(e))return e.map(r=>Bu(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ht(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rf(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?ju(e):e}function Rf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ju(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(qu);let t={};for(let r of Object.keys(e))t[r]=qu(e[r]);return t}function qu(e){return typeof e=="bigint"?e.toString():ju(e)}var If=/^(\s*alter\s)/i,Qu=K("prisma:client");function Lo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&If.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var _o=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Cn(r))n=r.sql,i={values:Qt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=_c(r),i={values:Qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Fc(`prisma.${e}(${n}, ${i.values})`):Fc(`prisma.${e}(${n})`),{query:n,parameters:i}},$c={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new de(t,r)}},Vc={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();u();p();m();d();l();function Mo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=qc(r(s)):qc(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function qc(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();u();p();m();d();l();var gf=wi.split(".")[0],yf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Lo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${gf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??yf}};function Bc(){return new Lo}c();u();p();m();d();l();function jc(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();u();p();m();d();l();function Qc(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();u();p();m();d();l();var ri=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();u();p();m();d();l();var Gc=Ce(vi());c();u();p();m();d();l();function ni(e){return typeof e.batchRequestIdx=="number"}c();u();p();m();d();l();function Hc(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(No(e.query.arguments)),t.push(No(e.query.selection)),t.join("")}function No(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${No(n)})`:r}).join(" ")})`}c();u();p();m();d();l();var hf={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Uo(e){return hf[e]}c();u();p();m();d();l();var ii=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iut("bigint",r));case"bytes-array":return t.map(r=>ut("bytes",r));case"decimal-array":return t.map(r=>ut("decimal",r));case"datetime-array":return t.map(r=>ut("datetime",r));case"date-array":return t.map(r=>ut("date",r));case"time-array":return t.map(r=>ut("time",r));default:return t}}function oi(e){let t=[],r=wf(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(C=>Uo(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Ef(o),containsWrite:h,customDataProxyFetch:i})).map((C,S)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[S],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Wc(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Uo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Hc(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(bf(t),xf(t,i))throw t;if(t instanceof z&&Pf(t)){let h=Jc(t.meta);En({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=un({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let h=s?{modelName:s,...t.meta}:t.meta;throw new z(f,{code:t.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(f,this.client._clientVersion);if(t instanceof ae)throw new ae(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof le)throw new le(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Gc.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Vi(o,s),f=i==="queryRaw"?oi(a):qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Ef(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Wc(e)};Pe(e,"Unknown transaction kind")}}function Wc(e){return{id:e.id,payload:e.payload}}function xf(e,t){return ni(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Pf(e){return e.code==="P2009"||e.code==="P2012"}function Jc(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Jc)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();u();p();m();d();l();var Kc=Kn;c();u();p();m();d();l();var eu=Ce(Si());c();u();p();m();d();l();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};O($,"PrismaClientConstructorValidationError");var zc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Yc=["pretty","colorless","minimal"],Zc=["info","query","warn","error"],Tf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Ht(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new $('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ti(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(gt(t.generator)==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Yc.includes(e)){let t=Ht(e,Yc);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Zc.includes(r)){let n=Ht(r,Zc);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Ht(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Af(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(h=>h.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(Cf(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Ht(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function tu(e,t){for(let[r,n]of Object.entries(e)){if(!zc.includes(r)){let i=Ht(r,zc);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Tf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Ht(e,t){if(t.length===0||typeof e!="string")return"";let r=vf(e,t);return r?` Did you mean "${r}"?`:""}function vf(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,eu.default)(e,i)}));r.sort((i,o)=>i.distanceBe(n)===t);if(r)return e[r]}function Cf(e,t){let r=Ct(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=bn(r,"colorless");return`Error validating "omit" option: +`)}var Uo=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Sn(r))n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Gt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Vu(r),i={values:Gt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Qu(`prisma.${e}(${n}, ${i.values})`):Qu(`prisma.${e}(${n})`),{query:n,parameters:i}},Hu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new fe(t,r)}},Gu={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();p();m();d();l();function Fo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ju(r(s)):Ju(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ju(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();p();m();d();l();var Sf=Ei.split(".")[0],kf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Vo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Sf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??kf}};function Wu(){return new Vo}u();c();p();m();d();l();function Ku(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();p();m();d();l();function zu(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}u();c();p();m();d();l();var Zu=Ae(Ai());u();c();p();m();d();l();function oi(e){return typeof e.batchRequestIdx=="number"}u();c();p();m();d();l();function Yu(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push($o(e.query.arguments)),t.push($o(e.query.selection)),t.join("")}function $o(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${$o(n)})`:r}).join(" ")})`}u();c();p();m();d();l();var Of={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function qo(e){return Of[e]}u();c();p();m();d();l();var si=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ict("bigint",r));case"bytes-array":return t.map(r=>ct("bytes",r));case"decimal-array":return t.map(r=>ct("decimal",r));case"datetime-array":return t.map(r=>ct("datetime",r));case"date-array":return t.map(r=>ct("date",r));case"time-array":return t.map(r=>ct("time",r));default:return t}}function ai(e){let t=[],r=Df(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),w=n.some(C=>qo(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Mf(o),containsWrite:w,customDataProxyFetch:i})).map((C,I)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[I],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Xu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:qo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Yu(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(_f(t),Nf(t,i))throw t;if(t instanceof X&&Lf(t)){let w=ec(t.meta);Tn({args:o,errors:[w],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=dn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let w=s?{modelName:s,...t.meta}:t.meta;throw new X(f,{code:t.code,clientVersion:this.client._clientVersion,meta:w,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(f,this.client._clientVersion);if(t instanceof ne)throw new ne(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof le)throw new le(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Zu.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(w=>w!=="select"&&w!=="include"),a=qi(o,s),f=i==="queryRaw"?ai(a):Qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Mf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Xu(e)};Ne(e,"Unknown transaction kind")}}function Xu(e){return{id:e.id,payload:e.payload}}function Nf(e,t){return oi(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Lf(e){return e.code==="P2009"||e.code==="P2012"}function ec(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ec)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();p();m();d();l();var tc=Zn;u();c();p();m();d();l();var sc=Ae(Si());u();c();p();m();d();l();var V=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};D(V,"PrismaClientConstructorValidationError");var rc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],nc=["pretty","colorless","minimal"],ic=["info","query","warn","error"],Uf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Jt(r,t)||` Available datasources: ${t.join(", ")}`;throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new V(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ii(t).includes("driverAdapters"))throw new V('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(gt(t.generator)==="binary")throw new V('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!nc.includes(e)){let t=Jt(e,nc);throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ic.includes(r)){let n=Jt(r,ic);throw new V(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Jt(i,o);throw new V(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new V(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new V(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new V(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new V('"omit" option is expected to be an object.');if(e===null)throw new V('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Vf(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(w=>w.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new V($f(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Jt(r,t);throw new V(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ac(e,t){for(let[r,n]of Object.entries(e)){if(!rc.includes(r)){let i=Jt(r,rc);throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Uf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jt(e,t){if(t.length===0||typeof e!="string")return"";let r=Ff(e,t);return r?` Did you mean "${r}"?`:""}function Ff(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,sc.default)(e,i)}));r.sort((i,o)=>i.distanceqe(n)===t);if(r)return e[r]}function $f(e,t){let r=At(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Pn(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}c();u();p();m();d();l();function ru(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=A,a()},A=>{if(!ni(A)){f(A);return}A.batchRequestIdx===h?f(A):(i||(i=A),a())})})}var Je=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Rf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Sf=Symbol.for("prisma.client.transaction.id"),If={id:0,nextId(){return++this.id}};function ou(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new ri;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Mo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Va(e),n&&tu(n,e);let i=new Rn().on("error",()=>{});this._extensions=Rt.empty(),this._previewFeatures=ti(e),this._clientVersion=e.clientVersion??Kc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Bc();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&tn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&tn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},A=h.debug===!0;A&&K.enable("prisma:client");let C=tn.resolve(e.dirname,e.relativePath);ms.existsSync(C)||(C=e.dirname),Je("dirname",e.dirname),Je("relativePath",e.relativePath),Je("cwd",C);let S=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:S.allowTriggerPanic,prismaPath:S.binaryPath??void 0,engineEndpoint:S.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Qc(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:qa(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Ft,getBatchRequestPayload:kt,prismaGraphQLToJSError:kn,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:F,PrismaClientKnownRequestError:z,debug:K("prisma:client:accelerateEngine"),engineVersion:iu.version,clientVersion:e.clientVersion}},Je("clientVersion",e.clientVersion),this._engine=Oc(e,this._engineConfig),this._requestHandler=new si(this,i),f.log)for(let R of f.log){let _=typeof R=="string"?R:R.emit==="stdout"?R.level:null;_&&this.$on(_,k=>{Zt.log(`${Zt.tags[_]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=fr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ps()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:_o({clientMethod:i,activeProvider:a}),callsite:Qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=nu(n,i);return Do(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Do(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Dc,callsite:Qe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:_o({clientMethod:i,activeProvider:a}),callsite:Qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...nu(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=If.nextId(),s=jc(n.length),a=n.map((f,h)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:h,isolationLevel:A,lock:s};return f.requestTransaction?.(C)??f});return ru(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return Te(fr(Te(Aa(this),[ce("_appliedParent",()=>this._appliedParent._createItxClient(n)),ce("_createPrismaPromise",()=>Mo(n)),ce(Sf,()=>n.id)])),[It(ka)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Rf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async h=>{let A=this._middlewares.get(++a);if(A)return this._tracingHelper.runInChildSpan(s.middleware,L=>A(h,Ee=>(L?.end(),f(Ee))));let{runInTransaction:C,args:S,...R}=h,_={...n,...R};S&&(_.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&C===!1&&delete _.transaction;let k=await Ma(this,_);return _.model?Ia({result:k,modelName:_.model,args:_.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:A,unpacker:C,otelParentCtx:S,customDataProxyFetch:R}){try{n=h?h(n):n;let _={name:"serialize"},k=this._tracingHelper.runInChildSpan(_,()=>vn({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return K.enabled("prisma:client")&&(Je("Prisma Client call:"),Je(`prisma.${i}(${ga(n)})`),Je("Generated request:"),Je(JSON.stringify(k,null,2)+` -`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:C,otelParentCtx:S,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new St(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Ca}return t}function nu(e,t){return kf(e)?[new de(e,t),$c]:[e,Vc]}function kf(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();u();p();m();d();l();var Of=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function su(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Of.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();u();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}u();c();p();m();d();l();function lc(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=w=>{o||(o=!0,r(w))};for(let w=0;w{n[w]=A,a()},A=>{if(!oi(A)){f(A);return}A.batchRequestIdx===w?f(A):(i||(i=A),a())})})}var We=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Bf=Symbol.for("prisma.client.transaction.id"),jf={id:0,nextId(){return++this.id}};function pc(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Fo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Qa(e),n&&ac(n,e);let i=new kn().on("error",()=>{});this._extensions=Ct.empty(),this._previewFeatures=ii(e),this._clientVersion=e.clientVersion??tc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Wu();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},w=f.__internal??{},A=w.debug===!0;A&&K.enable("prisma:client");let C=rn.resolve(e.dirname,e.relativePath);ys.existsSync(C)||(C=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",C);let I=w.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:I.allowTriggerPanic,prismaPath:I.binaryPath??void 0,engineEndpoint:I.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&zu(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ha(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:$t,getBatchRequestPayload:St,prismaGraphQLToJSError:_n,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:F,PrismaClientKnownRequestError:X,debug:K("prisma:client:accelerateEngine"),engineVersion:cc.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=Uu(e,this._engineConfig),this._requestHandler=new li(this,i),f.log)for(let R of f.log){let L=typeof R=="string"?R:R.emit==="stdout"?R.level:null;L&&this.$on(L,k=>{er.log(`${er.tags[L]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{gs()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Uo({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=uc(n,i);return Lo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Lo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Fu,callsite:je(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Uo({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...uc(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=jf.nextId(),s=Ku(n.length),a=n.map((f,w)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:w,isolationLevel:A,lock:s};return f.requestTransaction?.(C)??f});return lc(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let w={kind:"itx",...a};f=await n(this._createItxClient(w)),await this._engine.transaction("commit",o,a)}catch(w){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),w}return f}_createItxClient(n){return Pe(yr(Pe(Sa(this),[ue("_appliedParent",()=>this._appliedParent._createItxClient(n)),ue("_createPrismaPromise",()=>Fo(n)),ue(Bf,()=>n.id)])),[It(Ma)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??qf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:w,args:A,...C}=f,I={...n,...C};A&&(I.args=i.middlewareArgsToRequestArgs(A)),n.transaction!==void 0&&w===!1&&delete I.transaction;let R=await Fa(this,I);return I.model?_a({result:R,modelName:I.model,args:I.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:w,transaction:A,unpacker:C,otelParentCtx:I,customDataProxyFetch:R}){try{n=w?w(n):n;let L={name:"serialize"},k=this._tracingHelper.runInChildSpan(L,()=>Rn({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return K.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${ba(n)})`),We("Generated request:"),We(JSON.stringify(k,null,2)+` +`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:C,otelParentCtx:I,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new Rt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ka}return t}function uc(e,t){return Qf(e)?[new fe(e,t),Hu]:[e,Gu]}function Qf(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();p();m();d();l();var Hf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function mc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Hf.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/src/generated/prisma/runtime/wasm-engine-edge.js b/src/generated/prisma/runtime/wasm-engine-edge.js index c7dc95c..0ca3b3b 100644 --- a/src/generated/prisma/runtime/wasm-engine-edge.js +++ b/src/generated/prisma/runtime/wasm-engine-edge.js @@ -1,35 +1,35 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var Xo=Object.create;var It=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.getPrototypeOf,rs=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),it=(t,e)=>{for(var r in e)It(t,r,{get:e[r],enumerable:!0})},pn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of es(e))!rs.call(t,i)&&i!==r&&It(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t};var ot=(t,e,r)=>(r=t!=null?Xo(ts(t)):{},pn(e||!t||!t.__esModule?It(r,"default",{value:t,enumerable:!0}):r,t)),ns=t=>pn(It({},"__esModule",{value:!0}),t);function Pr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new h(as.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new h([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new h(t.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(y=0){return $(y,"offset"),X(y,"offset"),j(y,"offset",this.length-1),new DataView(this.buffer)[r[a]](y,f)},o=(a,f)=>function(y,C=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=ss[R];return $(C,"offset"),X(C,"offset"),j(C,"offset",this.length-1),os(y,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](C,y,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function fn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Mt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function j(t,e,r=cs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function os(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function dn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function ms(t,e="utf8"){return h.from(t,e)}var h,ss,as,ls,us,cs,b,vr,u=ie(()=>{"use strict";h=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return dn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Pr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return us.includes(e)}static compare(e,r){Mt(e,"buff1"),Mt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Pr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){$(e,"offset"),X(e,"offset"),j(e,"offset",this.length-1),$(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){$(r,"offset"),X(r,"offset"),j(r,"offset",this.length-1),$(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){j(r,"targetStart"),j(n,"sourceStart",this.length),j(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,y)=>(i?y<=a:y>=a)&&this[y]===s[0]&&s.every((R,O)=>this[y+O]===R))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ls.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+vr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+vr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");fn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};ss={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},as=new TextEncoder,ls=new TextDecoder,us=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],cs=4294967295;is(h.prototype);b=new Proxy(ms,{construct(t,[e,r]){return h.from(e,r)},get(t,e){return h[e]}}),vr=String.fromCodePoint});var g,x,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,p=ie(()=>{"use strict";E=()=>{};E.prototype=E});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function bn(t,e){var r,n,i,o,s,a,f,y,C=t.constructor,R=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,R):e;if(f=t.d,y=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=y.length):(n=y,i=s,a=f.length),s=Math.ceil(R/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=y.length,a-o<0&&(o=a,n=y,y=f,f=n),r=0;o;)r=(f[--o]=f[o]+y[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,R):e}function me(t,e,r){if(t!==~~t||tr)throw Error(Ie+t)}function ce(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Cr+V(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=R):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),y+=5;for(n=Math.log(Oe(2,y))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(be(i,r,a)),ce(s.d).slice(0,a)===ce(o.d).slice(0,a)){for(;y--;)o=L(o.times(o),a);return C.precision=R,e==null?(q=!0,L(o,R)):o}o=s}}function V(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function Tr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function ve(t){for(var e="";t--;)e+="0";return e}function st(t,e){var r,n,i,o,s,a,f,y,C,R=1,O=10,A=t,I=A.d,k=A.constructor,M=k.precision;if(A.s<1)throw Error(oe+(A.s?"NaN":"-Infinity"));if(A.eq(te))return new k(0);if(e==null?(q=!1,y=M):y=e,A.eq(10))return e==null&&(q=!0),Tr(k,y);if(y+=O,k.precision=y,r=ce(I),n=r.charAt(0),o=V(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(t),r=ce(A.d),n=r.charAt(0),R++;o=V(A),n>1?(A=new k("0."+r),o++):A=new k(n+"."+r.slice(1))}else return f=Tr(k,y+2,M).times(o+""),A=st(new k(n+"."+r.slice(1)),y-O).plus(f),k.precision=M,e==null?(q=!0,L(A,M)):A;for(a=s=A=be(A.minus(te),A.plus(te),y),C=L(A.times(A),y),i=3;;){if(s=L(s.times(C),y),f=a.plus(be(s,new k(i),y)),ce(f.d).slice(0,y)===ce(a.d).slice(0,y))return a=a.times(2),o!==0&&(a=a.plus(Tr(k,y+2,M).times(o+""))),a=be(a,new k(R),y),k.precision=M,e==null?(q=!0,L(a,M)):a;a=f,i+=2}}function gn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Ne(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nDt||t.e<-Dt))throw Error(Cr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,y,C,R=t.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,y=R[C=0];else{if(C=Math.ceil((n+1)/N),o=R.length,C>=o)return t;for(y=o=R[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Oe(10,s-i-1),a=y/o%10|0,f=e<0||R[C+1]!==void 0||y%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?y/Oe(10,s-i):0:R[C-1])%10&1||r==(t.s<0?8:7))),e<1||!R[0])return f?(o=V(t),R.length=1,e=e-o-1,R[0]=Oe(10,(N-e%N)%N),t.e=Ne(-e/N)||0):(R.length=1,R[0]=t.e=t.s=0),t;if(n==0?(R.length=C,o=1,C--):(R.length=C+1,o=Oe(10,N-n),R[C]=i>0?(y/Oe(10,s-i)%Oe(10,i)|0)*o:0),f)for(;;)if(C==0){(R[0]+=o)==J&&(R[0]=1,++t.e);break}else{if(R[C]+=o,R[C]!=J)break;R[C--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(q&&(t.e>Dt||t.e<-Dt))throw Error(Cr+V(t));return t}function En(t,e){var r,n,i,o,s,a,f,y,C,R,O=t.constructor,A=O.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new O(t),q?L(e,A):e;if(f=t.d,R=e.d,n=e.e,y=t.e,f=f.slice(),s=y-n,s){for(C=s<0,C?(r=f,s=-s,a=R.length):(r=R,n=y,a=f.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,C=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ve(-i-1)+o,r&&(n=r-s)>0&&(o+=ve(n))):i>=s?(o+=ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ve(n))),t.s<0?"-"+o:o}function yn(t,e){if(t.length>e)return t.length=e,!0}function xn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ie+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return gn(s,o.toString())}else if(typeof o!="string")throw Error(Ie+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ds.test(o))gn(s,o);else throw Error(Ie+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=xn,i.config=i.set=fs,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ie+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ie+r+": "+n);return this}var Ue,ps,Rr,q,oe,Ie,Cr,Ne,Oe,ds,te,J,N,hn,Dt,S,be,Rr,_t,Pn=ie(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ps={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",Ie=oe+"Invalid argument: ",Cr=oe+"Exponent out of range: ",Ne=Math.floor,Oe=Math.pow,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,hn=9007199254740991,Dt=Ne(hn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return be(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(be(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return V(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=be(st(r,o),st(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?En(e,t):bn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=be(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return wn(this)};S.naturalLogarithm=S.ln=function(){return st(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?bn(e,t):En(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ie+t);if(e=V(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=V(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ce(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ne((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(be(a,o,s+2)).times(.5),ce(o.d).slice(0,s)===(e=ce(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,y,C=this,R=C.constructor,O=C.d,A=(t=new R(t)).d;if(!C.s||!t.s)return new R(0);for(t.s*=C.s,r=C.e+t.e,f=O.length,y=A.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+A[n]*O[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,R.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(me(t,0,Ue),e===void 0?e=n.rounding:me(e,0,8),L(r,t+V(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Me(n,!0):(me(t,0,Ue),e===void 0?e=i.rounding:me(e,0,8),n=L(new i(n),t+1,e),r=Me(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Me(i):(me(t,0,Ue),e===void 0?e=o.rounding:me(e,0,8),n=L(new o(i),t+V(i)+1,e),r=Me(n.abs(),!1,t+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),V(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,y=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=hn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),yn(i.d,e)),r=Ne(r/2),r!==0;)a=a.times(a),yn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(st(a,n+y)),q=!0,i=wn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=V(i),n=Me(i,r<=o.toExpNeg||r>=o.toExpPos)):(me(t,1,Ue),e===void 0?e=o.rounding:me(e,0,8),i=L(new o(i),t,e),r=V(i),n=Me(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(me(t,1,Ue),e===void 0?e=n.rounding:me(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=V(t),r=t.constructor;return Me(t,e<=r.toExpNeg||e>=r.toExpPos)};be=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%J|0,s=o/J|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,y,C,R,O,A,I,k,M,se,z,F,Y,ke,xr,ae,kt,Ot=n.constructor,Yo=n.s==i.s?1:-1,ue=n.d,B=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,ae=B.length,ke=ue.length,A=new Ot(Yo),I=A.d=[],y=0;B[y]==(ue[y]||0);)++y;if(B[y]>(ue[y]||0)&&--f,o==null?z=o=Ot.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,y=0,ae==1)for(C=0,B=B[0],z++;(y1&&(B=t(B,C),ue=t(ue,C),ae=B.length,ke=ue.length),Y=ae,k=ue.slice(0,ae),M=k.length;M=J/2&&++xr;do C=0,a=e(B,k,ae,M),a<0?(se=k[0],ae!=M&&(se=se*J+(k[1]||0)),C=se/xr|0,C>1?(C>=J&&(C=J-1),R=t(B,C),O=R.length,M=k.length,a=e(R,k,O,M),a==1&&(C--,r(R,ae{"use strict";Pn();T=class extends _t{static isDecimal(e){return e instanceof _t}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new _t(`0.${n.slice(0,e)}`)}}},pe=T});function Es(){return!1}function Ir(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xs(){return Ir()}function Ps(){return[]}function vs(t){t(null,[])}function Ts(){return""}function Cs(){return""}function Rs(){}function As(){}function Ss(){}function ks(){}function Os(){}function Is(){}function Ms(){}function Ds(){}function _s(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ls(t,e){e(null,Ir())}var Fs,Us,qn,Bn=ie(()=>{"use strict";u();c();m();p();d();l();Fs={},Us={existsSync:Es,lstatSync:Ir,stat:Ls,statSync:xs,readdirSync:Ps,readdir:vs,readlinkSync:Ts,realpathSync:Cs,chmodSync:Rs,renameSync:As,mkdirSync:Ss,rmdirSync:ks,rmSync:Os,unlinkSync:Is,watchFile:Ms,unwatchFile:Ds,watch:_s,promises:Fs},qn=Us});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=$n(t),r=Vn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function $n(t){let e=t.split("/");return e[e.length-1]}function Vn(t){return t.split("/").slice(0,-1).join("/")}function Vs(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var jn,$s,js,Qs,Nt,Qn=ie(()=>{"use strict";u();c();m();p();d();l();jn="/",$s=":";js={sep:jn},Qs={basename:$n,delimiter:$s,dirname:Vn,join:qs,normalize:Vs,parse:Bs,posix:js,resolve:Ns,sep:jn},Nt=Qs});var Jn=Fe((am,Js)=>{Js.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var zn=Fe((wp,Hn)=>{"use strict";u();c();m();p();d();l();Hn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Zn=Fe((Dp,Xn)=>{"use strict";u();c();m();p();d();l();Xn.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var ti=Fe((Bp,ei)=>{"use strict";u();c();m();p();d();l();var ta=Zn();ei.exports=t=>typeof t=="string"?t.replace(ta(),""):t});var $r=Fe((ih,si)=>{"use strict";u();c();m();p();d();l();si.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var pi=ie(()=>{"use strict";u();c();m();p();d();l()});var Fi=Fe((ov,Ka)=>{Ka.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,Ui=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var Zl={};it(Zl,{DMMF:()=>dt,Debug:()=>G,Decimal:()=>pe,Extensions:()=>Ar,MetricsClient:()=>Ze,PrismaClientInitializationError:()=>D,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>xe,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Sr,Sql:()=>ee,createParam:()=>Si,defineDmmfProperty:()=>_i,deserializeJsonResponse:()=>Ve,deserializeRawResult:()=>wr,dmmfToRuntimeDataModel:()=>oi,empty:()=>qi,getPrismaClient:()=>Ko,getRuntime:()=>Ae,join:()=>Ni,makeStrictEnum:()=>Ho,makeTypedQueryFactory:()=>Li,objectEnumValues:()=>zt,raw:()=>zr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>Yr,warnEnvConflicts:()=>void 0,warnOnce:()=>ct});module.exports=ns(Zl);u();c();m();p();d();l();var Ar={};it(Ar,{defineExtension:()=>vn,getExtensionContext:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function vn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function Tn(t){return t}var Sr={};it(Sr,{validator:()=>Cn});u();c();m();p();d();l();u();c();m();p();d();l();function Cn(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var kr,Rn,An,Sn,kn=!0;typeof g<"u"&&({FORCE_COLOR:kr,NODE_DISABLE_COLORS:Rn,NO_COLOR:An,TERM:Sn}=g.env||{},kn=g.stdout&&g.stdout.isTTY);var gs={enabled:!Rn&&An==null&&Sn!=="dumb"&&(kr!=null&&kr!=="0"||kn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!gs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Yu=U(0,0),Lt=U(1,22),Ft=U(2,22),Xu=U(3,23),On=U(4,24),Zu=U(7,27),ec=U(8,28),tc=U(9,29),rc=U(30,39),qe=U(31,39),In=U(32,39),Mn=U(33,39),Dn=U(34,39),nc=U(35,39),_n=U(36,39),ic=U(37,39),Ln=U(90,39),oc=U(90,39),sc=U(40,49),ac=U(41,49),lc=U(42,49),uc=U(43,49),cc=U(44,49),mc=U(45,49),pc=U(46,49),dc=U(47,49);u();c();m();p();d();l();var ys=100,Fn=["green","yellow","blue","magenta","cyan","red"],Ut=[],Un=Date.now(),hs=0,Or=typeof g<"u"?g.env:{};globalThis.DEBUG??=Or.DEBUG??"";globalThis.DEBUG_COLORS??=Or.DEBUG_COLORS?Or.DEBUG_COLORS==="true":!0;var at={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function bs(t){let e={color:Fn[hs++%Fn.length],enabled:at.enabled(t),namespace:t,log:at.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ut.push([o,...n]),Ut.length>ys&&Ut.shift(),at.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ws(C)),y=`+${Date.now()-Un}ms`;Un=Date.now(),a(o,...f,y)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(bs,{get:(t,e)=>at[e],set:(t,e,r)=>at[e]=r});function ws(t,e=2){let r=new Set;return JSON.stringify(t,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},e)}function Nn(){Ut.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Mr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Gs=Jn(),Dr=Gs.version;u();c();m();p();d();l();function Be(t){let e=Ws();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Ks(t))}function Ws(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Ks(t){return t?.previewFeatures.includes("queryCompiler")?"client":"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function _r(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function qt(t){return{ok:!0,value:t,map(e){return qt(e(t))},flatMap(e){return e(t)}}}function De(t){return{ok:!1,error:t,map(){return De(t)},flatMap(){return De(t)}}}var Gn=G("driver-adapter-utils"),Lr=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var Bt=(t,e=new Lr)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Hs(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=zs(e,t.getConnectionInfo.bind(t))),r},Hs=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return qt(await e(...r))}catch(n){if(Gn("[error@wrapAsync]",n),_r(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}function zs(t,e){return(...r)=>{try{return qt(e(...r))}catch(n){if(Gn("[error@wrapSync]",n),_r(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Wn="prisma+postgres",Kn=`${Wn}:`;function Fr(t){return t?.toString().startsWith(`${Kn}//`)??!1}var ut={};it(ut,{error:()=>Zs,info:()=>Xs,log:()=>Ys,query:()=>ea,should:()=>Yn,tags:()=>lt,warn:()=>Ur});u();c();m();p();d();l();var lt={error:qe("prisma:error"),warn:Mn("prisma:warn"),info:_n("prisma:info"),query:Dn("prisma:query")},Yn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Ys(...t){console.log(...t)}function Ur(t,...e){Yn.warn()&&console.warn(`${lt.warn} ${t}`,...e)}function Xs(t,...e){console.info(`${lt.info} ${t}`,...e)}function Zs(t,...e){console.error(`${lt.error} ${t}`,...e)}function ea(t,...e){console.log(`${lt.query} ${t}`,...e)}u();c();m();p();d();l();function $t(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Ee(t,e){throw new Error(e)}u();c();m();p();d();l();function Nr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function $e(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function qr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{ri.has(t)||(ri.add(t),Ur(e,...r))};var D=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(D,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var xe=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(xe,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();l();function Ve(t){return t===null?t:Array.isArray(t)?t.map(Ve):typeof t=="object"?ra(t)?na(t):t.constructor!==null&&t.constructor.name!=="Object"?t:$e(t,Ve):t}function ra(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function na({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new pe(e);case"Json":return JSON.parse(e);default:Ee(e,"Unknown tagged value")}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var de=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function Te(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ii(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function mt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function oi(t){return{models:Br(t.models),enums:Br(t.enums),types:Br(t.types)}}function Br(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function je(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Vt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function Qe(t){return T.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var dt={};it(dt,{ModelAction:()=>pt,datamodelEnumToSchemaEnum:()=>ia});u();c();m();p();d();l();u();c();m();p();d();l();function ia(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var pt=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(pt||{});var oa=ot(zn());var sa={red:qe,gray:Ln,dim:Ft,bold:Lt,underline:On,highlightSource:t=>t.highlight()},aa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function la({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function ua({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(ca(e))),i){a.push("");let y=[i.toString()];o&&(y.push(o),y.push(s.dim(")"))),a.push(y.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function ca(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function jt(t){let e=t.showColors?sa:aa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=la(t),ua(r,e)}u();c();m();p();d();l();var fi=ot($r());u();c();m();p();d();l();function ui(t,e,r){let n=ci(t),i=ma(n),o=da(i);o?Qt(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ci(t){return t.errors.flatMap(e=>e.kind==="Union"?ci(e):[e])}function ma(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:pa(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function pa(t,e){return[...new Set(t.concat(e))]}function da(t){return qr(t,(e,r)=>{let n=ai(e),i=ai(r);return n!==i?n-i:li(e)-li(r)})}function ai(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function li(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var ne=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();m();p();d();l();u();c();m();p();d();l();pi();u();c();m();p();d();l();var Je=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};mi();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},di={bold:Lt,red:qe,green:In,dim:Ft,enabled:!0},Ge={write(t){t.writeLine(",")}};u();c();m();p();d();l();var fe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Ce=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var We=class extends Ce{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new fe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(Ge,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ke=class t extends Ce{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof We&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new fe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(Ge,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Ce{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();m();p();d();l();var ft=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(Ge,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":fa(t,e);break;case"IncludeOnScalar":ga(t,e);break;case"EmptySelection":ya(t,e,r);break;case"UnknownSelectionField":Ea(t,e);break;case"InvalidSelectionValue":xa(t,e);break;case"UnknownArgument":Pa(t,e);break;case"UnknownInputField":va(t,e);break;case"RequiredArgumentMissing":Ta(t,e);break;case"InvalidArgumentType":Ca(t,e);break;case"InvalidArgumentValue":Ra(t,e);break;case"ValueTooLarge":Aa(t,e);break;case"SomeFieldsMissing":Sa(t,e);break;case"TooManyFieldsGiven":ka(t,e);break;case"Union":ui(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function fa(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ga(t,e){let[r,n]=He(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${gt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function ya(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ha(t,e,i);return}if(n.hasField("select")){ba(t,e);return}}if(r?.[Te(t.outputType.name)]){wa(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function ha(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ba(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),hi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${gt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wa(t,e){let r=new ft;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=He(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Ke;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function Ea(t,e){let r=bi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":hi(n,t.outputType);break;case"include":Oa(n,t.outputType);break;case"omit":Ia(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(gt(n)),i.join(" ")})}function xa(t,e){let r=bi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function Pa(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ma(n,t.arguments)),e.addErrorMessage(i=>gi(i,r,t.arguments.map(o=>o.name)))}function va(t,e){let[r,n]=He(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&wi(o,t.inputType)}e.addErrorMessage(o=>gi(o,n,t.inputType.fields.map(s=>s.name)))}function gi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=_a(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(gt(t)),n.join(" ")}function Ta(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=He(t.argumentPath),s=new ft,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(yi).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=He(t.dependentArgumentPath);e.addErrorMessage(y=>`Argument \`${y.green(o)}\` is required because argument \`${y.green(f)}\` was provided.`)}}}function yi(t){return t.kind==="list"?`${yi(t.elementType)}[]`:t.name}function Ca(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Ra(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Aa(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Sa(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&wi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(gt(i)),o.join(" ")})}function ka(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function hi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Oa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Ia(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function Ma(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function bi(t,e){let[r,n]=He(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function wi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function He(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function gt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Da=3;function _a(t,e){let r=1/0,n;for(let i of e){let o=(0,fi.default)(t,i);o>Da||o`}};function ze(t){return t instanceof yt}u();c();m();p();d();l();var Ht=Symbol(),jr=new WeakMap,Pe=class{constructor(e){e===Ht?jr.set(this,`Prisma.${this._getName()}`):jr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return jr.get(this)}},ht=class extends Pe{_getNamespace(){return"NullTypes"}},bt=class extends ht{#e};Qr(bt,"DbNull");var wt=class extends ht{#e};Qr(wt,"JsonNull");var Et=class extends ht{#e};Qr(Et,"AnyNull");var zt={classes:{DbNull:bt,JsonNull:wt,AnyNull:Et},instances:{DbNull:new bt(Ht),JsonNull:new wt(Ht),AnyNull:new Et(Ht)}};function Qr(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var Ei=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ei.length}write(e){let r=new fe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(Ei).write(this.value)}};var Jr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` -`)}};function Ye(t){return new Jr(xi(t))}function xi(t){let e=new Ke;for(let[r,n]of Object.entries(t)){let i=new Yt(r,Pi(n));e.addField(i)}return e}function Pi(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(Qe(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=Vt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof Pe?new W(`Prisma.${t._getName()}`):ze(t)?new W(`prisma.${Te(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?La(t):typeof t=="object"?xi(t):new W(Object.prototype.toString.call(t))}function La(t){let e=new We;for(let r of t)e.addItem(Pi(r));return e}function Xt(t,e){let r=e==="pretty"?di:Wt,n=t.renderAllMessages(r),i=new Je(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ye(t);for(let R of e)Qt(R,a,s);let{message:f,args:y}=Xt(a,r),C=jt({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:y});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function ge(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function Ti(t,e,r){let n=ge(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Fa({...t,...vi(e.name,t,e.result.$allModels),...vi(e.name,t,e.result[n])})}function Fa(t){let e=new de,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return $e(t,n=>({...n,needs:r(n.name,new Set)}))}function vi(t,e,r){return r?$e(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ua(e,o,i)})):{}}function Ua(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ci(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function Ri(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new de;modelExtensionsCache=new de;queryCallbacksCache=new de;clientExtensions=mt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=mt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Ti(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ge(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Xe=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ai(t){return t instanceof tr}function Si(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var ki=Symbol(),xt=class{constructor(e){if(e!==ki)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new xt(ki);function ye(t){return t instanceof xt}var Na={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Oi="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=Xe.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:y,globalOmit:C}){let R=new Gr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:y,globalOmit:C});return{modelName:t,action:Na[e],query:Pt(r,R)}}function Pt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Mi(r,n),selection:qa(t,e,i,n)}}function qa(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ja(t,n)):Ba(n,e,r)}function Ba(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&$a(n,e,t),Va(n,r,t),n}function $a(t,e,r){for(let[n,i]of Object.entries(e)){if(ye(i))continue;let o=r.nestSelection(n);if(Wr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=Pt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=Pt(i,o)}}function Va(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ri(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;Wr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function ja(t,e){let r={},n=e.getComputedFields(),i=Ci(t,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=e.nestSelection(o);Wr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=Pt({},a):r[o]=!0;continue}r[o]=Pt(s,a)}}return r}function Ii(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(je(t)){if(Vt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ai(t))return{$type:"Param",value:t.name};if(ze(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return Qa(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if(Ja(t))return t.values;if(Qe(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Pe){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Ga(t))return t.toJSON();if(typeof t=="object")return Mi(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Mi(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);ye(i)||(i!==void 0?r[n]=Ii(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Oi}))}return r}function Qa(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Te(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ee(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function Di(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Ze=class{_client;constructor(e){this._client=e}prometheus(e){return Di(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Di(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function _i(t,e){let r=mt(()=>Wa(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Wa(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Kr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Hr=new WeakMap,ir="$$PrismaTypedSql",vt=class{constructor(e,r){Hr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Hr.get(this).sql}get values(){return Hr.get(this).values}};function Li(t){return(...e)=>new vt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Wo=ot(Fi());u();c();m();p();d();l();Ui();Bn();Qn();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Bi=Symbol.for("nodejs.util.inspect.custom");function le(t,e){let r=Ha(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=$i(Reflect.ownKeys(o),r),a=$i(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Bi]=function(){let o={...this};return delete o[Bi],o},i}function Ha(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function $i(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function et(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function Vi(t){if(t===void 0)return"";let e=Ye(t);return new Je(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var za="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Ya(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Ya(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===za&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Xr=class{getLocation(){return null}};function Re(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Xr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ji={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function tt(t={}){let e=Za(t);return Object.entries(e).reduce((n,[i,o])=>(ji[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Za(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function Qi(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:tt})(t)}u();c();m();p();d();l();function el(t={}){let{select:e,...r}=t;return typeof e=="object"?tt({...r,_count:e}):tt({...r,_count:{_all:!0}})}function tl(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function Ji(t,e){return e({action:"count",unpacker:tl(t),argsMapper:el})(t)}u();c();m();p();d();l();function rl(t={}){let e=tt(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function nl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Gi(t,e){return e({action:"groupBy",unpacker:nl(t),argsMapper:rl})(t)}function Wi(t,e,r){if(e==="aggregate")return n=>Qi(n,r);if(e==="count")return n=>Ji(n,r);if(e==="groupBy")return n=>Gi(n,r)}u();c();m();p();d();l();function Ki(t,e){let r=e.fields.filter(i=>!i.relationName),n=ii(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new yt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Hi=t=>Array.isArray(t)?t:t.split("."),Zr=(t,e)=>Hi(e).reduce((r,n)=>r&&r[n],t),zi=(t,e,r)=>Hi(e).reduceRight((n,i,o,s)=>Object.assign({},Zr(t,s.slice(0,o)),{[i]:n}),r);function il(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function ol(t,e,r){return e===void 0?t??{}:zi(e,r,t||!0)}function en(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,y)=>({...f,[y.name]:y}),{});return f=>{let y=Re(t._errorFormat),C=il(n,i),R=ol(f,o,C),O=r({dataPath:C,callsite:y})(R),A=sl(t,e);return new Proxy(O,{get(I,k){if(!A.includes(k))return I[k];let se=[a[k].type,r,k],z=[C,R];return en(t,...se,...z)},...lr([...A,...Object.getOwnPropertyNames(O)])})}}function sl(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var al=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ll=["aggregate","count","groupBy"];function tn(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[ul(t,e),ml(t,e),Tt(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return le({},n)}function ul(t,e){let r=ge(e),n=Object.keys(pt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let y=Re(t._errorFormat);return t._createPrismaPromise(C=>{let R={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:y};return t._request({...R,...a})},{action:o,args:f,model:e})};return al.includes(o)?en(t,e,s):cl(i)?Wi(t,i,s):s({})}}}function cl(t){return ll.includes(t)}function ml(t,e){return _e(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Ki(e,r)}))}u();c();m();p();d();l();function Yi(t){return t.replace(/^./,e=>e.toUpperCase())}var rn=Symbol();function Ct(t){let e=[pl(t),dl(t),H(rn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Tt(r)),le(t,e)}function pl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function dl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ge),n=[...new Set(e.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=Yi(i);if(t._runtimeDataModel.models[o]!==void 0)return tn(t,o);if(t._runtimeDataModel.models[i]!==void 0)return tn(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Xi(t){return t[rn]?t[rn]:t}function Zi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Ct(e)}u();c();m();p();d();l();u();c();m();p();d();l();function eo({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let y=f.needs.filter(C=>n[C]);y.length>0&&a.push(et(y))}else if(r){if(!r[f.name])continue;let y=f.needs.filter(C=>!r[C]);y.length>0&&a.push(et(y))}fl(t,f.needs)&&s.push(gl(f,le(t,s)))}return s.length>0||a.length>0?le(t,[...s,...a]):t}function fl(t,e){return e.every(r=>Nr(t,r))}function gl(t,e){return _e(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let y=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:y,modelName:f.type,runtimeDataModel:n})}}function ro({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,y)=>{let C=ge(f);return eo({result:a,modelName:C,select:y.select,omit:y.select?void 0:{...o?.[C],...y.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var yl=["$connect","$disconnect","$on","$transaction","$use","$extends"],no=yl;function io(t){if(t instanceof ee)return hl(t);if(or(t))return bl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:io(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=co(o,f),a.args=s,so(t,a,r,n+1)}})})}function ao(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return so(t,e,s)}function lo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?uo(r,n,0,t):t(r)}}function uo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=co(i,f),uo(a,e,r+1,n)}})}var oo=t=>t;function co(t=oo,e=oo){return r=>t(e(r))}u();c();m();p();d();l();var mo=G("prisma:client"),po={Vercel:"vercel","Netlify CI":"netlify"};function fo({postinstall:t,ciName:e,clientVersion:r}){if(mo("checkPlatformCaching:postinstall",t),mo("checkPlatformCaching:ciName",e),t===!0&&e&&e in po){let n=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +"use strict";var Xo=Object.create;var kt=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.getPrototypeOf,rs=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nt=(t,e)=>{for(var r in e)kt(t,r,{get:e[r],enumerable:!0})},mn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of es(e))!rs.call(t,i)&&i!==r&&kt(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t};var it=(t,e,r)=>(r=t!=null?Xo(ts(t)):{},mn(e||!t||!t.__esModule?kt(r,"default",{value:t,enumerable:!0}):r,t)),ns=t=>mn(kt({},"__esModule",{value:!0}),t);function Er(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(as.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(h=0){return V(h,"offset"),X(h,"offset"),$(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,C=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=ss[R];return V(C,"offset"),X(C,"offset"),$(C,"offset",this.length-1),os(h,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,h,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function dn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Dt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function $(t,e,r=cs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function V(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function os(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function pn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function ms(t,e="utf8"){return y.from(t,e)}var y,ss,as,ls,us,cs,b,Pr,u=ie(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return pn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Er(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return us.includes(e)}static compare(e,r){Dt(e,"buff1"),Dt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Er(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){V(e,"offset"),X(e,"offset"),$(e,"offset",this.length-1),V(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){V(r,"offset"),X(r,"offset"),$(r,"offset",this.length-1),V(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){$(r,"targetStart"),$(n,"sourceStart",this.length),$(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((R,k)=>this[h+k]===R))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ls.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Pr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Pr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");dn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};ss={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},as=new TextEncoder,ls=new TextDecoder,us=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],cs=4294967295;is(y.prototype);b=new Proxy(ms,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Pr=String.fromCodePoint});var g,E,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:E}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var x,p=ie(()=>{"use strict";x=()=>{};x.prototype=x});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function hn(t,e){var r,n,i,o,s,a,f,h,C=t.constructor,R=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,R):e;if(f=t.d,h=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(R/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,R):e}function ce(t,e,r){if(t!==~~t||tr)throw Error(ke+t)}function ue(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Tr+j(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=R):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),h+=5;for(n=Math.log(Oe(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(he(i,r,a)),ue(s.d).slice(0,a)===ue(o.d).slice(0,a)){for(;h--;)o=L(o.times(o),a);return C.precision=R,e==null?(q=!0,L(o,R)):o}o=s}}function j(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function vr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function Pe(t){for(var e="";t--;)e+="0";return e}function ot(t,e){var r,n,i,o,s,a,f,h,C,R=1,k=10,A=t,_=A.d,O=A.constructor,D=O.precision;if(A.s<1)throw Error(oe+(A.s?"NaN":"-Infinity"));if(A.eq(te))return new O(0);if(e==null?(q=!1,h=D):h=e,A.eq(10))return e==null&&(q=!0),vr(O,h);if(h+=k,O.precision=h,r=ue(_),n=r.charAt(0),o=j(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(t),r=ue(A.d),n=r.charAt(0),R++;o=j(A),n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return f=vr(O,h+2,D).times(o+""),A=ot(new O(n+"."+r.slice(1)),h-k).plus(f),O.precision=D,e==null?(q=!0,L(A,D)):A;for(a=s=A=he(A.minus(te),A.plus(te),h),C=L(A.times(A),h),i=3;;){if(s=L(s.times(C),h),f=a.plus(he(s,new O(i),h)),ue(f.d).slice(0,h)===ue(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(vr(O,h+2,D).times(o+""))),a=he(a,new O(R),h),O.precision=D,e==null?(q=!0,L(a,D)):a;a=f,i+=2}}function fn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Ne(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nIt||t.e<-It))throw Error(Tr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,h,C,R=t.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,h=R[C=0];else{if(C=Math.ceil((n+1)/N),o=R.length,C>=o)return t;for(h=o=R[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Oe(10,s-i-1),a=h/o%10|0,f=e<0||R[C+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/Oe(10,s-i):0:R[C-1])%10&1||r==(t.s<0?8:7))),e<1||!R[0])return f?(o=j(t),R.length=1,e=e-o-1,R[0]=Oe(10,(N-e%N)%N),t.e=Ne(-e/N)||0):(R.length=1,R[0]=t.e=t.s=0),t;if(n==0?(R.length=C,o=1,C--):(R.length=C+1,o=Oe(10,N-n),R[C]=i>0?(h/Oe(10,s-i)%Oe(10,i)|0)*o:0),f)for(;;)if(C==0){(R[0]+=o)==J&&(R[0]=1,++t.e);break}else{if(R[C]+=o,R[C]!=J)break;R[C--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(q&&(t.e>It||t.e<-It))throw Error(Tr+j(t));return t}function wn(t,e){var r,n,i,o,s,a,f,h,C,R,k=t.constructor,A=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),q?L(e,A):e;if(f=t.d,R=e.d,n=e.e,h=t.e,f=f.slice(),s=h-n,s){for(C=s<0,C?(r=f,s=-s,a=R.length):(r=R,n=h,a=f.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,C=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),t.s<0?"-"+o:o}function gn(t,e){if(t.length>e)return t.length=e,!0}function xn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ke+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return fn(s,o.toString())}else if(typeof o!="string")throw Error(ke+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ds.test(o))fn(s,o);else throw Error(ke+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=xn,i.config=i.set=fs,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(ke+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ke+r+": "+n);return this}var Ue,ps,Cr,q,oe,ke,Tr,Ne,Oe,ds,te,J,N,yn,It,S,he,Cr,Mt,En=ie(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ps={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",ke=oe+"Invalid argument: ",Tr=oe+"Exponent out of range: ",Ne=Math.floor,Oe=Math.pow,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,yn=9007199254740991,It=Ne(yn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return he(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(he(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return j(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=he(ot(r,o),ot(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wn(e,t):hn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=he(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return bn(this)};S.naturalLogarithm=S.ln=function(){return ot(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hn(e,t):wn(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(ke+t);if(e=j(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=j(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ue(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ne((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(he(a,o,s+2)).times(.5),ue(o.d).slice(0,s)===(e=ue(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,h,C=this,R=C.constructor,k=C.d,A=(t=new R(t)).d;if(!C.s||!t.s)return new R(0);for(t.s*=C.s,r=C.e+t.e,f=k.length,h=A.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+A[n]*k[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,R.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ce(t,0,Ue),e===void 0?e=n.rounding:ce(e,0,8),L(r,t+j(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=De(n,!0):(ce(t,0,Ue),e===void 0?e=i.rounding:ce(e,0,8),n=L(new i(n),t+1,e),r=De(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?De(i):(ce(t,0,Ue),e===void 0?e=o.rounding:ce(e,0,8),n=L(new o(i),t+j(i)+1,e),r=De(n.abs(),!1,t+j(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),j(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,h=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=yn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),gn(i.d,e)),r=Ne(r/2),r!==0;)a=a.times(a),gn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(ot(a,n+h)),q=!0,i=bn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=j(i),n=De(i,r<=o.toExpNeg||r>=o.toExpPos)):(ce(t,1,Ue),e===void 0?e=o.rounding:ce(e,0,8),i=L(new o(i),t,e),r=j(i),n=De(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ce(t,1,Ue),e===void 0?e=n.rounding:ce(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=j(t),r=t.constructor;return De(t,e<=r.toExpNeg||e>=r.toExpPos)};he=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%J|0,s=o/J|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,h,C,R,k,A,_,O,D,ye,z,F,Y,Se,xr,se,St,Ot=n.constructor,Yo=n.s==i.s?1:-1,le=n.d,B=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,se=B.length,Se=le.length,A=new Ot(Yo),_=A.d=[],h=0;B[h]==(le[h]||0);)++h;if(B[h]>(le[h]||0)&&--f,o==null?z=o=Ot.precision:s?z=o+(j(n)-j(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,h=0,se==1)for(C=0,B=B[0],z++;(h1&&(B=t(B,C),le=t(le,C),se=B.length,Se=le.length),Y=se,O=le.slice(0,se),D=O.length;D=J/2&&++xr;do C=0,a=e(B,O,se,D),a<0?(ye=O[0],se!=D&&(ye=ye*J+(O[1]||0)),C=ye/xr|0,C>1?(C>=J&&(C=J-1),R=t(B,C),k=R.length,D=O.length,a=e(R,O,k,D),a==1&&(C--,r(R,se{"use strict";En();v=class extends Mt{static isDecimal(e){return e instanceof Mt}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,e)}`)}}},be=v});function xs(){return!1}function kr(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Es(){return kr()}function Ps(){return[]}function vs(t){t(null,[])}function Ts(){return""}function Cs(){return""}function Rs(){}function As(){}function Ss(){}function Os(){}function ks(){}function Ds(){}function Is(){}function Ms(){}function _s(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ls(t,e){e(null,kr())}var Fs,Us,Nn,qn=ie(()=>{"use strict";u();c();m();p();d();l();Fs={},Us={existsSync:xs,lstatSync:kr,stat:Ls,statSync:Es,readdirSync:Ps,readdir:vs,readlinkSync:Ts,realpathSync:Cs,chmodSync:Rs,renameSync:As,mkdirSync:Ss,rmdirSync:Os,rmSync:ks,unlinkSync:Ds,watchFile:Is,unwatchFile:Ms,watch:_s,promises:Fs},Nn=Us});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=Bn(t),r=Vn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Bn(t){let e=t.split("/");return e[e.length-1]}function Vn(t){return t.split("/").slice(0,-1).join("/")}function js(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var jn,Vs,$s,Qs,Ut,$n=ie(()=>{"use strict";u();c();m();p();d();l();jn="/",Vs=":";$s={sep:jn},Qs={basename:Bn,delimiter:Vs,dirname:Vn,join:qs,normalize:js,parse:Bs,posix:$s,resolve:Ns,sep:jn},Ut=Qs});var Qn=Fe((lm,Js)=>{Js.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Hn=Fe((xp,Kn)=>{"use strict";u();c();m();p();d();l();Kn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Xn=Fe((_p,Yn)=>{"use strict";u();c();m();p();d();l();Yn.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var ei=Fe((Vp,Zn)=>{"use strict";u();c();m();p();d();l();var ta=Xn();Zn.exports=t=>typeof t=="string"?t.replace(ta(),""):t});var Br=Fe((zy,oi)=>{"use strict";u();c();m();p();d();l();oi.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var mi=ie(()=>{"use strict";u();c();m();p();d();l()});var Li=Fe((YP,Ga)=>{Ga.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,Fi=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var eu={};nt(eu,{DMMF:()=>pt,Debug:()=>G,Decimal:()=>be,Extensions:()=>Rr,MetricsClient:()=>Ye,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>xe,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Ar,Sql:()=>ee,createParam:()=>Ai,defineDmmfProperty:()=>Mi,deserializeJsonResponse:()=>et,deserializeRawResult:()=>br,dmmfToRuntimeDataModel:()=>ii,empty:()=>Ni,getPrismaClient:()=>Ko,getRuntime:()=>Re,join:()=>Ui,makeStrictEnum:()=>Ho,makeTypedQueryFactory:()=>_i,objectEnumValues:()=>zt,raw:()=>Hr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>zr,warnEnvConflicts:()=>void 0,warnOnce:()=>ut});module.exports=ns(eu);u();c();m();p();d();l();var Rr={};nt(Rr,{defineExtension:()=>Pn,getExtensionContext:()=>vn});u();c();m();p();d();l();u();c();m();p();d();l();function Pn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function vn(t){return t}var Ar={};nt(Ar,{validator:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Sr,Cn,Rn,An,Sn=!0;typeof g<"u"&&({FORCE_COLOR:Sr,NODE_DISABLE_COLORS:Cn,NO_COLOR:Rn,TERM:An}=g.env||{},Sn=g.stdout&&g.stdout.isTTY);var gs={enabled:!Cn&&Rn==null&&An!=="dumb"&&(Sr!=null&&Sr!=="0"||Sn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!gs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xu=U(0,0),_t=U(1,22),Lt=U(2,22),Zu=U(3,23),On=U(4,24),ec=U(7,27),tc=U(8,28),rc=U(9,29),nc=U(30,39),qe=U(31,39),kn=U(32,39),Dn=U(33,39),In=U(34,39),ic=U(35,39),Mn=U(36,39),oc=U(37,39),_n=U(90,39),sc=U(90,39),ac=U(40,49),lc=U(41,49),uc=U(42,49),cc=U(43,49),mc=U(44,49),pc=U(45,49),dc=U(46,49),fc=U(47,49);u();c();m();p();d();l();var ys=100,Ln=["green","yellow","blue","magenta","cyan","red"],Ft=[],Fn=Date.now(),hs=0,Or=typeof g<"u"?g.env:{};globalThis.DEBUG??=Or.DEBUG??"";globalThis.DEBUG_COLORS??=Or.DEBUG_COLORS?Or.DEBUG_COLORS==="true":!0;var st={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function bs(t){let e={color:Ln[hs++%Ln.length],enabled:st.enabled(t),namespace:t,log:st.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ft.push([o,...n]),Ft.length>ys&&Ft.shift(),st.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ws(C)),h=`+${Date.now()-Fn}ms`;Fn=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(bs,{get:(t,e)=>st[e],set:(t,e,r)=>st[e]=r});function ws(t,e=2){let r=new Set;return JSON.stringify(t,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},e)}function Un(){Ft.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Dr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Gs=Qn(),Ir=Gs.version;u();c();m();p();d();l();function Be(t){let e=Ws();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Ks(t))}function Ws(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Ks(t){return t?.previewFeatures.includes("queryCompiler")?"client":"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function Mr(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Nt(t){return{ok:!0,value:t,map(e){return Nt(e(t))},flatMap(e){return e(t)}}}function Ie(t){return{ok:!1,error:t,map(){return Ie(t)},flatMap(){return Ie(t)}}}var Jn=G("driver-adapter-utils"),_r=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var qt=(t,e=new _r)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Hs(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=zs(e,t.getConnectionInfo.bind(t))),r},Hs=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return Nt(await e(...r))}catch(n){if(Jn("[error@wrapAsync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}function zs(t,e){return(...r)=>{try{return Nt(e(...r))}catch(n){if(Jn("[error@wrapSync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Gn="prisma+postgres",Wn=`${Gn}:`;function Lr(t){return t?.toString().startsWith(`${Wn}//`)??!1}var lt={};nt(lt,{error:()=>Zs,info:()=>Xs,log:()=>Ys,query:()=>ea,should:()=>zn,tags:()=>at,warn:()=>Fr});u();c();m();p();d();l();var at={error:qe("prisma:error"),warn:Dn("prisma:warn"),info:Mn("prisma:info"),query:In("prisma:query")},zn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Ys(...t){console.log(...t)}function Fr(t,...e){zn.warn()&&console.warn(`${at.warn} ${t}`,...e)}function Xs(t,...e){console.info(`${at.info} ${t}`,...e)}function Zs(t,...e){console.error(`${at.error} ${t}`,...e)}function ea(t,...e){console.log(`${at.query} ${t}`,...e)}u();c();m();p();d();l();function Bt(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Me(t,e){throw new Error(e)}u();c();m();p();d();l();function Ur(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Vt(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function Nr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{ti.has(t)||(ti.add(t),Fr(e,...r))};var I=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(I,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var xe=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(xe,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var me=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function ve(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ni(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function ct(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function ii(t){return{models:qr(t.models),enums:qr(t.enums),types:qr(t.types)}}function qr(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function Ve(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function jt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(t){return v.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var pt={};nt(pt,{ModelAction:()=>mt,datamodelEnumToSchemaEnum:()=>ra});u();c();m();p();d();l();u();c();m();p();d();l();function ra(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var mt=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(mt||{});var na=it(Hn());var ia={red:qe,gray:_n,dim:Lt,bold:_t,underline:On,highlightSource:t=>t.highlight()},oa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function sa({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function aa({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(la(e))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function la(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function $t(t){let e=t.showColors?ia:oa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=sa(t),aa(r,e)}u();c();m();p();d();l();var di=it(Br());u();c();m();p();d();l();function li(t,e,r){let n=ui(t),i=ua(n),o=ma(i);o?Qt(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ui(t){return t.errors.flatMap(e=>e.kind==="Union"?ui(e):[e])}function ua(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:ca(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function ca(t,e){return[...new Set(t.concat(e))]}function ma(t){return Nr(t,(e,r)=>{let n=si(e),i=si(r);return n!==i?n-i:ai(e)-ai(r)})}function si(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function ai(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var ne=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();m();p();d();l();u();c();m();p();d();l();mi();u();c();m();p();d();l();var $e=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};ci();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},pi={bold:_t,red:qe,green:kn,dim:Lt,enabled:!0},Qe={write(t){t.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Te=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Je=class extends Te{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new pe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(Qe,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ge=class t extends Te{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof Je&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new pe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(Qe,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Te{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();m();p();d();l();var dt=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(Qe,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":pa(t,e);break;case"IncludeOnScalar":da(t,e);break;case"EmptySelection":fa(t,e,r);break;case"UnknownSelectionField":ba(t,e);break;case"InvalidSelectionValue":wa(t,e);break;case"UnknownArgument":xa(t,e);break;case"UnknownInputField":Ea(t,e);break;case"RequiredArgumentMissing":Pa(t,e);break;case"InvalidArgumentType":va(t,e);break;case"InvalidArgumentValue":Ta(t,e);break;case"ValueTooLarge":Ca(t,e);break;case"SomeFieldsMissing":Ra(t,e);break;case"TooManyFieldsGiven":Aa(t,e);break;case"Union":li(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function pa(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function da(t,e){let[r,n]=We(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ft(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fa(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ga(t,e,i);return}if(n.hasField("select")){ya(t,e);return}}if(r?.[ve(t.outputType.name)]){ha(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function ga(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ya(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),yi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ft(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ha(t,e){let r=new dt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=We(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Ge;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function ba(t,e){let r=hi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":yi(n,t.outputType);break;case"include":Sa(n,t.outputType);break;case"omit":Oa(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(ft(n)),i.join(" ")})}function wa(t,e){let r=hi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function xa(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),ka(n,t.arguments)),e.addErrorMessage(i=>fi(i,r,t.arguments.map(o=>o.name)))}function Ea(t,e){let[r,n]=We(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&bi(o,t.inputType)}e.addErrorMessage(o=>fi(o,n,t.inputType.fields.map(s=>s.name)))}function fi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=Ia(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(ft(t)),n.join(" ")}function Pa(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=We(t.argumentPath),s=new dt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(gi).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=We(t.dependentArgumentPath);e.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function gi(t){return t.kind==="list"?`${gi(t.elementType)}[]`:t.name}function va(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Ta(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ca(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ra(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&bi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(ft(i)),o.join(" ")})}function Aa(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function yi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Sa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Oa(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function ka(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function hi(t,e){let[r,n]=We(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function bi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function We(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function ft({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Da=3;function Ia(t,e){let r=1/0,n;for(let i of e){let o=(0,di.default)(t,i);o>Da||o`}};function Ke(t){return t instanceof gt}u();c();m();p();d();l();var Ht=Symbol(),jr=new WeakMap,Ee=class{constructor(e){e===Ht?jr.set(this,`Prisma.${this._getName()}`):jr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return jr.get(this)}},yt=class extends Ee{_getNamespace(){return"NullTypes"}},ht=class extends yt{#e};$r(ht,"DbNull");var bt=class extends yt{#e};$r(bt,"JsonNull");var wt=class extends yt{#e};$r(wt,"AnyNull");var zt={classes:{DbNull:ht,JsonNull:bt,AnyNull:wt},instances:{DbNull:new ht(Ht),JsonNull:new bt(Ht),AnyNull:new wt(Ht)}};function $r(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var wi=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+wi.length}write(e){let r=new pe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(wi).write(this.value)}};var Qr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` +`)}};function He(t){return new Qr(xi(t))}function xi(t){let e=new Ge;for(let[r,n]of Object.entries(t)){let i=new Yt(r,Ei(n));e.addField(i)}return e}function Ei(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(je(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=jt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof Ee?new W(`Prisma.${t._getName()}`):Ke(t)?new W(`prisma.${ve(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Ma(t):typeof t=="object"?xi(t):new W(Object.prototype.toString.call(t))}function Ma(t){let e=new Je;for(let r of t)e.addItem(Ei(r));return e}function Xt(t,e){let r=e==="pretty"?pi:Wt,n=t.renderAllMessages(r),i=new $e(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=He(t);for(let R of e)Qt(R,a,s);let{message:f,args:h}=Xt(a,r),C=$t({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function de(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function vi(t,e,r){let n=de(r);return!e.result||!(e.result.$allModels||e.result[n])?t:_a({...t,...Pi(e.name,t,e.result.$allModels),...Pi(e.name,t,e.result[n])})}function _a(t){let e=new me,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return Vt(t,n=>({...n,needs:r(n.name,new Set)}))}function Pi(t,e,r){return r?Vt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:La(e,o,i)})):{}}function La(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ti(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function Ci(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new me;modelExtensionsCache=new me;queryCallbacksCache=new me;clientExtensions=ct(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ct(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>vi(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=de(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ze=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ri(t){return t instanceof tr}function Ai(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var Si=Symbol(),xt=class{constructor(e){if(e!==Si)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new xt(Si);function fe(t){return t instanceof xt}var Fa={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Oi="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=ze.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C}){let R=new Jr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C});return{modelName:t,action:Fa[e],query:Et(r,R)}}function Et({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Di(r,n),selection:Ua(t,e,i,n)}}function Ua(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Va(t,n)):Na(n,e,r)}function Na(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&qa(n,e,t),Ba(n,r,t),n}function qa(t,e,r){for(let[n,i]of Object.entries(e)){if(fe(i))continue;let o=r.nestSelection(n);if(Gr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=Et(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=Et(i,o)}}function Ba(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ci(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Gr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Va(t,e){let r={},n=e.getComputedFields(),i=Ti(t,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=e.nestSelection(o);Gr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=Et({},a):r[o]=!0;continue}r[o]=Et(s,a)}}return r}function ki(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(Ve(t)){if(jt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ri(t))return{$type:"Param",value:t.name};if(Ke(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return ja(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if($a(t))return t.values;if(je(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Ee){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Qa(t))return t.toJSON();if(typeof t=="object")return Di(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Di(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);fe(i)||(i!==void 0?r[n]=ki(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Oi}))}return r}function ja(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function Ii(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Ye=class{_client;constructor(e){this._client=e}prometheus(e){return Ii(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Ii(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Mi(t,e){let r=ct(()=>Ja(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Ja(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Wr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Kr=new WeakMap,ir="$$PrismaTypedSql",Pt=class{constructor(e,r){Kr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Kr.get(this).sql}get values(){return Kr.get(this).values}};function _i(t){return(...e)=>new Pt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Wo=it(Li());u();c();m();p();d();l();Fi();qn();$n();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var qi=Symbol.for("nodejs.util.inspect.custom");function ae(t,e){let r=Wa(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Bi(Reflect.ownKeys(o),r),a=Bi(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[qi]=function(){let o={...this};return delete o[qi],o},i}function Wa(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function Bi(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function Xe(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function Vi(t){if(t===void 0)return"";let e=He(t);return new $e(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var Ka="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Ha(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Ha(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===Ka&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Yr=class{getLocation(){return null}};function Ce(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Yr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ji={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ze(t={}){let e=Ya(t);return Object.entries(e).reduce((n,[i,o])=>(ji[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ya(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function $i(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:Ze})(t)}u();c();m();p();d();l();function Xa(t={}){let{select:e,...r}=t;return typeof e=="object"?Ze({...r,_count:e}):Ze({...r,_count:{_all:!0}})}function Za(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function Qi(t,e){return e({action:"count",unpacker:Za(t),argsMapper:Xa})(t)}u();c();m();p();d();l();function el(t={}){let e=Ze(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function tl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Ji(t,e){return e({action:"groupBy",unpacker:tl(t),argsMapper:el})(t)}function Gi(t,e,r){if(e==="aggregate")return n=>$i(n,r);if(e==="count")return n=>Qi(n,r);if(e==="groupBy")return n=>Ji(n,r)}u();c();m();p();d();l();function Wi(t,e){let r=e.fields.filter(i=>!i.relationName),n=ni(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new gt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Ki=t=>Array.isArray(t)?t:t.split("."),Xr=(t,e)=>Ki(e).reduce((r,n)=>r&&r[n],t),Hi=(t,e,r)=>Ki(e).reduceRight((n,i,o,s)=>Object.assign({},Xr(t,s.slice(0,o)),{[i]:n}),r);function rl(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function nl(t,e,r){return e===void 0?t??{}:Hi(e,r,t||!0)}function Zr(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Ce(t._errorFormat),C=rl(n,i),R=nl(f,o,C),k=r({dataPath:C,callsite:h})(R),A=il(t,e);return new Proxy(k,{get(_,O){if(!A.includes(O))return _[O];let ye=[a[O].type,r,O],z=[C,R];return Zr(t,...ye,...z)},...lr([...A,...Object.getOwnPropertyNames(k)])})}}function il(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var ol=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],sl=["aggregate","count","groupBy"];function en(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[al(t,e),ul(t,e),vt(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return ae({},n)}function al(t,e){let r=de(e),n=Object.keys(mt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Ce(t._errorFormat);return t._createPrismaPromise(C=>{let R={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:h};return t._request({...R,...a})},{action:o,args:f,model:e})};return ol.includes(o)?Zr(t,e,s):ll(i)?Gi(t,i,s):s({})}}}function ll(t){return sl.includes(t)}function ul(t,e){return _e(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Wi(e,r)}))}u();c();m();p();d();l();function zi(t){return t.replace(/^./,e=>e.toUpperCase())}var tn=Symbol();function Tt(t){let e=[cl(t),ml(t),H(tn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(vt(r)),ae(t,e)}function cl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function ml(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(de),n=[...new Set(e.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=zi(i);if(t._runtimeDataModel.models[o]!==void 0)return en(t,o);if(t._runtimeDataModel.models[i]!==void 0)return en(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Yi(t){return t[tn]?t[tn]:t}function Xi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Tt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function Zi({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(C=>n[C]);h.length>0&&a.push(Xe(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(C=>!r[C]);h.length>0&&a.push(Xe(h))}pl(t,f.needs)&&s.push(dl(f,ae(t,s)))}return s.length>0||a.length>0?ae(t,[...s,...a]):t}function pl(t,e){return e.every(r=>Ur(t,r))}function dl(t,e){return _e(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:h,modelName:f.type,runtimeDataModel:n})}}function to({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,h)=>{let C=de(f);return Zi({result:a,modelName:C,select:h.select,omit:h.select?void 0:{...o?.[C],...h.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var fl=["$connect","$disconnect","$on","$transaction","$extends"],ro=fl;function no(t){if(t instanceof ee)return gl(t);if(or(t))return yl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:no(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(o,f),a.args=s,oo(t,a,r,n+1)}})})}function so(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return oo(t,e,s)}function ao(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?lo(r,n,0,t):t(r)}}function lo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(i,f),lo(a,e,r+1,n)}})}var io=t=>t;function uo(t=io,e=io){return r=>t(e(r))}u();c();m();p();d();l();var co=G("prisma:client"),mo={Vercel:"vercel","Netlify CI":"netlify"};function po({postinstall:t,ciName:e,clientVersion:r}){if(co("checkPlatformCaching:postinstall",t),co("checkPlatformCaching:ciName",e),t===!0&&e&&e in mo){let n=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. -Learn how: https://pris.ly/d/${po[e]}-build`;throw console.error(n),new D(n,r)}}u();c();m();p();d();l();function go(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();var wl=()=>globalThis.process?.release?.name==="node",El=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,xl=()=>!!globalThis.Deno,Pl=()=>typeof globalThis.Netlify=="object",vl=()=>typeof globalThis.EdgeRuntime=="object",Tl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Cl(){return[[Pl,"netlify"],[vl,"edge-light"],[Tl,"workerd"],[xl,"deno"],[El,"bun"],[wl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Rl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ae(){let t=Cl();return{id:t,prettyName:Rl[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}u();c();m();p();d();l();var yo="6.13.0";u();c();m();p();d();l();function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ae().id==="workerd"?new D(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${mo[e]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function fo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();var hl=()=>globalThis.process?.release?.name==="node",bl=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,wl=()=>!!globalThis.Deno,xl=()=>typeof globalThis.Netlify=="object",El=()=>typeof globalThis.EdgeRuntime=="object",Pl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function vl(){return[[xl,"netlify"],[El,"edge-light"],[Pl,"workerd"],[wl,"deno"],[bl,"bun"],[hl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Tl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Re(){let t=vl();return{id:t,prettyName:Tl[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();l();function go(t,e){throw new Error(e)}function Cl(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function Rl(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function et(t){return t===null?t:Array.isArray(t)?t.map(et):typeof t=="object"?Cl(t)?Al(t):t.constructor!==null&&t.constructor.name!=="Object"?t:Rl(t,et):t}function Al({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new v(e);case"Json":return JSON.parse(e);default:go(e,"Unknown tagged value")}}var yo="6.14.0";u();c();m();p();d();l();function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Re().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new D(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new D("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function ho(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var nn,bo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new D(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ae().prettyName})`,e);if(n===void 0)throw new D("WASM engine was unexpectedly `undefined`",e);nn===void 0&&(nn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new D("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),y=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),y(),o.QueryEngine})());let i=await nn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Sl="P2036",he=G("prisma:client:libraryEngine");function kl(t){return t.item_type==="query"&&"query"in t}function Ol(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var BS=[...Mr,"native"],Il=0xffffffffffffffffn,on=1n;function Ml(){let t=on++;return on>Il&&(on=1n),t}var At=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??bo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Ml().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Dl(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(he("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Bt));let r=await this.adapterPromise;r&&he("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new D(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",kl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Ol(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return he(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{he("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Bt)),await this.adapterPromise,he("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new D(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return he("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),he("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,he("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){he(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof D)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){he("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),ho(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:y}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw y&&y.length===1?new Error(y[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Sl&&r){let n=e.meta?.id;$t(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return $t(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function Dl(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var St="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl,this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload,this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError,this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError,this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError,this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError,this.debug=this.config.accelerateUtils?.debug,this.engineVersion=this.config.accelerateUtils?.engineVersion,this.clientVersion=this.config.accelerateUtils?.clientVersion}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new D(St,this.config.clientVersion)}metrics(e){throw new D(St,this.config.clientVersion)}request(e,r){throw new D(St,this.config.clientVersion)}requestBatch(e,r){throw new D(St,this.config.clientVersion)}applyPendingMigrations(){throw new D(St,this.config.clientVersion)}};u();c();m();p();d();l();function wo({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` -`);o.push({_tag:"error",value:M})},f=!!t?.startsWith("prisma://"),y=Fr(t),C=!!e,R=f||y;!C&&r&&R&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let O=R||!r;C&&(O||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let A={accelerate:O,ppg:y,driverAdapters:C};function I(k){return k.length>0}return I(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:A}:{ok:!0,diagnostics:{warnings:i},isUsing:A}}function Eo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=wo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let R of o.warnings)ct(...R.value);if(!n){let R=o.errors[0];throw new K(R.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",y=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new At(e);if(i.accelerate)return new fr(e);{let R=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ae().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new K(R.join(` -`),{clientVersion:e.clientVersion})}return"wasm-engine-edge"}u();c();m();p();d();l();function gr({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var xo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Po=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function rt(t){try{return vo(t,"fast")}catch{return vo(t,"slow")}}function vo(t,e){return JSON.stringify(t.map(r=>Co(r,e)))}function Co(t,e){if(Array.isArray(t))return t.map(r=>Co(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(je(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(pe.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(_l(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Ro(t):t}function _l(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ro(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(To);let e={};for(let r of Object.keys(t))e[r]=To(t[r]);return e}function To(t){return typeof t=="bigint"?t.toString():Ro(t)}var Ll=/^(\s*alter\s)/i,Ao=G("prisma:client");function sn(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Ll.exec(e))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function ho(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var rn,bo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Re().prettyName})`,e);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",e);rn===void 0&&(rn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),h=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),h(),o.QueryEngine})());let i=await rn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ol="P2036",ge=G("prisma:client:libraryEngine");function kl(t){return t.item_type==="query"&&"query"in t}function Dl(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var sO=[...Dr,"native"],Il=0xffffffffffffffffn,nn=1n;function Ml(){let t=nn++;return nn>Il&&(nn=1n),t}var Rt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??bo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Ml().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(_l(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ge("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&ge("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",kl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Dl(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{ge("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt)),await this.adapterPromise,ge("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ge("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),ge("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,ge("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){ge(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){ge("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),ho(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:h}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw h&&h.length===1?new Error(h[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ol&&r){let n=e.meta?.id;Bt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Bt(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function _l(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var At="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl,this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload,this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError,this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError,this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError,this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError,this.debug=this.config.accelerateUtils?.debug,this.engineVersion=this.config.accelerateUtils?.engineVersion,this.clientVersion=this.config.accelerateUtils?.clientVersion}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new I(At,this.config.clientVersion)}metrics(e){throw new I(At,this.config.clientVersion)}request(e,r){throw new I(At,this.config.clientVersion)}requestBatch(e,r){throw new I(At,this.config.clientVersion)}applyPendingMigrations(){throw new I(At,this.config.clientVersion)}};u();c();m();p();d();l();function wo({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=O=>{i.push({_tag:"warning",value:O})},a=O=>{let D=O.join(` +`);o.push({_tag:"error",value:D})},f=!!t?.startsWith("prisma://"),h=Lr(t),C=!!e,R=f||h;!C&&r&&R&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let k=R||!r;C&&(k||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let A={accelerate:k,ppg:h,driverAdapters:C};function _(O){return O.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:A}:{ok:!0,diagnostics:{warnings:i},isUsing:A}}function xo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=wo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let R of o.warnings)ut(...R.value);if(!n){let R=o.errors[0];throw new K(R.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",h=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new Rt(e);if(i.accelerate)return new fr(e);{let R=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Re().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new K(R.join(` +`),{clientVersion:e.clientVersion})}return"wasm-engine-edge"}u();c();m();p();d();l();function gr({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var Eo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Po=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function tt(t){try{return vo(t,"fast")}catch{return vo(t,"slow")}}function vo(t,e){return JSON.stringify(t.map(r=>Co(r,e)))}function Co(t,e){if(Array.isArray(t))return t.map(r=>Co(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(Ve(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(be.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(Ll(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Ro(t):t}function Ll(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ro(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(To);let e={};for(let r of Object.keys(t))e[r]=To(t[r]);return e}function To(t){return typeof t=="bigint"?t.toString():Ro(t)}var Fl=/^(\s*alter\s)/i,Ao=G("prisma:client");function on(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Fl.exec(e))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var an=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rt(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Po(r),i={values:rt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ao(`prisma.${t}(${n}, ${i.values})`):Ao(`prisma.${t}(${n})`),{query:n,parameters:i}},So={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},ko={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function ln(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=Oo(r(s)):Oo(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Oo(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Fl=Dr.split(".")[0],Ul={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},un=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Fl}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Ul}};function Io(){return new un}u();c();m();p();d();l();function Mo(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Do(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();var yr=class{_middlewares=[];use(e){this._middlewares.push(e)}get(e){return this._middlewares[e]}has(e){return!!this._middlewares[e]}length(){return this._middlewares.length}};u();c();m();p();d();l();var Lo=ot(ti());u();c();m();p();d();l();function hr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function _o(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(cn(t.query.arguments)),e.push(cn(t.query.selection)),e.join("")}function cn(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${cn(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Nl={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function mn(t){return Nl[t]}u();c();m();p();d();l();var br=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iLe("bigint",r));case"bytes-array":return e.map(r=>Le("bytes",r));case"decimal-array":return e.map(r=>Le("decimal",r));case"datetime-array":return e.map(r=>Le("datetime",r));case"date-array":return e.map(r=>Le("date",r));case"time-array":return e.map(r=>Le("time",r));default:return e}}function wr(t){let e=[],r=ql(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),y=n.some(R=>mn(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:$l(o),containsWrite:y,customDataProxyFetch:i})).map((R,O)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[O],R)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Fo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:mn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:_o(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Bl(e),Vl(e,i))throw e;if(e instanceof Z&&jl(e)){let y=Uo(e.meta);Zt({args:o,errors:[y],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=jt({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let y=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:y,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new xe(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof D)throw new D(f,this.client._clientVersion);if(e instanceof xe)throw new xe(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Lo.default)(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(y=>y!=="select"&&y!=="include"),a=Zr(o,s),f=i==="queryRaw"?wr(a):Ve(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function $l(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:Fo(t)};Ee(t,"Unknown transaction kind")}}function Fo(t){return{id:t.id,payload:t.payload}}function Vl(t,e){return hr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function jl(t){return t.code==="P2009"||t.code==="P2012"}function Uo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Uo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var No=yo;u();c();m();p();d();l();var jo=ot($r());u();c();m();p();d();l();var _=class extends Error{constructor(e){super(e+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(_,"PrismaClientConstructorValidationError");var qo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bo=["pretty","colorless","minimal"],$o=["info","query","warn","error"],Ql={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new _(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=nt(r,e)||` Available datasources: ${e.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(t,e)=>{if(!t&&Be(e.generator)==="client")throw new _('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(t===null)return;if(t===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!gr(e).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Be(e.generator)==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:t=>{if(typeof t<"u"&&typeof t!="string")throw new _(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")throw new _(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`);if(!Bo.includes(t)){let e=nt(t,Bo);throw new _(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`)}}},log:t=>{if(!t)return;if(!Array.isArray(t))throw new _(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`);function e(r){if(typeof r=="string"&&!$o.includes(r)){let n=nt(r,$o);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of t){e(r);let n={level:e,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=nt(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:t=>{if(!t)return;let e=t.maxWait;if(e!=null&&e<=0)throw new _(`Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=t.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(t,e)=>{if(typeof t!="object")throw new _('"omit" option is expected to be an object.');if(t===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(t)){let o=Gl(n,e.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(y=>y.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(Wl(t,r))},__internal:t=>{if(!t)return;let e=["debug","engine","configOverride"];if(typeof t!="object")throw new _(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(t))if(!e.includes(r)){let n=nt(r,e);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Qo(t,e){for(let[r,n]of Object.entries(t)){if(!qo.includes(r)){let i=nt(r,qo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ql[r](n,e)}if(t.datasourceUrl&&t.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function nt(t,e){if(e.length===0||typeof t!="string")return"";let r=Jl(t,e);return r?` Did you mean "${r}"?`:""}function Jl(t,e){if(e.length===0)return null;let r=e.map(i=>({value:i,distance:(0,jo.default)(t,i)}));r.sort((i,o)=>i.distanceTe(n)===e);if(r)return t[r]}function Wl(t,e){let r=Ye(t);for(let o of e)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Xt(r,"colorless");return`Error validating "omit" option: +`)}var sn=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tt(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Po(r),i={values:tt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ao(`prisma.${t}(${n}, ${i.values})`):Ao(`prisma.${t}(${n})`),{query:n,parameters:i}},So={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},Oo={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function an(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=ko(r(s)):ko(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ko(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Ul=Ir.split(".")[0],Nl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},ln=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Ul}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Nl}};function Do(){return new ln}u();c();m();p();d();l();function Io(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Mo(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();var Lo=it(ei());u();c();m();p();d();l();function yr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function _o(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(un(t.query.arguments)),e.push(un(t.query.selection)),e.join("")}function un(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${un(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var ql={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function cn(t){return ql[t]}u();c();m();p();d();l();var hr=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iLe("bigint",r));case"bytes-array":return e.map(r=>Le("bytes",r));case"decimal-array":return e.map(r=>Le("decimal",r));case"datetime-array":return e.map(r=>Le("datetime",r));case"date-array":return e.map(r=>Le("date",r));case"time-array":return e.map(r=>Le("time",r));default:return e}}function br(t){let e=[],r=Bl(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(R=>cn(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:jl(o),containsWrite:h,customDataProxyFetch:i})).map((R,k)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[k],R)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Fo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:cn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:_o(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Vl(e),$l(e,i))throw e;if(e instanceof Z&&Ql(e)){let h=Uo(e.meta);Zt({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=$t({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let h=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new xe(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof I)throw new I(f,this.client._clientVersion);if(e instanceof xe)throw new xe(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Lo.default)(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Xr(o,s),f=i==="queryRaw"?br(a):et(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function jl(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:Fo(t)};Me(t,"Unknown transaction kind")}}function Fo(t){return{id:t.id,payload:t.payload}}function $l(t,e){return yr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function Ql(t){return t.code==="P2009"||t.code==="P2012"}function Uo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Uo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var No=yo;u();c();m();p();d();l();var $o=it(Br());u();c();m();p();d();l();var M=class extends Error{constructor(e){super(e+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(M,"PrismaClientConstructorValidationError");var qo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bo=["pretty","colorless","minimal"],Vo=["info","query","warn","error"],Jl={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new M(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=rt(r,e)||` Available datasources: ${e.join(", ")}`;throw new M(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new M(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(t,e)=>{if(!t&&Be(e.generator)==="client")throw new M('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(t===null)return;if(t===void 0)throw new M('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!gr(e).includes("driverAdapters"))throw new M('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Be(e.generator)==="binary")throw new M('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:t=>{if(typeof t<"u"&&typeof t!="string")throw new M(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")throw new M(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`);if(!Bo.includes(t)){let e=rt(t,Bo);throw new M(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`)}}},log:t=>{if(!t)return;if(!Array.isArray(t))throw new M(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`);function e(r){if(typeof r=="string"&&!Vo.includes(r)){let n=rt(r,Vo);throw new M(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of t){e(r);let n={level:e,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=rt(i,o);throw new M(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new M(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:t=>{if(!t)return;let e=t.maxWait;if(e!=null&&e<=0)throw new M(`Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=t.timeout;if(r!=null&&r<=0)throw new M(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(t,e)=>{if(typeof t!="object")throw new M('"omit" option is expected to be an object.');if(t===null)throw new M('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(t)){let o=Wl(n,e.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(h=>h.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new M(Kl(t,r))},__internal:t=>{if(!t)return;let e=["debug","engine","configOverride"];if(typeof t!="object")throw new M(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(t))if(!e.includes(r)){let n=rt(r,e);throw new M(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Qo(t,e){for(let[r,n]of Object.entries(t)){if(!qo.includes(r)){let i=rt(r,qo);throw new M(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Jl[r](n,e)}if(t.datasourceUrl&&t.datasources)throw new M('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function rt(t,e){if(e.length===0||typeof t!="string")return"";let r=Gl(t,e);return r?` Did you mean "${r}"?`:""}function Gl(t,e){if(e.length===0)return null;let r=e.map(i=>({value:i,distance:(0,$o.default)(t,i)}));r.sort((i,o)=>i.distanceve(n)===e);if(r)return t[r]}function Kl(t,e){let r=He(t);for(let o of e)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Xt(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}u();c();m();p();d();l();function Jo(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=y=>{o||(o=!0,r(y))};for(let y=0;y{n[y]=C,a()},C=>{if(!hr(C)){f(C);return}C.batchRequestIdx===y?f(C):(i||(i=C),a())})})}var Se=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Kl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},Hl=Symbol.for("prisma.client.transaction.id"),zl={id:0,nextId(){return++this.id}};function Ko(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new yr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ln();constructor(n){t=n?.__internal?.configOverride?.(t)??t,fo(t),n&&Qo(n,t);let i=new sr().on("error",()=>{});this._extensions=Xe.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??No,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Io();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Nt.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Nt.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new D(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new D("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=t.injectableEdgeEnv?.();try{let f=n??{},y=f.__internal??{},C=y.debug===!0;C&&G.enable("prisma:client");let R=Nt.resolve(t.dirname,t.relativePath);qn.existsSync(R)||(R=t.dirname),Se("dirname",t.dirname),Se("relativePath",t.relativePath),Se("cwd",R);let O=y.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:R,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:O.allowTriggerPanic,prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Do(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:go(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:D,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Wo.version,clientVersion:t.clientVersion}},Se("clientVersion",t.clientVersion),this._engine=Eo(t,this._engineConfig),this._requestHandler=new Er(this,i),f.log)for(let A of f.log){let I=typeof A=="string"?A:A.emit==="stdout"?A.level:null;I&&this.$on(I,k=>{ut.log(`${ut.tags[I]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Ct(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Nn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:an({clientMethod:i,activeProvider:a}),callsite:Re(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Go(n,i);return sn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(sn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xo,callsite:Re(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:an({clientMethod:i,activeProvider:a}),callsite:Re(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Go(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=zl.nextId(),s=Mo(n.length),a=n.map((f,y)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:y,isolationLevel:C,lock:s};return f.requestTransaction?.(R)??f});return Jo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let y={kind:"itx",...a};f=await n(this._createItxClient(y)),await this._engine.transaction("commit",o,a)}catch(y){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),y}return f}_createItxClient(n){return le(Ct(le(Xi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>ln(n)),H(Hl,()=>n.id)])),[et(no)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Kl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async y=>{let C=this._middlewares.get(++a);if(C)return this._tracingHelper.runInChildSpan(s.middleware,M=>C(y,se=>(M?.end(),f(se))));let{runInTransaction:R,args:O,...A}=y,I={...n,...A};O&&(I.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&R===!1&&delete I.transaction;let k=await ao(this,I);return I.model?ro({result:k,modelName:I.model,args:I.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:y,transaction:C,unpacker:R,otelParentCtx:O,customDataProxyFetch:A}){try{n=y?y(n):n;let I={name:"serialize"},k=this._tracingHelper.runInChildSpan(I,()=>nr({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return G.enabled("prisma:client")&&(Se("Prisma Client call:"),Se(`prisma.${i}(${Vi(n)})`),Se("Generated request:"),Se(JSON.stringify(k,null,2)+` -`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:R,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(I){throw I.clientVersion=this._clientVersion,I}}$metrics=new Ze(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Zi}return e}function Go(t,e){return Yl(t)?[new ee(t,e),So]:[t,ko]}function Yl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Xl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ho(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Xl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}u();c();m();p();d();l();function Jo(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=C,a()},C=>{if(!yr(C)){f(C);return}C.batchRequestIdx===h?f(C):(i||(i=C),a())})})}var Ae=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Hl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},zl=Symbol.for("prisma.client.transaction.id"),Yl={id:0,nextId(){return++this.id}};function Ko(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=an();constructor(n){t=n?.__internal?.configOverride?.(t)??t,po(t),n&&Qo(n,t);let i=new sr().on("error",()=>{});this._extensions=ze.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??No,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Do();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=t.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},C=h.debug===!0;C&&G.enable("prisma:client");let R=Ut.resolve(t.dirname,t.relativePath);Nn.existsSync(R)||(R=t.dirname),Ae("dirname",t.dirname),Ae("relativePath",t.relativePath),Ae("cwd",R);let k=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:R,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:k.allowTriggerPanic,prismaPath:k.binaryPath??void 0,engineEndpoint:k.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Mo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:fo(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Wo.version,clientVersion:t.clientVersion}},Ae("clientVersion",t.clientVersion),this._engine=xo(t,this._engineConfig),this._requestHandler=new wr(this,i),f.log)for(let A of f.log){let _=typeof A=="string"?A:A.emit==="stdout"?A.level:null;_&&this.$on(_,O=>{lt.log(`${lt.tags[_]??""}`,O.message||O.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Tt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Un()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:sn({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Go(n,i);return on(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(on(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Eo,callsite:Ce(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:sn({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Go(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Yl.nextId(),s=Io(n.length),a=n.map((f,h)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:h,isolationLevel:C,lock:s};return f.requestTransaction?.(R)??f});return Jo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return ae(Tt(ae(Yi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>an(n)),H(zl,()=>n.id)])),[Xe(ro)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Hl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:h,args:C,...R}=f,k={...n,...R};C&&(k.args=i.middlewareArgsToRequestArgs(C)),n.transaction!==void 0&&h===!1&&delete k.transaction;let A=await so(this,k);return k.model?to({result:A,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:C,unpacker:R,otelParentCtx:k,customDataProxyFetch:A}){try{n=h?h(n):n;let _={name:"serialize"},O=this._tracingHelper.runInChildSpan(_,()=>nr({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return G.enabled("prisma:client")&&(Ae("Prisma Client call:"),Ae(`prisma.${i}(${Vi(n)})`),Ae("Generated request:"),Ae(JSON.stringify(O,null,2)+` +`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:O,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:R,otelParentCtx:k,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new Ye(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Xi}return e}function Go(t,e){return Xl(t)?[new ee(t,e),So]:[t,Oo]}function Xl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Zl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ho(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Zl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=wasm-engine-edge.js.map diff --git a/src/generated/prisma/schema.prisma b/src/generated/prisma/schema.prisma index 65d5604..34b8f58 100644 --- a/src/generated/prisma/schema.prisma +++ b/src/generated/prisma/schema.prisma @@ -44,7 +44,7 @@ model User { createdSchedules Schedule[] @relation("CreatedSchedules") confirmedSchedules Schedule[] @relation("ConfirmedSchedules") - mapVetoChoices MapVetoStep[] @relation("VetoStepChooser") + mapVoteChoices MapVoteStep[] @relation("VoteStepChooser") } model Team { @@ -68,7 +68,7 @@ model Team { schedulesAsTeamA Schedule[] @relation("ScheduleTeamA") schedulesAsTeamB Schedule[] @relation("ScheduleTeamB") - mapVetoSteps MapVetoStep[] @relation("VetoStepTeam") + mapVoteSteps MapVoteStep[] @relation("VoteStepTeam") } model TeamInvite { @@ -138,7 +138,7 @@ model Match { bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren matchDate DateTime? // geplante Startzeit (separat von demoDate) - mapVeto MapVeto? // 1:1 Map-Vote-Status + mapVote MapVote? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -297,51 +297,49 @@ model ServerRequest { // 🗺️ Map-Vote // ────────────────────────────────────────────── -enum MapVetoAction { +enum MapVoteAction { BAN PICK DECIDER } -model MapVeto { +model MapVote { id String @id @default(uuid()) matchId String @unique match Match @relation(fields: [matchId], references: [id]) - // Basiszustand - bestOf Int @default(3) - mapPool String[] // z.B. ["de_inferno","de_mirage",...] - currentIdx Int @default(0) - locked Boolean @default(false) + bestOf Int @default(3) + mapPool String[] + currentIdx Int @default(0) + locked Boolean @default(false) + opensAt DateTime? - // Optional: serverseitig speichern, statt im UI zu berechnen - opensAt DateTime? + adminEditingBy String? + adminEditingSince DateTime? - steps MapVetoStep[] + steps MapVoteStep[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } -model MapVetoStep { +model MapVoteStep { id String @id @default(uuid()) - vetoId String + voteId String order Int - action MapVetoAction + action MapVoteAction - // Team, das am Zug ist (kann bei DECIDER null sein) teamId String? - team Team? @relation("VetoStepTeam", fields: [teamId], references: [id]) + team Team? @relation("VoteStepTeam", fields: [teamId], references: [id]) - // Ergebnis & wer gewählt hat map String? chosenAt DateTime? chosenBy String? - chooser User? @relation("VetoStepChooser", fields: [chosenBy], references: [steamId]) + chooser User? @relation("VoteStepChooser", fields: [chosenBy], references: [steamId]) - veto MapVeto @relation(fields: [vetoId], references: [id]) + vote MapVote @relation(fields: [voteId], references: [id]) - @@unique([vetoId, order]) + @@unique([voteId, order]) @@index([teamId]) @@index([chosenBy]) } diff --git a/src/generated/prisma/wasm.js b/src/generated/prisma/wasm.js index 5a89a34..39bc898 100644 --- a/src/generated/prisma/wasm.js +++ b/src/generated/prisma/wasm.js @@ -20,12 +20,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd + * Prisma Client JS version: 6.14.0 + * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 */ Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" + client: "6.14.0", + engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" } Prisma.PrismaClientKnownRequestError = () => { @@ -276,7 +276,7 @@ exports.Prisma.ServerRequestScalarFieldEnum = { createdAt: 'createdAt' }; -exports.Prisma.MapVetoScalarFieldEnum = { +exports.Prisma.MapVoteScalarFieldEnum = { id: 'id', matchId: 'matchId', bestOf: 'bestOf', @@ -284,13 +284,15 @@ exports.Prisma.MapVetoScalarFieldEnum = { currentIdx: 'currentIdx', locked: 'locked', opensAt: 'opensAt', + adminEditingBy: 'adminEditingBy', + adminEditingSince: 'adminEditingSince', createdAt: 'createdAt', updatedAt: 'updatedAt' }; -exports.Prisma.MapVetoStepScalarFieldEnum = { +exports.Prisma.MapVoteStepScalarFieldEnum = { id: 'id', - vetoId: 'vetoId', + voteId: 'voteId', order: 'order', action: 'action', teamId: 'teamId', @@ -332,7 +334,7 @@ exports.ScheduleStatus = exports.$Enums.ScheduleStatus = { COMPLETED: 'COMPLETED' }; -exports.MapVetoAction = exports.$Enums.MapVetoAction = { +exports.MapVoteAction = exports.$Enums.MapVoteAction = { BAN: 'BAN', PICK: 'PICK', DECIDER: 'DECIDER' @@ -350,8 +352,8 @@ exports.Prisma.ModelName = { Schedule: 'Schedule', DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', - MapVeto: 'MapVeto', - MapVetoStep: 'MapVetoStep' + MapVote: 'MapVote', + MapVoteStep: 'MapVoteStep' }; /**