diff --git a/.gitignore b/.gitignore index 796d840..9a87a2f 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# ignore mongoexport old db file +db.json \ No newline at end of file diff --git a/package.json b/package.json index b6aeb4f..e26983d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "lint": "eslint --fix", "prettier": "prettier './src' --write", "db:generate": "prisma db push --force-reset --accept-data-loss && prisma db seed", + "db:generate:account": "prisma db push --force-reset --accept-data-loss --schema src/db/account.prisma && ts-node ./src/db/account-seed", "db:studio": "prisma studio", + "db:studio:account": "prisma studio --schema src/db/account.prisma", "swagger:generate": "ts-node ./src/swagger/generate", "postinstall": "tsc && yarn swagger:generate && yarn db:generate" }, @@ -55,7 +57,7 @@ "dependencies": { "@ethersproject/providers": "^5.7.1", "@octokit/rest": "^19.0.7", - "@prisma/client": "4.11.0", + "@prisma/client": "^5.11.0", "cors": "^2.8.5", "cross-fetch": "^3.1.5", "dayjs": "^1.11.7", @@ -66,10 +68,9 @@ "handlebars": "^4.7.7", "helmet": "^6.0.1", "markdown-it": "^13.0.1", - "prisma": "^4.11.0", "puppeteer": "18.2.1", "slugify": "^1.6.5", - "sqlite3": "^5.1.4", + "sqlite3": "^5.1.7", "swagger-ui-express": "^4.6.0" }, "devDependencies": { @@ -97,6 +98,7 @@ "lint-staged": "^13.1.0", "nodemon": "^2.0.20", "prettier": "^2.8.3", + "prisma": "^5.11.0", "supertest": "^6.3.3", "swagger-autogen": "^2.22.0", "ts-jest": "^29.0.5", diff --git a/src/db/account-seed.ts b/src/db/account-seed.ts new file mode 100644 index 0000000..afcaced --- /dev/null +++ b/src/db/account-seed.ts @@ -0,0 +1,75 @@ +import { PrismaClient } from '../db/clients/account' +import { FileHandle, open } from 'node:fs/promises' +import path from 'path' + +const client = new PrismaClient() +const testLimit = 0 + +async function main() { + let file: FileHandle | undefined + try { + file = await open(path.join(__dirname, '../../', 'db.json')) + } catch (e) { + console.log('Error opening file') + console.error(e) + } + if (!file) return + + let connected = false + while (!connected) { + console.log('Connecting to db..') + try { + await client.$connect() + connected = true + } catch (e) { + console.log('Error connecting to db. Retrying in 5 secs..') + await new Promise((resolve) => setTimeout(resolve, 5000)) + } + } + + let i = 0 + let accounts = [] + console.log('Importing accounts from db.json file..') + for await (const line of file.readLines()) { + i++ + const accountImport = JSON.parse(line) + const interested = accountImport.appState.sessions.filter((s: any) => s.level === 'interested').map((i: any) => i.id) + const attending = accountImport.appState.sessions.filter((s: any) => s.level === 'attending').map((i: any) => i.id) + + accounts.push({ + username: accountImport.username, + email: accountImport.email, + addresses: accountImport.addresses ?? [], + disabled: accountImport.disabled ?? false, + + favorite_speakers: accountImport.appState.speakers, + interested_sessions: [], + attending_sessions: [], + publicSchedule: accountImport.appState.publicSchedule, + notifications: false, + appState_bogota: JSON.stringify({ interested, attending }), + + createdAt: new Date(accountImport.createdAt['$date']), + updatedAt: accountImport.updatedAt ? new Date(accountImport.updatedAt['$date']) : new Date(), + }) + + if (testLimit > 0 && i >= testLimit) break + } + + console.log(`Importing ${i} accounts..`) + const result = await client.account.createMany({ + data: accounts, + }) + console.log(`Imported ${result.count} accounts.`) + console.log('Done!') +} + +main() + .then(async () => { + await client.$disconnect() + }) + .catch(async (e) => { + console.error(e) + await client.$disconnect() + process.exit(1) + }) diff --git a/src/db/account.prisma b/src/db/account.prisma new file mode 100644 index 0000000..8601149 --- /dev/null +++ b/src/db/account.prisma @@ -0,0 +1,35 @@ +datasource db { + provider = "postgres" + url = env("DB_CONNECTION_STRING") +} + +generator client { + provider = "prisma-client-js" + output = "./clients/account" +} + +model VerificationToken { + id String @default(cuid()) @id + identifier String + nonce Int + issued DateTime @default(now()) + expires DateTime +} + +model Account { + id String @default(cuid()) @id + username String? + email String? + addresses String[] + disabled Boolean @default(false) + + favorite_speakers String[] + interested_sessions String[] + attending_sessions String[] + publicSchedule Boolean @default(false) + notifications Boolean @default(false) + appState_bogota String? + + createdAt DateTime @default(now()) + updatedAt DateTime? +} diff --git a/src/db/clients/account/default.d.ts b/src/db/clients/account/default.d.ts new file mode 100644 index 0000000..34c6161 --- /dev/null +++ b/src/db/clients/account/default.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/src/db/clients/account/default.js b/src/db/clients/account/default.js new file mode 100644 index 0000000..fa52f0c --- /dev/null +++ b/src/db/clients/account/default.js @@ -0,0 +1 @@ +module.exports = { ...require('.') } \ No newline at end of file diff --git a/src/db/clients/account/edge.d.ts b/src/db/clients/account/edge.d.ts new file mode 100644 index 0000000..479a9ab --- /dev/null +++ b/src/db/clients/account/edge.d.ts @@ -0,0 +1 @@ +export * from './default' \ No newline at end of file diff --git a/src/db/clients/account/edge.js b/src/db/clients/account/edge.js new file mode 100644 index 0000000..40c9920 --- /dev/null +++ b/src/db/clients/account/edge.js @@ -0,0 +1,203 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('./runtime/edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.11.0 + * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102 + */ +Prisma.prismaVersion = { + client: "5.11.0", + engine: "efd2449663b3d73d637ea1fd226bafbcf45b3102" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.NotFoundError = NotFoundError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.VerificationTokenScalarFieldEnum = { + id: 'id', + identifier: 'identifier', + nonce: 'nonce', + issued: 'issued', + expires: 'expires' +}; + +exports.Prisma.AccountScalarFieldEnum = { + id: 'id', + username: 'username', + email: 'email', + addresses: 'addresses', + disabled: 'disabled', + favorite_speakers: 'favorite_speakers', + interested_sessions: 'interested_sessions', + attending_sessions: 'attending_sessions', + publicSchedule: 'publicSchedule', + notifications: 'notifications', + appState_bogota: 'appState_bogota', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + + +exports.Prisma.ModelName = { + VerificationToken: 'VerificationToken', + Account: 'Account' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "/home/w/Code/devcon-api/src/db/clients/account", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", + "native": true + } + ], + "previewFeatures": [], + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": null, + "schemaEnvPath": "../../../../.env" + }, + "relativePath": "../..", + "clientVersion": "5.11.0", + "engineVersion": "efd2449663b3d73d637ea1fd226bafbcf45b3102", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DB_CONNECTION_STRING", + "value": null + } + } + }, + "inlineSchema": "datasource db {\n provider = \"postgres\"\n url = env(\"DB_CONNECTION_STRING\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./clients/account\"\n}\n\nmodel VerificationToken {\n id String @default(cuid()) @id\n identifier String\n nonce Int\n issued DateTime @default(now())\n expires DateTime\n}\n\nmodel Account {\n id String @default(cuid()) @id\n username String?\n email String?\n addresses String[]\n disabled Boolean @default(false)\n \n favorite_speakers String[]\n interested_sessions String[]\n attending_sessions String[]\n publicSchedule Boolean @default(false)\n notifications Boolean @default(false)\n appState_bogota String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime?\n}\n", + "inlineSchemaHash": "f9a95bb20669ea54b0f8ea74f6b4e960b17382b534f52d8d04a619060eb53a42", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nonce\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"issued\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"username\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"disabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favorite_speakers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"interested_sessions\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attending_sessions\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicSchedule\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"appState_bogota\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined + +config.injectableEdgeEnv = () => ({ + parsed: { + DB_CONNECTION_STRING: typeof globalThis !== 'undefined' && globalThis['DB_CONNECTION_STRING'] || typeof process !== 'undefined' && process.env && process.env.DB_CONNECTION_STRING || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/src/db/clients/account/index-browser.js b/src/db/clients/account/index-browser.js new file mode 100644 index 0000000..95253b8 --- /dev/null +++ b/src/db/clients/account/index-browser.js @@ -0,0 +1,196 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.11.0 + * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102 + */ +Prisma.prismaVersion = { + client: "5.11.0", + engine: "efd2449663b3d73d637ea1fd226bafbcf45b3102" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.NotFoundError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.VerificationTokenScalarFieldEnum = { + id: 'id', + identifier: 'identifier', + nonce: 'nonce', + issued: 'issued', + expires: 'expires' +}; + +exports.Prisma.AccountScalarFieldEnum = { + id: 'id', + username: 'username', + email: 'email', + addresses: 'addresses', + disabled: 'disabled', + favorite_speakers: 'favorite_speakers', + interested_sessions: 'interested_sessions', + attending_sessions: 'attending_sessions', + publicSchedule: 'publicSchedule', + notifications: 'notifications', + appState_bogota: 'appState_bogota', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + + +exports.Prisma.ModelName = { + VerificationToken: 'VerificationToken', + Account: 'Account' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/src/db/clients/account/index.d.ts b/src/db/clients/account/index.d.ts new file mode 100644 index 0000000..f3f04df --- /dev/null +++ b/src/db/clients/account/index.d.ts @@ -0,0 +1,3755 @@ + +/** + * Client +**/ + +import * as runtime from './runtime/library.js'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise + + +/** + * Model VerificationToken + * + */ +export type VerificationToken = $Result.DefaultSelection +/** + * Model Account + * + */ +export type Account = $Result.DefaultSelection + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more VerificationTokens + * const verificationTokens = await prisma.verificationToken.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more VerificationTokens + * const verificationTokens = await prisma.verificationToken.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $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 + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise + + + $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + + /** + * `prisma.verificationToken`: Exposes CRUD operations for the **VerificationToken** model. + * Example usage: + * ```ts + * // Fetch zero or more VerificationTokens + * const verificationTokens = await prisma.verificationToken.findMany() + * ``` + */ + get verificationToken(): Prisma.VerificationTokenDelegate; + + /** + * `prisma.account`: Exposes CRUD operations for the **Account** model. + * Example usage: + * ```ts + * // Fetch zero or more Accounts + * const accounts = await prisma.account.findMany() + * ``` + */ + get account(): Prisma.AccountDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + export import NotFoundError = runtime.NotFoundError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export import Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = $Public.Args + export import Payload = $Public.Payload + export import Result = $Public.Result + export import Exact = $Public.Exact + + /** + * Prisma Client JS version: 5.11.0 + * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102 + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ + export type JsonObject = {[Key in string]?: JsonValue} + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ + export interface JsonArray extends Array {} + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ + export type JsonValue = string | number | boolean | JsonObject | JsonArray | null + + /** + * Matches a JSON object. + * Unlike `JsonObject`, this type allows undefined and read-only properties. + */ + export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} + + /** + * Matches a JSON array. + * Unlike `JsonArray`, readonly arrays are assignable to this type. + */ + export interface InputJsonArray extends ReadonlyArray {} + + /** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike `JsonValue`, this + * type allows read-only arrays and read-only object properties and disallows + * `null` at the top level. + * + * `null` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or + * `Prisma.DbNull` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ + export type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { toJSON(): unknown } + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType $Utils.JsPromise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but additionally can also accept an array of keys + */ + type PickEnumerable | keyof T> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + VerificationToken: 'VerificationToken', + Account: 'Account' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs}, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + meta: { + modelProps: 'verificationToken' | 'account' + txIsolationLevel: Prisma.TransactionIsolationLevel + }, + model: { + VerificationToken: { + payload: Prisma.$VerificationTokenPayload + fields: Prisma.VerificationTokenFieldRefs + operations: { + findUnique: { + args: Prisma.VerificationTokenFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.VerificationTokenFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.VerificationTokenFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.VerificationTokenFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.VerificationTokenFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.VerificationTokenCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.VerificationTokenCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.VerificationTokenDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.VerificationTokenUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.VerificationTokenDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.VerificationTokenUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.VerificationTokenUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.VerificationTokenAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.VerificationTokenGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.VerificationTokenCountArgs, + result: $Utils.Optional | number + } + } + } + Account: { + payload: Prisma.$AccountPayload + fields: Prisma.AccountFieldRefs + operations: { + findUnique: { + args: Prisma.AccountFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AccountFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AccountFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AccountFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AccountFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AccountCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AccountCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.AccountDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AccountUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AccountDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.AccountUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.AccountUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AccountAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.AccountGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.AccountCountArgs, + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Defaults to stdout + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * ] + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + } + } + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never + export type GetEvents = T extends Array ? + GetLogType | GetLogType | GetLogType | GetLogType + : never + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'update' + | 'updateMany' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | '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; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + + /** + * Models + */ + + /** + * Model VerificationToken + */ + + export type AggregateVerificationToken = { + _count: VerificationTokenCountAggregateOutputType | null + _avg: VerificationTokenAvgAggregateOutputType | null + _sum: VerificationTokenSumAggregateOutputType | null + _min: VerificationTokenMinAggregateOutputType | null + _max: VerificationTokenMaxAggregateOutputType | null + } + + export type VerificationTokenAvgAggregateOutputType = { + nonce: number | null + } + + export type VerificationTokenSumAggregateOutputType = { + nonce: number | null + } + + export type VerificationTokenMinAggregateOutputType = { + id: string | null + identifier: string | null + nonce: number | null + issued: Date | null + expires: Date | null + } + + export type VerificationTokenMaxAggregateOutputType = { + id: string | null + identifier: string | null + nonce: number | null + issued: Date | null + expires: Date | null + } + + export type VerificationTokenCountAggregateOutputType = { + id: number + identifier: number + nonce: number + issued: number + expires: number + _all: number + } + + + export type VerificationTokenAvgAggregateInputType = { + nonce?: true + } + + export type VerificationTokenSumAggregateInputType = { + nonce?: true + } + + export type VerificationTokenMinAggregateInputType = { + id?: true + identifier?: true + nonce?: true + issued?: true + expires?: true + } + + export type VerificationTokenMaxAggregateInputType = { + id?: true + identifier?: true + nonce?: true + issued?: true + expires?: true + } + + export type VerificationTokenCountAggregateInputType = { + id?: true + identifier?: true + nonce?: true + issued?: true + expires?: true + _all?: true + } + + export type VerificationTokenAggregateArgs = { + /** + * Filter which VerificationToken to aggregate. + */ + where?: VerificationTokenWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of VerificationTokens to fetch. + */ + orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: VerificationTokenWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` VerificationTokens 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` VerificationTokens. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned VerificationTokens + **/ + _count?: true | VerificationTokenCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: VerificationTokenAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: VerificationTokenSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: VerificationTokenMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: VerificationTokenMaxAggregateInputType + } + + export type GetVerificationTokenAggregateType = { + [P in keyof T & keyof AggregateVerificationToken]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type VerificationTokenGroupByArgs = { + where?: VerificationTokenWhereInput + orderBy?: VerificationTokenOrderByWithAggregationInput | VerificationTokenOrderByWithAggregationInput[] + by: VerificationTokenScalarFieldEnum[] | VerificationTokenScalarFieldEnum + having?: VerificationTokenScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: VerificationTokenCountAggregateInputType | true + _avg?: VerificationTokenAvgAggregateInputType + _sum?: VerificationTokenSumAggregateInputType + _min?: VerificationTokenMinAggregateInputType + _max?: VerificationTokenMaxAggregateInputType + } + + export type VerificationTokenGroupByOutputType = { + id: string + identifier: string + nonce: number + issued: Date + expires: Date + _count: VerificationTokenCountAggregateOutputType | null + _avg: VerificationTokenAvgAggregateOutputType | null + _sum: VerificationTokenSumAggregateOutputType | null + _min: VerificationTokenMinAggregateOutputType | null + _max: VerificationTokenMaxAggregateOutputType | null + } + + type GetVerificationTokenGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof VerificationTokenGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type VerificationTokenSelect = $Extensions.GetSelect<{ + id?: boolean + identifier?: boolean + nonce?: boolean + issued?: boolean + expires?: boolean + }, ExtArgs["result"]["verificationToken"]> + + export type VerificationTokenSelectScalar = { + id?: boolean + identifier?: boolean + nonce?: boolean + issued?: boolean + expires?: boolean + } + + + export type $VerificationTokenPayload = { + name: "VerificationToken" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + identifier: string + nonce: number + issued: Date + expires: Date + }, ExtArgs["result"]["verificationToken"]> + composites: {} + } + + + type VerificationTokenGetPayload = $Result.GetResult + + type VerificationTokenCountArgs = + Omit & { + select?: VerificationTokenCountAggregateInputType | true + } + + export interface VerificationTokenDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['VerificationToken'], meta: { name: 'VerificationToken' } } + /** + * Find zero or one VerificationToken that matches the filter. + * @param {VerificationTokenFindUniqueArgs} args - Arguments to find a VerificationToken + * @example + * // Get one VerificationToken + * const verificationToken = await prisma.verificationToken.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique>( + args: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + + /** + * Find one VerificationToken that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {VerificationTokenFindUniqueOrThrowArgs} args - Arguments to find a VerificationToken + * @example + * // Get one VerificationToken + * const verificationToken = await prisma.verificationToken.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + + /** + * Find the first VerificationToken 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 {VerificationTokenFindFirstArgs} args - Arguments to find a VerificationToken + * @example + * // Get one VerificationToken + * const verificationToken = await prisma.verificationToken.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst>( + args?: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + + /** + * Find the first VerificationToken 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 {VerificationTokenFindFirstOrThrowArgs} args - Arguments to find a VerificationToken + * @example + * // Get one VerificationToken + * const verificationToken = await prisma.verificationToken.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + + /** + * Find zero or more VerificationTokens 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 {VerificationTokenFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all VerificationTokens + * const verificationTokens = await prisma.verificationToken.findMany() + * + * // Get first 10 VerificationTokens + * const verificationTokens = await prisma.verificationToken.findMany({ take: 10 }) + * + * // Only select the `id` + * const verificationTokenWithIdOnly = await prisma.verificationToken.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + + /** + * Create a VerificationToken. + * @param {VerificationTokenCreateArgs} args - Arguments to create a VerificationToken. + * @example + * // Create one VerificationToken + * const VerificationToken = await prisma.verificationToken.create({ + * data: { + * // ... data to create a VerificationToken + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + + /** + * Create many VerificationTokens. + * @param {VerificationTokenCreateManyArgs} args - Arguments to create many VerificationTokens. + * @example + * // Create many VerificationTokens + * const verificationToken = await prisma.verificationToken.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a VerificationToken. + * @param {VerificationTokenDeleteArgs} args - Arguments to delete one VerificationToken. + * @example + * // Delete one VerificationToken + * const VerificationToken = await prisma.verificationToken.delete({ + * where: { + * // ... filter to delete one VerificationToken + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + + /** + * Update one VerificationToken. + * @param {VerificationTokenUpdateArgs} args - Arguments to update one VerificationToken. + * @example + * // Update one VerificationToken + * const verificationToken = await prisma.verificationToken.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + + /** + * Delete zero or more VerificationTokens. + * @param {VerificationTokenDeleteManyArgs} args - Arguments to filter VerificationTokens to delete. + * @example + * // Delete a few VerificationTokens + * const { count } = await prisma.verificationToken.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more VerificationTokens. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {VerificationTokenUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many VerificationTokens + * const verificationToken = await prisma.verificationToken.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one VerificationToken. + * @param {VerificationTokenUpsertArgs} args - Arguments to update or create a VerificationToken. + * @example + * // Update or create a VerificationToken + * const verificationToken = await prisma.verificationToken.upsert({ + * create: { + * // ... data to create a VerificationToken + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the VerificationToken we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__VerificationTokenClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + + /** + * Count the number of VerificationTokens. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {VerificationTokenCountArgs} args - Arguments to filter VerificationTokens to count. + * @example + * // Count the number of VerificationTokens + * const count = await prisma.verificationToken.count({ + * where: { + * // ... the filter for the VerificationTokens we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a VerificationToken. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {VerificationTokenAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by VerificationToken. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {VerificationTokenGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends VerificationTokenGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: VerificationTokenGroupByArgs['orderBy'] } + : { orderBy?: VerificationTokenGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetVerificationTokenGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the VerificationToken model + */ + readonly fields: VerificationTokenFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for VerificationToken. + * 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__VerificationTokenClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise'; + + + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; + } + + + + /** + * Fields of the VerificationToken model + */ + interface VerificationTokenFieldRefs { + readonly id: FieldRef<"VerificationToken", 'String'> + readonly identifier: FieldRef<"VerificationToken", 'String'> + readonly nonce: FieldRef<"VerificationToken", 'Int'> + readonly issued: FieldRef<"VerificationToken", 'DateTime'> + readonly expires: FieldRef<"VerificationToken", 'DateTime'> + } + + + // Custom InputTypes + + /** + * VerificationToken findUnique + */ + export type VerificationTokenFindUniqueArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter, which VerificationToken to fetch. + */ + where: VerificationTokenWhereUniqueInput + } + + + /** + * VerificationToken findUniqueOrThrow + */ + export type VerificationTokenFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter, which VerificationToken to fetch. + */ + where: VerificationTokenWhereUniqueInput + } + + + /** + * VerificationToken findFirst + */ + export type VerificationTokenFindFirstArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter, which VerificationToken to fetch. + */ + where?: VerificationTokenWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of VerificationTokens to fetch. + */ + orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for VerificationTokens. + */ + cursor?: VerificationTokenWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` VerificationTokens 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` VerificationTokens. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of VerificationTokens. + */ + distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] + } + + + /** + * VerificationToken findFirstOrThrow + */ + export type VerificationTokenFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter, which VerificationToken to fetch. + */ + where?: VerificationTokenWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of VerificationTokens to fetch. + */ + orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for VerificationTokens. + */ + cursor?: VerificationTokenWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` VerificationTokens 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` VerificationTokens. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of VerificationTokens. + */ + distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] + } + + + /** + * VerificationToken findMany + */ + export type VerificationTokenFindManyArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter, which VerificationTokens to fetch. + */ + where?: VerificationTokenWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of VerificationTokens to fetch. + */ + orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing VerificationTokens. + */ + cursor?: VerificationTokenWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` VerificationTokens 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` VerificationTokens. + */ + skip?: number + distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] + } + + + /** + * VerificationToken create + */ + export type VerificationTokenCreateArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * The data needed to create a VerificationToken. + */ + data: XOR + } + + + /** + * VerificationToken createMany + */ + export type VerificationTokenCreateManyArgs = { + /** + * The data used to create many VerificationTokens. + */ + data: VerificationTokenCreateManyInput | VerificationTokenCreateManyInput[] + skipDuplicates?: boolean + } + + + /** + * VerificationToken update + */ + export type VerificationTokenUpdateArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * The data needed to update a VerificationToken. + */ + data: XOR + /** + * Choose, which VerificationToken to update. + */ + where: VerificationTokenWhereUniqueInput + } + + + /** + * VerificationToken updateMany + */ + export type VerificationTokenUpdateManyArgs = { + /** + * The data used to update VerificationTokens. + */ + data: XOR + /** + * Filter which VerificationTokens to update + */ + where?: VerificationTokenWhereInput + } + + + /** + * VerificationToken upsert + */ + export type VerificationTokenUpsertArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * The filter to search for the VerificationToken to update in case it exists. + */ + where: VerificationTokenWhereUniqueInput + /** + * In case the VerificationToken found by the `where` argument doesn't exist, create a new VerificationToken with this data. + */ + create: XOR + /** + * In case the VerificationToken was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * VerificationToken delete + */ + export type VerificationTokenDeleteArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + /** + * Filter which VerificationToken to delete. + */ + where: VerificationTokenWhereUniqueInput + } + + + /** + * VerificationToken deleteMany + */ + export type VerificationTokenDeleteManyArgs = { + /** + * Filter which VerificationTokens to delete + */ + where?: VerificationTokenWhereInput + } + + + /** + * VerificationToken without action + */ + export type VerificationTokenDefaultArgs = { + /** + * Select specific fields to fetch from the VerificationToken + */ + select?: VerificationTokenSelect | null + } + + + + /** + * Model Account + */ + + export type AggregateAccount = { + _count: AccountCountAggregateOutputType | null + _min: AccountMinAggregateOutputType | null + _max: AccountMaxAggregateOutputType | null + } + + export type AccountMinAggregateOutputType = { + id: string | null + username: string | null + email: string | null + disabled: boolean | null + publicSchedule: boolean | null + notifications: boolean | null + appState_bogota: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AccountMaxAggregateOutputType = { + id: string | null + username: string | null + email: string | null + disabled: boolean | null + publicSchedule: boolean | null + notifications: boolean | null + appState_bogota: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AccountCountAggregateOutputType = { + id: number + username: number + email: number + addresses: number + disabled: number + favorite_speakers: number + interested_sessions: number + attending_sessions: number + publicSchedule: number + notifications: number + appState_bogota: number + createdAt: number + updatedAt: number + _all: number + } + + + export type AccountMinAggregateInputType = { + id?: true + username?: true + email?: true + disabled?: true + publicSchedule?: true + notifications?: true + appState_bogota?: true + createdAt?: true + updatedAt?: true + } + + export type AccountMaxAggregateInputType = { + id?: true + username?: true + email?: true + disabled?: true + publicSchedule?: true + notifications?: true + appState_bogota?: true + createdAt?: true + updatedAt?: true + } + + export type AccountCountAggregateInputType = { + id?: true + username?: true + email?: true + addresses?: true + disabled?: true + favorite_speakers?: true + interested_sessions?: true + attending_sessions?: true + publicSchedule?: true + notifications?: true + appState_bogota?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type AccountAggregateArgs = { + /** + * Filter which Account to aggregate. + */ + where?: AccountWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Accounts to fetch. + */ + orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AccountWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Accounts 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` Accounts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Accounts + **/ + _count?: true | AccountCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AccountMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AccountMaxAggregateInputType + } + + export type GetAccountAggregateType = { + [P in keyof T & keyof AggregateAccount]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AccountGroupByArgs = { + where?: AccountWhereInput + orderBy?: AccountOrderByWithAggregationInput | AccountOrderByWithAggregationInput[] + by: AccountScalarFieldEnum[] | AccountScalarFieldEnum + having?: AccountScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AccountCountAggregateInputType | true + _min?: AccountMinAggregateInputType + _max?: AccountMaxAggregateInputType + } + + export type AccountGroupByOutputType = { + id: string + username: string | null + email: string | null + addresses: string[] + disabled: boolean + favorite_speakers: string[] + interested_sessions: string[] + attending_sessions: string[] + publicSchedule: boolean + notifications: boolean + appState_bogota: string | null + createdAt: Date + updatedAt: Date | null + _count: AccountCountAggregateOutputType | null + _min: AccountMinAggregateOutputType | null + _max: AccountMaxAggregateOutputType | null + } + + type GetAccountGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AccountGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AccountSelect = $Extensions.GetSelect<{ + id?: boolean + username?: boolean + email?: boolean + addresses?: boolean + disabled?: boolean + favorite_speakers?: boolean + interested_sessions?: boolean + attending_sessions?: boolean + publicSchedule?: boolean + notifications?: boolean + appState_bogota?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["account"]> + + export type AccountSelectScalar = { + id?: boolean + username?: boolean + email?: boolean + addresses?: boolean + disabled?: boolean + favorite_speakers?: boolean + interested_sessions?: boolean + attending_sessions?: boolean + publicSchedule?: boolean + notifications?: boolean + appState_bogota?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + + export type $AccountPayload = { + name: "Account" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + username: string | null + email: string | null + addresses: string[] + disabled: boolean + favorite_speakers: string[] + interested_sessions: string[] + attending_sessions: string[] + publicSchedule: boolean + notifications: boolean + appState_bogota: string | null + createdAt: Date + updatedAt: Date | null + }, ExtArgs["result"]["account"]> + composites: {} + } + + + type AccountGetPayload = $Result.GetResult + + type AccountCountArgs = + Omit & { + select?: AccountCountAggregateInputType | true + } + + export interface AccountDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Account'], meta: { name: 'Account' } } + /** + * Find zero or one Account that matches the filter. + * @param {AccountFindUniqueArgs} args - Arguments to find a Account + * @example + * // Get one Account + * const account = await prisma.account.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique>( + args: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + + /** + * Find one Account that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AccountFindUniqueOrThrowArgs} args - Arguments to find a Account + * @example + * // Get one Account + * const account = await prisma.account.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + + /** + * Find the first Account 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 {AccountFindFirstArgs} args - Arguments to find a Account + * @example + * // Get one Account + * const account = await prisma.account.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst>( + args?: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + + /** + * Find the first Account 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 {AccountFindFirstOrThrowArgs} args - Arguments to find a Account + * @example + * // Get one Account + * const account = await prisma.account.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + + /** + * Find zero or more Accounts 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 {AccountFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Accounts + * const accounts = await prisma.account.findMany() + * + * // Get first 10 Accounts + * const accounts = await prisma.account.findMany({ take: 10 }) + * + * // Only select the `id` + * const accountWithIdOnly = await prisma.account.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + + /** + * Create a Account. + * @param {AccountCreateArgs} args - Arguments to create a Account. + * @example + * // Create one Account + * const Account = await prisma.account.create({ + * data: { + * // ... data to create a Account + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + + /** + * Create many Accounts. + * @param {AccountCreateManyArgs} args - Arguments to create many Accounts. + * @example + * // Create many Accounts + * const account = await prisma.account.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Account. + * @param {AccountDeleteArgs} args - Arguments to delete one Account. + * @example + * // Delete one Account + * const Account = await prisma.account.delete({ + * where: { + * // ... filter to delete one Account + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + + /** + * Update one Account. + * @param {AccountUpdateArgs} args - Arguments to update one Account. + * @example + * // Update one Account + * const account = await prisma.account.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + + /** + * Delete zero or more Accounts. + * @param {AccountDeleteManyArgs} args - Arguments to filter Accounts to delete. + * @example + * // Delete a few Accounts + * const { count } = await prisma.account.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Accounts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Accounts + * const account = await prisma.account.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Account. + * @param {AccountUpsertArgs} args - Arguments to update or create a Account. + * @example + * // Update or create a Account + * const account = await prisma.account.upsert({ + * create: { + * // ... data to create a Account + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Account we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__AccountClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + + /** + * Count the number of Accounts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountCountArgs} args - Arguments to filter Accounts to count. + * @example + * // Count the number of Accounts + * const count = await prisma.account.count({ + * where: { + * // ... the filter for the Accounts we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Account. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Account. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AccountGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AccountGroupByArgs['orderBy'] } + : { orderBy?: AccountGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAccountGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Account model + */ + readonly fields: AccountFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Account. + * 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__AccountClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise'; + + + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; + } + + + + /** + * Fields of the Account model + */ + interface AccountFieldRefs { + readonly id: FieldRef<"Account", 'String'> + readonly username: FieldRef<"Account", 'String'> + readonly email: FieldRef<"Account", 'String'> + readonly addresses: FieldRef<"Account", 'String[]'> + readonly disabled: FieldRef<"Account", 'Boolean'> + readonly favorite_speakers: FieldRef<"Account", 'String[]'> + readonly interested_sessions: FieldRef<"Account", 'String[]'> + readonly attending_sessions: FieldRef<"Account", 'String[]'> + readonly publicSchedule: FieldRef<"Account", 'Boolean'> + readonly notifications: FieldRef<"Account", 'Boolean'> + readonly appState_bogota: FieldRef<"Account", 'String'> + readonly createdAt: FieldRef<"Account", 'DateTime'> + readonly updatedAt: FieldRef<"Account", 'DateTime'> + } + + + // Custom InputTypes + + /** + * Account findUnique + */ + export type AccountFindUniqueArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter, which Account to fetch. + */ + where: AccountWhereUniqueInput + } + + + /** + * Account findUniqueOrThrow + */ + export type AccountFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter, which Account to fetch. + */ + where: AccountWhereUniqueInput + } + + + /** + * Account findFirst + */ + export type AccountFindFirstArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter, which Account to fetch. + */ + where?: AccountWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Accounts to fetch. + */ + orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Accounts. + */ + cursor?: AccountWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Accounts 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` Accounts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Accounts. + */ + distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] + } + + + /** + * Account findFirstOrThrow + */ + export type AccountFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter, which Account to fetch. + */ + where?: AccountWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Accounts to fetch. + */ + orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Accounts. + */ + cursor?: AccountWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Accounts 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` Accounts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Accounts. + */ + distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] + } + + + /** + * Account findMany + */ + export type AccountFindManyArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter, which Accounts to fetch. + */ + where?: AccountWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Accounts to fetch. + */ + orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Accounts. + */ + cursor?: AccountWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Accounts 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` Accounts. + */ + skip?: number + distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] + } + + + /** + * Account create + */ + export type AccountCreateArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * The data needed to create a Account. + */ + data?: XOR + } + + + /** + * Account createMany + */ + export type AccountCreateManyArgs = { + /** + * The data used to create many Accounts. + */ + data: AccountCreateManyInput | AccountCreateManyInput[] + skipDuplicates?: boolean + } + + + /** + * Account update + */ + export type AccountUpdateArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * The data needed to update a Account. + */ + data: XOR + /** + * Choose, which Account to update. + */ + where: AccountWhereUniqueInput + } + + + /** + * Account updateMany + */ + export type AccountUpdateManyArgs = { + /** + * The data used to update Accounts. + */ + data: XOR + /** + * Filter which Accounts to update + */ + where?: AccountWhereInput + } + + + /** + * Account upsert + */ + export type AccountUpsertArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * The filter to search for the Account to update in case it exists. + */ + where: AccountWhereUniqueInput + /** + * In case the Account found by the `where` argument doesn't exist, create a new Account with this data. + */ + create: XOR + /** + * In case the Account was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Account delete + */ + export type AccountDeleteArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Filter which Account to delete. + */ + where: AccountWhereUniqueInput + } + + + /** + * Account deleteMany + */ + export type AccountDeleteManyArgs = { + /** + * Filter which Accounts to delete + */ + where?: AccountWhereInput + } + + + /** + * Account without action + */ + export type AccountDefaultArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + } + + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const VerificationTokenScalarFieldEnum: { + id: 'id', + identifier: 'identifier', + nonce: 'nonce', + issued: 'issued', + expires: 'expires' + }; + + export type VerificationTokenScalarFieldEnum = (typeof VerificationTokenScalarFieldEnum)[keyof typeof VerificationTokenScalarFieldEnum] + + + export const AccountScalarFieldEnum: { + id: 'id', + username: 'username', + email: 'email', + addresses: 'addresses', + disabled: 'disabled', + favorite_speakers: 'favorite_speakers', + interested_sessions: 'interested_sessions', + attending_sessions: 'attending_sessions', + publicSchedule: 'publicSchedule', + notifications: 'notifications', + appState_bogota: 'appState_bogota', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'String[]' + */ + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + /** + * Deep Input Types + */ + + + export type VerificationTokenWhereInput = { + AND?: VerificationTokenWhereInput | VerificationTokenWhereInput[] + OR?: VerificationTokenWhereInput[] + NOT?: VerificationTokenWhereInput | VerificationTokenWhereInput[] + id?: StringFilter<"VerificationToken"> | string + identifier?: StringFilter<"VerificationToken"> | string + nonce?: IntFilter<"VerificationToken"> | number + issued?: DateTimeFilter<"VerificationToken"> | Date | string + expires?: DateTimeFilter<"VerificationToken"> | Date | string + } + + export type VerificationTokenOrderByWithRelationInput = { + id?: SortOrder + identifier?: SortOrder + nonce?: SortOrder + issued?: SortOrder + expires?: SortOrder + } + + export type VerificationTokenWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: VerificationTokenWhereInput | VerificationTokenWhereInput[] + OR?: VerificationTokenWhereInput[] + NOT?: VerificationTokenWhereInput | VerificationTokenWhereInput[] + identifier?: StringFilter<"VerificationToken"> | string + nonce?: IntFilter<"VerificationToken"> | number + issued?: DateTimeFilter<"VerificationToken"> | Date | string + expires?: DateTimeFilter<"VerificationToken"> | Date | string + }, "id"> + + export type VerificationTokenOrderByWithAggregationInput = { + id?: SortOrder + identifier?: SortOrder + nonce?: SortOrder + issued?: SortOrder + expires?: SortOrder + _count?: VerificationTokenCountOrderByAggregateInput + _avg?: VerificationTokenAvgOrderByAggregateInput + _max?: VerificationTokenMaxOrderByAggregateInput + _min?: VerificationTokenMinOrderByAggregateInput + _sum?: VerificationTokenSumOrderByAggregateInput + } + + export type VerificationTokenScalarWhereWithAggregatesInput = { + AND?: VerificationTokenScalarWhereWithAggregatesInput | VerificationTokenScalarWhereWithAggregatesInput[] + OR?: VerificationTokenScalarWhereWithAggregatesInput[] + NOT?: VerificationTokenScalarWhereWithAggregatesInput | VerificationTokenScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"VerificationToken"> | string + identifier?: StringWithAggregatesFilter<"VerificationToken"> | string + nonce?: IntWithAggregatesFilter<"VerificationToken"> | number + issued?: DateTimeWithAggregatesFilter<"VerificationToken"> | Date | string + expires?: DateTimeWithAggregatesFilter<"VerificationToken"> | Date | string + } + + export type AccountWhereInput = { + AND?: AccountWhereInput | AccountWhereInput[] + OR?: AccountWhereInput[] + NOT?: AccountWhereInput | AccountWhereInput[] + id?: StringFilter<"Account"> | string + username?: StringNullableFilter<"Account"> | string | null + email?: StringNullableFilter<"Account"> | string | null + addresses?: StringNullableListFilter<"Account"> + disabled?: BoolFilter<"Account"> | boolean + favorite_speakers?: StringNullableListFilter<"Account"> + interested_sessions?: StringNullableListFilter<"Account"> + attending_sessions?: StringNullableListFilter<"Account"> + publicSchedule?: BoolFilter<"Account"> | boolean + notifications?: BoolFilter<"Account"> | boolean + appState_bogota?: StringNullableFilter<"Account"> | string | null + createdAt?: DateTimeFilter<"Account"> | Date | string + updatedAt?: DateTimeNullableFilter<"Account"> | Date | string | null + } + + export type AccountOrderByWithRelationInput = { + id?: SortOrder + username?: SortOrderInput | SortOrder + email?: SortOrderInput | SortOrder + addresses?: SortOrder + disabled?: SortOrder + favorite_speakers?: SortOrder + interested_sessions?: SortOrder + attending_sessions?: SortOrder + publicSchedule?: SortOrder + notifications?: SortOrder + appState_bogota?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrderInput | SortOrder + } + + export type AccountWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: AccountWhereInput | AccountWhereInput[] + OR?: AccountWhereInput[] + NOT?: AccountWhereInput | AccountWhereInput[] + username?: StringNullableFilter<"Account"> | string | null + email?: StringNullableFilter<"Account"> | string | null + addresses?: StringNullableListFilter<"Account"> + disabled?: BoolFilter<"Account"> | boolean + favorite_speakers?: StringNullableListFilter<"Account"> + interested_sessions?: StringNullableListFilter<"Account"> + attending_sessions?: StringNullableListFilter<"Account"> + publicSchedule?: BoolFilter<"Account"> | boolean + notifications?: BoolFilter<"Account"> | boolean + appState_bogota?: StringNullableFilter<"Account"> | string | null + createdAt?: DateTimeFilter<"Account"> | Date | string + updatedAt?: DateTimeNullableFilter<"Account"> | Date | string | null + }, "id"> + + export type AccountOrderByWithAggregationInput = { + id?: SortOrder + username?: SortOrderInput | SortOrder + email?: SortOrderInput | SortOrder + addresses?: SortOrder + disabled?: SortOrder + favorite_speakers?: SortOrder + interested_sessions?: SortOrder + attending_sessions?: SortOrder + publicSchedule?: SortOrder + notifications?: SortOrder + appState_bogota?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrderInput | SortOrder + _count?: AccountCountOrderByAggregateInput + _max?: AccountMaxOrderByAggregateInput + _min?: AccountMinOrderByAggregateInput + } + + export type AccountScalarWhereWithAggregatesInput = { + AND?: AccountScalarWhereWithAggregatesInput | AccountScalarWhereWithAggregatesInput[] + OR?: AccountScalarWhereWithAggregatesInput[] + NOT?: AccountScalarWhereWithAggregatesInput | AccountScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Account"> | string + username?: StringNullableWithAggregatesFilter<"Account"> | string | null + email?: StringNullableWithAggregatesFilter<"Account"> | string | null + addresses?: StringNullableListFilter<"Account"> + disabled?: BoolWithAggregatesFilter<"Account"> | boolean + favorite_speakers?: StringNullableListFilter<"Account"> + interested_sessions?: StringNullableListFilter<"Account"> + attending_sessions?: StringNullableListFilter<"Account"> + publicSchedule?: BoolWithAggregatesFilter<"Account"> | boolean + notifications?: BoolWithAggregatesFilter<"Account"> | boolean + appState_bogota?: StringNullableWithAggregatesFilter<"Account"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Account"> | Date | string + updatedAt?: DateTimeNullableWithAggregatesFilter<"Account"> | Date | string | null + } + + export type VerificationTokenCreateInput = { + id?: string + identifier: string + nonce: number + issued?: Date | string + expires: Date | string + } + + export type VerificationTokenUncheckedCreateInput = { + id?: string + identifier: string + nonce: number + issued?: Date | string + expires: Date | string + } + + export type VerificationTokenUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + identifier?: StringFieldUpdateOperationsInput | string + nonce?: IntFieldUpdateOperationsInput | number + issued?: DateTimeFieldUpdateOperationsInput | Date | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type VerificationTokenUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + identifier?: StringFieldUpdateOperationsInput | string + nonce?: IntFieldUpdateOperationsInput | number + issued?: DateTimeFieldUpdateOperationsInput | Date | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type VerificationTokenCreateManyInput = { + id?: string + identifier: string + nonce: number + issued?: Date | string + expires: Date | string + } + + export type VerificationTokenUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + identifier?: StringFieldUpdateOperationsInput | string + nonce?: IntFieldUpdateOperationsInput | number + issued?: DateTimeFieldUpdateOperationsInput | Date | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type VerificationTokenUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + identifier?: StringFieldUpdateOperationsInput | string + nonce?: IntFieldUpdateOperationsInput | number + issued?: DateTimeFieldUpdateOperationsInput | Date | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountCreateInput = { + id?: string + username?: string | null + email?: string | null + addresses?: AccountCreateaddressesInput | string[] + disabled?: boolean + favorite_speakers?: AccountCreatefavorite_speakersInput | string[] + interested_sessions?: AccountCreateinterested_sessionsInput | string[] + attending_sessions?: AccountCreateattending_sessionsInput | string[] + publicSchedule?: boolean + notifications?: boolean + appState_bogota?: string | null + createdAt?: Date | string + updatedAt?: Date | string | null + } + + export type AccountUncheckedCreateInput = { + id?: string + username?: string | null + email?: string | null + addresses?: AccountCreateaddressesInput | string[] + disabled?: boolean + favorite_speakers?: AccountCreatefavorite_speakersInput | string[] + interested_sessions?: AccountCreateinterested_sessionsInput | string[] + attending_sessions?: AccountCreateattending_sessionsInput | string[] + publicSchedule?: boolean + notifications?: boolean + appState_bogota?: string | null + createdAt?: Date | string + updatedAt?: Date | string | null + } + + export type AccountUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + username?: NullableStringFieldUpdateOperationsInput | string | null + email?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: AccountUpdateaddressesInput | string[] + disabled?: BoolFieldUpdateOperationsInput | boolean + favorite_speakers?: AccountUpdatefavorite_speakersInput | string[] + interested_sessions?: AccountUpdateinterested_sessionsInput | string[] + attending_sessions?: AccountUpdateattending_sessionsInput | string[] + publicSchedule?: BoolFieldUpdateOperationsInput | boolean + notifications?: BoolFieldUpdateOperationsInput | boolean + appState_bogota?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + username?: NullableStringFieldUpdateOperationsInput | string | null + email?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: AccountUpdateaddressesInput | string[] + disabled?: BoolFieldUpdateOperationsInput | boolean + favorite_speakers?: AccountUpdatefavorite_speakersInput | string[] + interested_sessions?: AccountUpdateinterested_sessionsInput | string[] + attending_sessions?: AccountUpdateattending_sessionsInput | string[] + publicSchedule?: BoolFieldUpdateOperationsInput | boolean + notifications?: BoolFieldUpdateOperationsInput | boolean + appState_bogota?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountCreateManyInput = { + id?: string + username?: string | null + email?: string | null + addresses?: AccountCreateaddressesInput | string[] + disabled?: boolean + favorite_speakers?: AccountCreatefavorite_speakersInput | string[] + interested_sessions?: AccountCreateinterested_sessionsInput | string[] + attending_sessions?: AccountCreateattending_sessionsInput | string[] + publicSchedule?: boolean + notifications?: boolean + appState_bogota?: string | null + createdAt?: Date | string + updatedAt?: Date | string | null + } + + export type AccountUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + username?: NullableStringFieldUpdateOperationsInput | string | null + email?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: AccountUpdateaddressesInput | string[] + disabled?: BoolFieldUpdateOperationsInput | boolean + favorite_speakers?: AccountUpdatefavorite_speakersInput | string[] + interested_sessions?: AccountUpdateinterested_sessionsInput | string[] + attending_sessions?: AccountUpdateattending_sessionsInput | string[] + publicSchedule?: BoolFieldUpdateOperationsInput | boolean + notifications?: BoolFieldUpdateOperationsInput | boolean + appState_bogota?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + username?: NullableStringFieldUpdateOperationsInput | string | null + email?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: AccountUpdateaddressesInput | string[] + disabled?: BoolFieldUpdateOperationsInput | boolean + favorite_speakers?: AccountUpdatefavorite_speakersInput | string[] + interested_sessions?: AccountUpdateinterested_sessionsInput | string[] + attending_sessions?: AccountUpdateattending_sessionsInput | string[] + publicSchedule?: BoolFieldUpdateOperationsInput | boolean + notifications?: BoolFieldUpdateOperationsInput | boolean + appState_bogota?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringFilter<$PrismaModel> | string + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type VerificationTokenCountOrderByAggregateInput = { + id?: SortOrder + identifier?: SortOrder + nonce?: SortOrder + issued?: SortOrder + expires?: SortOrder + } + + export type VerificationTokenAvgOrderByAggregateInput = { + nonce?: SortOrder + } + + export type VerificationTokenMaxOrderByAggregateInput = { + id?: SortOrder + identifier?: SortOrder + nonce?: SortOrder + issued?: SortOrder + expires?: SortOrder + } + + export type VerificationTokenMinOrderByAggregateInput = { + id?: SortOrder + identifier?: SortOrder + nonce?: SortOrder + issued?: SortOrder + expires?: SortOrder + } + + export type VerificationTokenSumOrderByAggregateInput = { + nonce?: SortOrder + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type StringNullableListFilter<$PrismaModel = never> = { + equals?: string[] | ListStringFieldRefInput<$PrismaModel> | null + has?: string | StringFieldRefInput<$PrismaModel> | null + hasEvery?: string[] | ListStringFieldRefInput<$PrismaModel> + hasSome?: string[] | ListStringFieldRefInput<$PrismaModel> + isEmpty?: boolean + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type AccountCountOrderByAggregateInput = { + id?: SortOrder + username?: SortOrder + email?: SortOrder + addresses?: SortOrder + disabled?: SortOrder + favorite_speakers?: SortOrder + interested_sessions?: SortOrder + attending_sessions?: SortOrder + publicSchedule?: SortOrder + notifications?: SortOrder + appState_bogota?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountMaxOrderByAggregateInput = { + id?: SortOrder + username?: SortOrder + email?: SortOrder + disabled?: SortOrder + publicSchedule?: SortOrder + notifications?: SortOrder + appState_bogota?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountMinOrderByAggregateInput = { + id?: SortOrder + username?: SortOrder + email?: SortOrder + disabled?: SortOrder + publicSchedule?: SortOrder + notifications?: SortOrder + appState_bogota?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type AccountCreateaddressesInput = { + set: string[] + } + + export type AccountCreatefavorite_speakersInput = { + set: string[] + } + + export type AccountCreateinterested_sessionsInput = { + set: string[] + } + + export type AccountCreateattending_sessionsInput = { + set: string[] + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type AccountUpdateaddressesInput = { + set?: string[] + push?: string | string[] + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type AccountUpdatefavorite_speakersInput = { + set?: string[] + push?: string | string[] + } + + export type AccountUpdateinterested_sessionsInput = { + set?: string[] + push?: string | string[] + } + + export type AccountUpdateattending_sessionsInput = { + set?: string[] + push?: string | string[] + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringFilter<$PrismaModel> | string + } + + export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + + + /** + * Aliases for legacy arg types + */ + /** + * @deprecated Use VerificationTokenDefaultArgs instead + */ + export type VerificationTokenArgs = VerificationTokenDefaultArgs + /** + * @deprecated Use AccountDefaultArgs instead + */ + export type AccountArgs = AccountDefaultArgs + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} \ No newline at end of file diff --git a/src/db/clients/account/index.js b/src/db/clients/account/index.js new file mode 100644 index 0000000..90e09d6 --- /dev/null +++ b/src/db/clients/account/index.js @@ -0,0 +1,224 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('./runtime/library.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.11.0 + * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102 + */ +Prisma.prismaVersion = { + client: "5.11.0", + engine: "efd2449663b3d73d637ea1fd226bafbcf45b3102" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.NotFoundError = NotFoundError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + const path = require('path') + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.VerificationTokenScalarFieldEnum = { + id: 'id', + identifier: 'identifier', + nonce: 'nonce', + issued: 'issued', + expires: 'expires' +}; + +exports.Prisma.AccountScalarFieldEnum = { + id: 'id', + username: 'username', + email: 'email', + addresses: 'addresses', + disabled: 'disabled', + favorite_speakers: 'favorite_speakers', + interested_sessions: 'interested_sessions', + attending_sessions: 'attending_sessions', + publicSchedule: 'publicSchedule', + notifications: 'notifications', + appState_bogota: 'appState_bogota', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + + +exports.Prisma.ModelName = { + VerificationToken: 'VerificationToken', + Account: 'Account' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "/home/w/Code/devcon-api/src/db/clients/account", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", + "native": true + } + ], + "previewFeatures": [], + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": null, + "schemaEnvPath": "../../../../.env" + }, + "relativePath": "../..", + "clientVersion": "5.11.0", + "engineVersion": "efd2449663b3d73d637ea1fd226bafbcf45b3102", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DB_CONNECTION_STRING", + "value": null + } + } + }, + "inlineSchema": "datasource db {\n provider = \"postgres\"\n url = env(\"DB_CONNECTION_STRING\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./clients/account\"\n}\n\nmodel VerificationToken {\n id String @default(cuid()) @id\n identifier String\n nonce Int\n issued DateTime @default(now())\n expires DateTime\n}\n\nmodel Account {\n id String @default(cuid()) @id\n username String?\n email String?\n addresses String[]\n disabled Boolean @default(false)\n \n favorite_speakers String[]\n interested_sessions String[]\n attending_sessions String[]\n publicSchedule Boolean @default(false)\n notifications Boolean @default(false)\n appState_bogota String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime?\n}\n", + "inlineSchemaHash": "f9a95bb20669ea54b0f8ea74f6b4e960b17382b534f52d8d04a619060eb53a42", + "copyEngine": true +} + +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + "src/db/clients/account", + "db/clients/account", + ] + + const alternativePath = alternativePaths.find((altPath) => { + return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) + }) ?? alternativePaths[0] + + config.dirname = path.join(process.cwd(), alternativePath) + config.isBundled = true +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nonce\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"issued\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"username\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"disabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favorite_speakers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"interested_sessions\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attending_sessions\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicSchedule\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"appState_bogota\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined + + +const { warnEnvConflicts } = require('./runtime/library.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +}) + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node"); +path.join(process.cwd(), "src/db/clients/account/libquery_engine-debian-openssl-3.0.x.so.node") +// file annotations for bundling tools to include these files +path.join(__dirname, "schema.prisma"); +path.join(process.cwd(), "src/db/clients/account/schema.prisma") diff --git a/src/db/clients/account/libquery_engine-debian-openssl-3.0.x.so.node b/src/db/clients/account/libquery_engine-debian-openssl-3.0.x.so.node new file mode 100755 index 0000000..bbb5ec6 Binary files /dev/null and b/src/db/clients/account/libquery_engine-debian-openssl-3.0.x.so.node differ diff --git a/src/db/clients/account/package.json b/src/db/clients/account/package.json new file mode 100644 index 0000000..780b346 --- /dev/null +++ b/src/db/clients/account/package.json @@ -0,0 +1,78 @@ +{ + "name": "prisma-client-5c6ce5637293f44795aecad0e719cb9157da33166820d8e88daac0a6a18ce356", + "main": "index.js", + "types": "index.d.ts", + "browser": "index-browser.js", + "exports": { + "./package.json": "./package.json", + ".": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./edge": { + "types": "./edge.d.ts", + "require": "./edge.js", + "import": "./edge.js", + "default": "./edge.js" + }, + "./extension": { + "types": "./extension.d.ts", + "require": "./extension.js", + "import": "./extension.js", + "default": "./extension.js" + }, + "./index-browser": { + "types": "./index.d.ts", + "require": "./index-browser.js", + "import": "./index-browser.js", + "default": "./index-browser.js" + }, + "./index": { + "types": "./index.d.ts", + "require": "./index.js", + "import": "./index.js", + "default": "./index.js" + }, + "./wasm": { + "types": "./wasm.d.ts", + "require": "./wasm.js", + "import": "./wasm.js", + "default": "./wasm.js" + }, + "./runtime/library": { + "types": "./runtime/library.d.ts", + "require": "./runtime/library.js", + "import": "./runtime/library.js", + "default": "./runtime/library.js" + }, + "./runtime/binary": { + "types": "./runtime/binary.d.ts", + "require": "./runtime/binary.js", + "import": "./runtime/binary.js", + "default": "./runtime/binary.js" + }, + "./generator-build": { + "require": "./generator-build/index.js", + "import": "./generator-build/index.js", + "default": "./generator-build/index.js" + }, + "./*": "./*" + }, + "version": "5.11.0", + "sideEffects": false +} \ No newline at end of file diff --git a/src/db/clients/account/runtime/edge-esm.js b/src/db/clients/account/runtime/edge-esm.js new file mode 100644 index 0000000..4c5693f --- /dev/null +++ b/src/db/clients/account/runtime/edge-esm.js @@ -0,0 +1,28 @@ +var na=Object.create;var nr=Object.defineProperty;var ia=Object.getOwnPropertyDescriptor;var oa=Object.getOwnPropertyNames;var sa=Object.getPrototypeOf,aa=Object.prototype.hasOwnProperty;var Pt=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ee=(e,t)=>()=>(e&&(t=e(e=0)),t);var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ir=(e,t)=>{for(var r in t)nr(e,r,{get:t[r],enumerable:!0})},Qn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oa(t))!aa.call(e,i)&&i!==r&&nr(e,i,{get:()=>t[i],enumerable:!(n=ia(t,i))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?na(sa(e)):{},Qn(t||!e||!e.__esModule?nr(r,"default",{value:e,enumerable:!0}):r,e)),Gn=e=>Qn(nr({},"__esModule",{value:!0}),e);var y,c=Ee(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Hn,b,p=Ee(()=>{"use strict";b=(Hn=globalThis.performance)!=null?Hn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=Ee(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ee(()=>{"use strict"});var fi=Re(nt=>{"use strict";d();c();p();f();m();var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ua=Zn(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;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 D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function u(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function l(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],B=D[1],I=new n(l(A,M,B)),L=0,X=B>0?M-4:M,F;for(F=0;F>16&255,I[L++]=R>>8&255,I[L++]=R&255;return B===2&&(R=r[A.charCodeAt(F)]<<2|r[A.charCodeAt(F+1)]>>4,I[L++]=R&255),B===1&&(R=r[A.charCodeAt(F)]<<10|r[A.charCodeAt(F+1)]<<4|r[A.charCodeAt(F+2)]>>2,I[L++]=R>>8&255,I[L++]=R&255),I}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,B=[],I=R;IX?X:L+I));return M===1?(R=A[D-1],B.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),la=Zn(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=u;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===l)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,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+v>=1?r+=S/l:r+=S*Math.pow(2,1-v),r*l>=2&&(a++,l/=2),a+v>=h?(u=0,a=h):a+v>=1?(u=(r*l-1)*Math.pow(2,o),a=a+v):(u=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=u&255,A+=R,u/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),Qr=ua(),tt=la(),Wn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=T;nt.SlowBuffer=ga;nt.INSPECT_MAX_BYTES=50;var or=2147483647;nt.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=ca();!T.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 ca(){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(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>or)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(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 Wr(e)}return Xn(e,t,r)}T.poolSize=8192;function Xn(e,t,r){if(typeof e=="string")return fa(e,t);if(ArrayBuffer.isView(e))return ma(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return ti(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 T.from(n,t,r);let i=da(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.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)}T.from=function(e,t,r){return Xn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ei(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 ei(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return pa(e,t,r)};function Wr(e){return ei(e),be(e<0?0:Kr(e)|0)}T.allocUnsafe=function(e){return Wr(e)};T.allocUnsafeSlow=function(e){return Wr(e)};function fa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ri(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Gr(e){let t=e.length<0?0:Kr(e.length)|0,r=be(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function ga(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.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?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ri(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Hr(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:Hr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ri;function ha(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 Aa(this,t,r);case"utf8":case"utf-8":return ii(this,t,r);case"ascii":return Ta(this,t,r);case"latin1":case"binary":return Ca(this,t,r);case"base64":return Pa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ra(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.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+=" ... "),""};Wn&&(T.prototype[Wn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.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),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Yr(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=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Kn(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):Kn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Kn(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 u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){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 ya(this,e,t,r);case"utf8":case"utf-8":return wa(this,e,t,r);case"ascii":case"latin1":case"binary":return Ea(this,e,t,r);case"base64":return ba(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pa(e,t,r){return t===0&&r===e.length?Qr.fromByteArray(e):Qr.fromByteArray(e.slice(t,r))}function ii(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 u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&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 va(n)}var zn=4096;function va(e){let t=e.length;if(t<=zn)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")}T.prototype.readUintLE=T.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};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.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};T.prototype.readUint32BE=T.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])};T.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(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)&&vt(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};T.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};T.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]};T.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};T.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};T.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};T.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]};T.prototype.readBigInt64LE=Se(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(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)&&vt(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),tt.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),tt.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),tt.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.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};T.prototype.writeUint8=T.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};T.prototype.writeUint16LE=T.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};T.prototype.writeUint16BE=T.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};T.prototype.writeUint32LE=T.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};T.prototype.writeUint32BE=T.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 oi(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 si(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}T.prototype.writeBigUInt64LE=Se(function(e,t=0){return oi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Se(function(e,t=0){return si(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.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};T.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};T.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};T.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};T.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};T.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};T.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};T.prototype.writeBigInt64LE=Se(function(e,t=0){return oi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Se(function(e,t=0){return si(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ai(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 ui(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ui(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ui(this,e,t,!1,r)};function li(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return li(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return li(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.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=Yn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Yn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Yn(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 Sa(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&vt(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 et.ERR_OUT_OF_RANGE("value",a,e)}Sa(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function vt(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 Ia=/[^+/0-9A-Za-z-_]/g;function ka(e){if(e=e.split("=")[0],e=e.trim().replace(Ia,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Hr(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 Da(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function pi(e){return Qr.toByteArray(ka(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Yr(e){return e!==e}var Oa=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"?Na:e}function Na(){throw new Error("BigInt not supported")}});var w,d=Ee(()=>{"use strict";w=Ve(fi())});function _a(){return!1}var La,Fa,wi,Ei=Ee(()=>{"use strict";d();c();p();f();m();La={},Fa={existsSync:_a,promises:La},wi=Fa});var Di=Re((uf,ki)=>{"use strict";d();c();p();f();m();ki.exports=(en(),Gn(Xr)).format});var Xr={};ir(Xr,{default:()=>qa,deprecate:()=>Oi,format:()=>_i,inspect:()=>Ni,promisify:()=>Mi});function Mi(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function Oi(e,t){return(...r)=>(console.warn(t),e(...r))}function Ni(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var _i,$a,qa,en=Ee(()=>{"use strict";d();c();p();f();m();_i=Di(),$a={promisify:Mi,deprecate:Oi,inspect:Ni,format:_i},qa=$a});function Qa(...e){return e.join("/")}function Ga(...e){return e.join("/")}var ji,Ha,Wa,Ct,Ji=Ee(()=>{"use strict";d();c();p();f();m();ji="/",Ha={sep:ji},Wa={resolve:Qa,posix:Ha,join:Ga,sep:ji},Ct=Wa});var cr,Gi=Ee(()=>{"use strict";d();c();p();f();m();cr=class{constructor(){this.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 Wi=Re((dm,Hi)=>{"use strict";d();c();p();f();m();Hi.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=Re((Am,zi)=>{"use strict";d();c();p();f();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 Xi=Re((Mm,Zi)=>{"use strict";d();c();p();f();m();var eu=Yi();Zi.exports=e=>typeof e=="string"?e.replace(eu(),""):e});var ro=Re((Sh,ou)=>{ou.exports={name:"@prisma/engines-version",version:"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"efd2449663b3d73d637ea1fd226bafbcf45b3102"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.22",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var no=Re(()=>{"use strict";d();c();p();f();m()});var Ln=Re((nR,ds)=>{"use strict";d();c();p();f();m();ds.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;smi,getExtensionContext:()=>di});d();c();p();f();m();d();c();p();f();m();function mi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function di(e){return e}var yi={};ir(yi,{validator:()=>hi});d();c();p();f();m();d();c();p();f();m();function hi(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Zr,bi,xi,Pi,vi=!0;typeof y!="undefined"&&({FORCE_COLOR:Zr,NODE_DISABLE_COLORS:bi,NO_COLOR:xi,TERM:Pi}=y.env||{},vi=y.stdout&&y.stdout.isTTY);var Ba={enabled:!bi&&xi==null&&Pi!=="dumb"&&(Zr!=null&&Zr!=="0"||vi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ba.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Bp=V(0,0),ar=V(1,22),ur=V(2,22),$p=V(3,23),Ti=V(4,24),qp=V(7,27),Up=V(8,28),Vp=V(9,29),jp=V(30,39),it=V(31,39),Ci=V(32,39),Ai=V(33,39),Ri=V(34,39),Jp=V(35,39),Si=V(36,39),Qp=V(37,39),Ii=V(90,39),Gp=V(90,39),Hp=V(40,49),Wp=V(41,49),Kp=V(42,49),zp=V(43,49),Yp=V(44,49),Zp=V(45,49),Xp=V(46,49),ef=V(47,49);d();c();p();f();m();var Ua=100,Li=["green","yellow","blue","magenta","cyan","red"],lr=[],Fi=Date.now(),Va=0,tn=typeof y!="undefined"?y.env:{},Bi,$i;($i=globalThis.DEBUG)!=null||(globalThis.DEBUG=(Bi=tn.DEBUG)!=null?Bi:"");var qi;(qi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=tn.DEBUG_COLORS?tn.DEBUG_COLORS==="true":!0);var Tt={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)=>{var o;let[t,r,...n]=e,i;typeof Pt=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{let a=(en(),Gn(Xr));y.stderr.write(a.format(...s)+` +`)}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function ja(e){let t={color:Li[Va++%Li.length],enabled:Tt.enabled(e),namespace:e,log:Tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&lr.push([o,...n]),lr.length>Ua&&lr.shift(),Tt.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:Ja(g)),l=`+${Date.now()-Fi}ms`;Fi=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Ui=new Proxy(ja,{get:(e,t)=>Tt[t],set:(e,t,r)=>Tt[t]=r});function Ja(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(){lr.length=0}var ne=Ui;d();c();p();f();m();d();c();p();f();m();var Qi="library";function At(e){let t=Ka();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Qi)}function Ka(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var Ie;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Ie||(Ie={}));var ot={};ir(ot,{error:()=>Za,info:()=>Ya,log:()=>za,query:()=>Xa,should:()=>Ki,tags:()=>Rt,warn:()=>rn});d();c();p();f();m();var Rt={error:it("prisma:error"),warn:Ai("prisma:warn"),info:Si("prisma:info"),query:Ri("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function za(...e){console.log(...e)}function rn(e,...t){Ki.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Ya(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Za(e,...t){console.error(`${Rt.error} ${e}`,...t)}function Xa(e,...t){console.log(`${Rt.query} ${e}`,...t)}d();c();p();f();m();function Je(e,t){throw new Error(t)}d();c();p();f();m();function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var on=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function st(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),rn(t,...r))};d();c();p();f();m();var Y=class extends Error{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(Y,"PrismaClientKnownRequestError");var ke=class extends Y{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(ke,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");d();c();p();f();m();var De=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(De,"PrismaClientRustPanicError");d();c();p();f();m();var ue=class extends Error{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(ue,"PrismaClientUnknownRequestError");d();c();p();f();m();var te=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(te,"PrismaClientValidationError");d();c();p();f();m();var St=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function tu(e,t){let r=It(()=>ru(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ru(e){return{datamodel:{models:an(e.models),enums:an(e.enums),types:an(e.types)}}}function an(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var fr=Symbol(),un=new WeakMap,xe=class{constructor(t){t===fr?un.set(this,`Prisma.${this._getName()}`):un.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return un.get(this)}},kt=class extends xe{_getNamespace(){return"NullTypes"}},Dt=class extends kt{};cn(Dt,"DbNull");var Mt=class extends kt{};cn(Mt,"JsonNull");var Ot=class extends kt{};cn(Ot,"AnyNull");var ln={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:Ot},instances:{DbNull:new Dt(fr),JsonNull:new Mt(fr),AnyNull:new Ot(fr)}};function cn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function Nt(e){return{ok:!1,error:e,map(){return Nt(e)},flatMap(){return Nt(e)}}}var pn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},fn=e=>{let t=new pn,r=Qe(t,e.startTransaction.bind(e)),n={errorRegistry:t,queryRaw:Qe(t,e.queryRaw.bind(e)),executeRaw:Qe(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>nu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=iu(t,e.getConnectionInfo.bind(e))),n},nu=(e,t)=>({provider:t.provider,options:t.options,queryRaw:Qe(e,t.queryRaw.bind(t)),executeRaw:Qe(e,t.executeRaw.bind(t)),commit:Qe(e,t.commit.bind(t)),rollback:Qe(e,t.rollback.bind(t))});function Qe(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}function iu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}var ra=Ve(ro());var fD=Ve(no());Gi();Ei();Ji();d();c();p();f();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){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var mr={enumerable:!0,configurable:!0,writable:!0};function dr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>mr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var so=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=uu(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){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=ao(Reflect.ownKeys(o),r),a=ao(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.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 u=r.get(s);return u?u.getPropertyDescriptor?{...mr,...u==null?void 0:u.getPropertyDescriptor(s)}:mr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[so]=function(){let o={...this};return delete o[so],o},i}function uu(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 ao(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function Lt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function gr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&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}};d();c();p();f();m();d();c();p();f();m();function uo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function ut(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var lt=9e15,_e=1e9,mn="0123456789abcdef",wr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Er="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",dn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-lt,maxE:lt,crypto:!1},fo,Pe,_=!0,xr="[DecimalError] ",Ne=xr+"Invalid argument: ",mo=xr+"Precision limit exceeded",go=xr+"crypto unavailable",ho="[object Decimal]",re=Math.floor,H=Math.pow,lu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,cu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,pu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,yo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,fu=9007199254740991,mu=wr.length-1,gn=Er.length-1,C={toStringTag:ho};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(Ne+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,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<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())+O,n.rounding=1,r=du(n,Po(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,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*H(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=H(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,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),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-re(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(q(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/vr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=ct(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.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=ct(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/vr(5,e)),i=ct(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}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,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};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=q(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=ce(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,u,l=this,g=l.constructor,h=g.precision,v=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=gn)return s=ce(g,h+4,v).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=gn)return s=ce(g,h+4,v).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/O),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),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,u,l=this,g=l.constructor,h=g.precision,v=g.rounding,S=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.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+S,s=Oe(l,a),n=t?br(g,a+10):Oe(e,a),u=q(s,n,a,1),Ft(u.d,i=h,v))do if(a+=10,s=Oe(l,a),n=t?br(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+Z(u.d).slice(i+1,i+15)+1==1e14&&(u=k(u,h+1,0));break}while(Ft(u.d,i+=10,v));return _=!0,k(u,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,v=e.d,a=A.precision,u=A.rounding,!l[0]||!v[0]){if(v[0])e.s=-e.s;else if(l[0])e=new A(S);else return new A(u===3?-0:0);return _?k(e,a,u):e}if(r=re(e.e/O),g=re(S.e/O),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=v.length):(t=v,r=g,s=l.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=v.length,h=n0;--n)l[s++]=0;for(n=v.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=Pr(l,n),_?k(e,a,u):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ne+e);return r.d?(t=wo(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())+O,n.rounding=1,r=hu(n,Po(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,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=Z(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=re((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(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,u+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,u+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,u,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=q(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,u,l,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=re(g.e/O)+re(e.e/O),u=v.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*v[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=Pr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return wn(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:(se(e,0,_e),t===void 0?t=n.rounding:se(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=he(n,!0):(se(e,0,_e),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e+1,t),r=he(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=he(i):(se(e,0,_e),t===void 0?t=o.rounding:se(t,0,8),n=k(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(l=r=new R(1),n=u=new R(0),t=new R(n),o=t.e=wo(A)-S.e-1,s=o%O,t.d[0]=H(10,s<0?O+s:s),e==null)e=o>0?t:l;else{if(a=new R(e),!a.isInt()||a.lt(l))throw Error(Ne+a);e=a.gt(t)?o>0?t:l:a}for(_=!1,a=new R(Z(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,v=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return wn(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:se(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=q(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 wn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return k(a,n,o);if(t=re(e.e/O),t>=e.d.length-1&&(r=l<0?-l:l)<=fu)return i=Eo(u,a,r,n),e.s<0?new u(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(_=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=hn(e.times(Oe(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ft(i.d,n,o)&&(t=n+10,i=k(hn(e.times(Oe(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,u.rounding=o,k(i,n,o))};C.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):(se(e,1,_e),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e,t),r=he(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):(se(e,1,_e),t===void 0?t=n.rounding:se(t,0,8)),k(new n(r),e,t)};C.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};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=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(Ne+e)}function Ft(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=H(10,O-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)==H(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)==H(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 du(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/vr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=ct(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 q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}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,u){var l,g,h,v,S,A,R,D,M,B,I,L,X,F,Ze,$e,fe,qe,Q,Ae,Ue=n.constructor,Xe=n.s==i.s?1:-1,ee=n.d,U=i.d;if(!ee||!ee[0]||!U||!U[0])return new Ue(!n.s||!i.s||(ee?U&&ee[0]==U[0]:!U)?NaN:ee&&ee[0]==0||!U?Xe*0:Xe/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=O,g=re(n.e/S)-re(i.e/S)),Q=U.length,fe=ee.length,M=new Ue(Xe),B=M.d=[],h=0;U[h]==(ee[h]||0);h++);if(U[h]>(ee[h]||0)&&g--,o==null?(F=o=Ue.precision,s=Ue.rounding):a?F=o+(n.e-i.e)+1:F=o,F<0)B.push(1),A=!0;else{if(F=F/S+2|0,h=0,Q==1){for(v=0,U=U[0],F++;(h1&&(U=e(U,v,u),ee=e(ee,v,u),Q=U.length,fe=ee.length),$e=Q,I=ee.slice(0,Q),L=I.length;L=u/2&&++qe;do v=0,l=t(U,I,Q,L),l<0?(X=I[0],Q!=L&&(X=X*u+(I[1]||0)),v=X/qe|0,v>1?(v>=u&&(v=u-1),R=e(U,v,u),D=R.length,L=I.length,l=t(R,I,D,L),l==1&&(v--,r(R,Q=10;v/=10)h++;M.e=h+g*S-1,k(M,a?o+M.e+1:o,s,A)}return M}}();function k(e,t,r,n){var i,o,s,a,u,l,g,h,v,S=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+=O,s=t,g=h[v=0],u=g/H(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=u=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=H(10,O-o),h[v]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(v==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[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Me(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Me(-i-1)+o,r&&(n=r-s)>0&&(o+=Me(n))):i>=s?(o+=Me(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Me(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Me(n))),o}function Pr(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function br(e,t,r){if(t>mu)throw _=!0,r&&(e.precision=r),Error(mo);return k(new e(wr),t,1,!0)}function ce(e,t,r){if(t>gn)throw Error(mo);return k(new e(Er),t,r,!0)}function wo(e){var t=e.length-1,r=t*O+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 Me(e){for(var t="";e--;)t+="0";return t}function Eo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/O+4);for(_=!1;;){if(r%2&&(o=o.times(t),co(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),co(t.d,s)}return _=!0,o}function lo(e){return e.d[e.d.length-1]&1}function bo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,u=A):u=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new v(1),v.precision=u;;){if(o=k(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),Z(a.d).slice(0,u)===Z(s.d).slice(0,u)){for(i=h;i--;)s=k(s.times(s),u,1);if(t==null)if(l<3&&Ft(s.d,u-n,S,l))v.precision=u+=10,r=o=a=new v(1),g=0,l++;else return k(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,B=M.rounding,I=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(_=!1,g=I):g=t,M.precision=g+=A,r=Z(D),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),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return l=br(M,g+2,I).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(l),M.precision=I,t==null?k(R,I,B,_=!0):R;for(h=R,u=s=R=q(R.minus(1),R.plus(1),g,1),v=k(R.times(R),g,1),i=3;;){if(s=k(s.times(v),g,1),l=u.plus(q(s,new M(i),g,1)),Z(l.d).slice(0,g)===Z(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(br(M,g+2,I).times(o+""))),u=q(u,new M(S),g,1),t==null)if(Ft(u.d,g-A,B,a))M.precision=g+=A,l=s=R=q(h.minus(1),h.plus(1),g,1),v=k(R.times(R),g,1),i=a=1;else return k(u,M.precision=I,B,_=!0);else return M.precision=I,u;u=l,i+=2}}function xo(e){return String(e.s*e.s/0)}function yn(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)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),yo.test(t))return yn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(cu.test(t))r=16,t=t.toLowerCase();else if(lu.test(t))r=2;else if(pu.test(t))r=8;else throw Error(Ne+t);for(o=t.search(/p/i),o>0?(u=+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=Eo(n,new n(r),o,o*2)),l=yr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=Pr(l,g),e.d=l,_=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):He.pow(2,u))),_=!0,e)}function hu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:ct(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vr(5,r)),t=ct(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 ct(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/O);for(_=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),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,l++}return _=!0,s.d.length=h+1,s}function vr(e,t){for(var r=e;--t;)r*=e;return r}function Po(e,t){var r,n=t.s<0,i=ce(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=lo(r)?n?2:3:n?4:1,t;Pe=lo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function wn(e,t,r,n){var i,o,s,a,u,l,g,h,v,S=e.constructor,A=r!==void 0;if(A?(se(r,1,_e),n===void 0?n=S.rounding:se(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=xo(e);else{for(g=he(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(".",""),v=new S(1),v.e=g.length-s,v.d=yr(he(v),10,i),v.e=v.d.length),h=yr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,l=fo),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=yr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function yu(e){return new this(e).abs()}function wu(e){return new this(e).acos()}function Eu(e){return new this(e).acosh()}function bu(e,t){return new this(e).plus(t)}function xu(e){return new this(e).asin()}function Pu(e){return new this(e).asinh()}function vu(e){return new this(e).atan()}function Tu(e){return new this(e).atanh()}function Cu(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=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Au(e){return new this(e).cbrt()}function Ru(e){return k(e=new this(e),e.e+1,2)}function Su(e,t,r){return new this(e).clamp(t,r)}function Iu(e){if(!e||typeof e!="object")throw Error(xr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,_e,"rounding",0,8,"toExpNeg",-lt,0,"toExpPos",0,lt,"maxE",0,lt,"minE",-lt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ne+r+": "+n);if(r="crypto",i&&(this[r]=dn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(go);else this[r]=!1;else throw Error(Ne+r+": "+n);return this}function ku(e){return new this(e).cos()}function Du(e){return new this(e).cosh()}function vo(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,po(o)){l.s=o.s,_?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(l.e=NaN,l.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(go);else for(;o=10;i/=10)n++;n`}};function ft(e){return e instanceof Bt}d();c();p();f();m();d();c();p();f();m();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},To={bold:ar,red:it,green:Ci,dim:ur,enabled:!0},mt={write(e){e.writeLine(",")}};d();c();p();f();m();var ye=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.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();c();p();f();m();var Le=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var dt=class extends Le{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Tr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ye("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(mt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var Co=": ",Rr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Co.length}write(t){let r=new ye(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Co).write(this.value)}};d();c();p();f();m();var K=class e extends Le{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof dt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}writeEmpty(r){let n=new ye("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(mt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var z=class extends Le{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ye(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var En=class{constructor(t){this.errorMessages=[];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 Sr(e){return new En(Ao(e))}function Ao(e){let t=new K;for(let[r,n]of Object.entries(e)){let i=new Rr(r,Ro(n));t.addField(i)}return t}function Ro(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(pt(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=hr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof xe?new z(`Prisma.${e._getName()}`):ft(e)?new z(`prisma.${uo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?nl(e):typeof e=="object"?Ao(e):new z(Object.prototype.toString.call(e))}function nl(e){let t=new dt;for(let r of e)t.addItem(Ro(r));return t}function So(e){if(e===void 0)return"";let t=Sr(e);return new at(0,{colors:Ar}).write(t).toString()}d();c();p();f();m();var il="P2037";function $t({error:e,user_facing_error:t},r,n){return t.error_code?new Y(ol(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ue(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ol(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===il&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var bn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new bn}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Io={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function gt(e={}){let t=al(e);return Object.entries(t).reduce((n,[i,o])=>(Io[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function al(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ko(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:gt})(e)}d();c();p();f();m();function ul(e={}){let{select:t,...r}=e;return typeof t=="object"?gt({...r,_count:t}):gt({...r,_count:{_all:!0}})}function ll(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function Do(e,t){return t({action:"count",unpacker:ll(e),argsMapper:ul})(e)}d();c();p();f();m();function cl(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 pl(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Mo(e,t){return t({action:"groupBy",unpacker:pl(e),argsMapper:cl})(e)}function Oo(e,t,r){if(t==="aggregate")return n=>ko(n,r);if(t==="count")return n=>Do(n,r);if(t==="groupBy")return n=>Mo(n,r)}d();c();p();f();m();function No(e,t){let r=t.fields.filter(i=>!i.relationName),n=on(r,i=>i.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 Bt(e,o,s.type,s.isList,s.kind==="enum")},...dr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var _o=e=>Array.isArray(e)?e:e.split("."),xn=(e,t)=>_o(t).reduce((r,n)=>r&&r[n],e),Lo=(e,t,r)=>_o(t).reduceRight((n,i,o,s)=>Object.assign({},xn(e,s.slice(0,o)),{[i]:n}),r);function fl(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ml(e,t,r){return t===void 0?e!=null?e:{}:Lo(t,r,e||!0)}function Pn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=fl(n,i),h=ml(u,o,g),v=r({dataPath:g,callsite:l})(h),S=dl(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],B=[g,h];return Pn(e,...M,...B)},...dr([...S,...Object.getOwnPropertyNames(v)])})}}function dl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var gl=Ve(Wi());var hl={red:it,gray:Ii,dim:ur,bold:ar,underline:Ti,highlightSource:e=>e.highlight()},yl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function wl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function El({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=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${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(bl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function bl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ht(e){let t=e.showColors?hl:yl,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=wl(e),El(r,t)}function Fo(e,t,r,n){return e===Ie.ModelAction.findFirstOrThrow||e===Ie.ModelAction.findUniqueOrThrow?xl(t,r,n):n}function xl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ht({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new te(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Y&&o.code==="P2025"?new ke(`No ${e} found`,t):o})}}d();c();p();f();m();function we(e){return e.replace(/^./,t=>t.toLowerCase())}var Pl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],vl=["aggregate","count","groupBy"];function vn(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Tl(e,t),Al(e,t),_t(r),ie("name",()=>t),ie("$name",()=>t),ie("$parent",()=>e._appliedParent)];return ge({},n)}function Tl(e,t){let r=we(t),n=Object.keys(Ie.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=Fo(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...u})})};return Pl.includes(o)?Pn(e,t,a):Cl(i)?Oo(e,i,a):a({})}}}function Cl(e){return vl.includes(e)}function Al(e,t){return Ge(ie("fields",()=>{let r=e._runtimeDataModel.models[t];return No(t,r)}))}d();c();p();f();m();function Bo(e){return e.replace(/^./,t=>t.toUpperCase())}var Tn=Symbol();function qt(e){let t=[Rl(e),ie(Tn,()=>e),ie("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(_t(r)),ge(e,t)}function Rl(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(we),n=[...new Set(t.concat(r))];return Ge({getKeys(){return n},getPropertyValue(i){let o=Bo(i);if(e._runtimeDataModel.models[o]!==void 0)return vn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return vn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function $o(e){return e[Tn]?e[Tn]:e}function qo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(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();c();p();f();m();d();c();p();f();m();function Uo({result:e,modelName:t,select:r,extensions:n}){let i=n.getAllComputedFields(t);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(Lt(u))}Sl(e,a.needs)&&o.push(Il(a,ge(e,o)))}return o.length>0||s.length>0?ge(e,[...o,...s]):e}function Sl(e,t){return t.every(r=>nn(e,r))}function Il(e,t){return Ge(ie(e.name,()=>e.compute(t)))}d();c();p();f();m();function kr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=kr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function jo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:kr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>Uo({result:s,modelName:we(a),select:u.select,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Jo(e){if(e instanceof le)return kl(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.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:Jo((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=zo(o,g),l.args=u,Go(e,l,r,n+1)}})})}function Ho(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!=null?r:"$none",o);return Go(e,t,s)}function Wo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ko(r,n,0,e):e(r)}}function Ko(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 u=a.customDataProxyFetch;return a.customDataProxyFetch=zo(i,u),Ko(a,t,r+1,n)}})}var Qo=e=>e;function zo(e=Qo,t=Qo){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function Zo(e,t,r){let n=we(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Dl({...e,...Yo(t.name,e,t.result.$allModels),...Yo(t.name,e,t.result[n])})}function Dl(e){let t=new de,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 st(e,n=>({...n,needs:r(n.name,new Set)}))}function Yo(e,t,r){return r?st(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ml(t,o,i)})):{}}function Ml(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function Xo(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}var Dr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=It(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=It(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Zo((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=we(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],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()}},Mr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Dr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Dr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var es=ne("prisma:client"),ts={Vercel:"vercel","Netlify CI":"netlify"};function rs({postinstall:e,ciName:t,clientVersion:r}){if(es("checkPlatformCaching:postinstall",e),es("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/${ts[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function ns(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Ol="Cloudflare-Workers",Nl="node";function is(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Ol?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Nl?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var _l={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Cn(){let e=is();return{id:e,prettyName:_l[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Cn().id==="workerd"?new G(`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 G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Or=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Or{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var wt=class extends ae{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(wt,"ForcedRetryError");d();c();p();f();m();var We=class extends ae{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(We,"InvalidDatasourceError");d();c();p();f();m();var Ke=class extends ae{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Ke,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends ae{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 ze=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(ze,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var An="This request could not be understood by the server",Vt=class extends j{constructor(r,n,i){super(n||An,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Vt,"BadRequestError");d();c();p();f();m();var jt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(jt,"HealthcheckTimeoutError");d();c();p();f();m();var Jt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(Jt,"EngineStartupError");d();c();p();f();m();var Qt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Qt,"EngineVersionNotSupportedError");d();c();p();f();m();var Rn="Request timed out",Gt=class extends j{constructor(r,n=Rn){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Gt,"GatewayTimeoutError");d();c();p();f();m();var Ll="Interactive transaction error",Ht=class extends j{constructor(r,n=Ll){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Ht,"InteractiveTransactionError");d();c();p();f();m();var Fl="Request parameters are invalid",Wt=class extends j{constructor(r,n=Fl){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Wt,"InvalidRequestError");d();c();p();f();m();var Sn="Requested resource does not exist",Kt=class extends j{constructor(r,n=Sn){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};N(Kt,"NotFoundError");d();c();p();f();m();var In="Unknown server error",Et=class extends j{constructor(r,n,i){super(n||In,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(Et,"ServerError");d();c();p();f();m();var kn="Unauthorized, check your connection string",zt=class extends j{constructor(r,n=kn){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(zt,"UnauthorizedError");d();c();p();f();m();var Dn="Usage exceeded, retry again later",Yt=class extends j{constructor(r,n=Dn){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Yt,"UsageExceededError");async function Bl(e){let t;try{t=await e.text()}catch(r){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(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Zt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Bl(e);if(n.type==="QueryEngineError")throw new Y(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Et(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new ze(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 G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new jt(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 Wt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new zt(r,bt(kn,n));if(e.status===404)return new Kt(r,bt(Sn,n));if(e.status===429)throw new Yt(r,bt(Dn,n));if(e.status===504)throw new Gt(r,bt(Rn,n));if(e.status>=500)throw new Et(r,bt(In,n));if(e.status>=400)throw new Vt(r,bt(An,n))}function bt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();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();c();p();f();m();var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ss(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Te[s]+Te[a]+Te[u]+Te[l];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Te[s]+Te[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,u=(g&15)<<2,r+=Te[s]+Te[a]+Te[u]+"="),r}d();c();p();f();m();function as(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("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();c();p();f();m();function $l(e){return e[0]*1e3+e[1]/1e6}function us(e){return new Date($l(e))}d();c();p();f();m();var ls={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var Xt=class extends ae{constructor(r,n){super(`Cannot fetch data from service: +${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};N(Xt,"RequestError");async function Ye(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Mn)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new Xt(s,{clientVersion:n})}}function Ul(e){return{...e.headers,"Content-Type":"application/json"}}function Vl(e){return{method:e.method,headers:Ul(e)}}function jl(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new On(t.headers)}}async function Mn(e,t={}){let r=Jl("https"),n=Vl(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:v}}=g;h>=301&&h<=399&&v&&(v.startsWith("http")===!1?s(Mn(`${o}${v}`,t)):s(Mn(v,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(jl(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Jl=typeof Pt!="undefined"?Pt:()=>{},On=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Ql=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,cs=ne("prisma:client:dataproxyEngine");async function Gl(e,t){var s,a,u;let r=ls["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Ql.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,v]=l.split("."),S=Hl(`<=${g}.${h}.${v}`),A=await Ye(S,{clientVersion:n});if(!A.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${A.status} ${A.statusText}, response body: ${await A.text()||""}`);let R=await A.text();cs("length of body fetched from unpkg.com",R.length);let D;try{D=JSON.parse(R)}catch(M){throw console.error("JSON.parse error: body fetched from unpkg.com: ",R),M}return D.version}throw new Ke("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ps(e,t){let r=await Gl(e,t);return cs("version",r),r}function Hl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var fs=3,Nn=ne("prisma:client:dataproxyEngine"),_n=class{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,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},er=class{constructor(t){this.name="DataProxyEngine";as(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=ss(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[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new _n({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ps(t,this.config),Nn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:us(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Ye(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Nn("schema response status",r.status);let n=await Zt(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==null?void 0:n.kind)==="itx"?n.options:void 0,s=gr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?$t(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}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 Ye(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Nn("graphql response status",a.status),await this.handleError(await Zt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?$t(u.errors[0],this.config.clientVersion,this.config.activeProvider):new ue(u.errors,{clientVersion:this.config.clientVersion});return u}})}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 u=await Ye(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Zt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,v=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Ye(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Zt(a,this.clientVersion));let l=(await a.json()).extensions;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=yt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new We(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new We(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new We(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new Ke("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof ae)||!o.isRetryable)throw o;if(n>=fs)throw o instanceof wt?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${fs} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await os(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof ze)throw await this.uploadSchema(),new wt({clientVersion:this.clientVersion,cause:t});if(t)throw t}};function ms({copyEngine:e=!0},t){let r;try{r=yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&pr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=At(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["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."],new te(u.join(` +`),{clientVersion:t.clientVersion})}if(i)return new er(t);throw new te("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function Nr({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Es=Ve(Ln());d();c();p();f();m();function ys(e,t){let r=ws(e),n=Wl(r),i=zl(n);i?_r(i,t):t.addErrorMessage(()=>"Unknown error")}function ws(e){return e.errors.flatMap(t=>t.kind==="Union"?ws(t):[t])}function Wl(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:Kl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Kl(e,t){return[...new Set(e.concat(t))]}function zl(e){return sn(e,(t,r)=>{let n=gs(t),i=gs(r);return n!==i?n-i:hs(t)-hs(r)})}function gs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function hs(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var Ce=class{constructor(t,r){this.name=t;this.value=r;this.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();c();p();f();m();var Lr=class{constructor(){this.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 _r(e,t){switch(e.kind){case"IncludeAndSelect":Yl(e,t);break;case"IncludeOnScalar":Zl(e,t);break;case"EmptySelection":Xl(e,t);break;case"UnknownSelectionField":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":uc(e,t);break;case"Union":ys(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function Yl(e,t){var n,i;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof K&&((n=r.getField("include"))==null||n.markAsError(),(i=r.getField("select"))==null||i.markAsError()),t.addErrorMessage(o=>`Please ${o.bold("either")} use ${o.green("`include`")} or ${o.green("`select`")}, but ${o.red("not both")} at the same time.`)}function Zl(e,t){var s,a;let[r,n]=Fr(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new Ce(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${tr(u)}`:l+=".",l+=` +Note that ${u.bold("include")} statements only accept relation fields.`,l})}function Xl(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),Ps(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${tr(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function ec(e,t){var o;let[r,n]=Fr(e.selectionPath),i=t.arguments.getDeepSelectionParent(r);i&&((o=i.value.getField(n))==null||o.markAsError(),Ps(i.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return i&&a.push(`for ${s.bold(i.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(tr(s)),a.join(" ")})}function tc(e,t){var i;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof K&&((i=n.getField(r))==null||i.markAsError(),lc(n,e.arguments)),t.addErrorMessage(o=>bs(o,r,e.arguments.map(s=>s.name)))}function rc(e,t){var o;let[r,n]=Fr(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof K){(o=i.getDeepField(e.argumentPath))==null||o.markAsError();let s=i.getDeepFieldValue(r);s instanceof K&&vs(s,e.inputType)}t.addErrorMessage(s=>bs(s,n,e.inputType.fields.map(a=>a.name)))}function bs(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(tr(e)),n.join(" ")}function nc(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof z&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof K))return;let[i,o]=Fr(e.argumentPath),s=new Lr,a=n.getDeepFieldValue(i);if(a instanceof K)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new Ce(o,s).makeRequired())}else{let u=e.inputTypes.map(xs).join(" | ");a.addSuggestion(new Ce(o,u).makeRequired())}}function xs(e){return e.kind==="list"?`${xs(e.elementType)}[]`:e.name}function ic(e,t){var i;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof K&&((i=n.getDeepFieldValue(e.argumentPath))==null||i.markAsError()),t.addErrorMessage(o=>{let s=Br("or",e.argument.typeNames.map(a=>o.green(a)));return`Argument \`${o.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${o.red(e.inferredType)}.`})}function oc(e,t){var i;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof K&&((i=n.getDeepFieldValue(e.argumentPath))==null||i.markAsError()),t.addErrorMessage(o=>{let s=[`Invalid value for argument \`${o.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=Br("or",e.argument.typeNames.map(u=>o.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function sc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof K){let o=n.getDeepField(e.argumentPath),s=o==null?void 0:o.value;s==null||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 ac(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof K){let i=n.getDeepFieldValue(e.argumentPath);i instanceof K&&vs(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")} ${Br("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(tr(i)),o.join(" ")})}function uc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof K){let o=n.getDeepFieldValue(e.argumentPath);o instanceof K&&(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 ${Br("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ps(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ce(r.name,"true"))}function lc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Ce(r.name,r.typeNames.join(" | ")))}function vs(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ce(r.name,r.typeNames.join(" | ")))}function Fr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function tr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Br(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,Es.default)(e,i);o>cc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Rs=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var Ss=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function rr(e){try{return Is(e,"fast")}catch(t){return Is(e,"slow")}}function Is(e,t){return JSON.stringify(e.map(r=>bc(r,t)))}function bc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ut(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:xc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ds(e):e}function xc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ds(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Ds(e)}var Pc=/^(\s*alter\s)/i,Ms=ne("prisma:client");function $n(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Pc.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 qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ss(r),i={values:rr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Ms(`prisma.${e}(${n}, ${i.values})`):Ms(`prisma.${e}(${n})`),{query:n,parameters:i}},Os={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Un(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=_s(r(o)):_s(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function _s(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var Ls={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Vn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Ls}};function Fs(e){return e.includes("tracing")?new Vn:Ls}d();c();p();f();m();function Bs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var vc=["$connect","$disconnect","$on","$transaction","$use","$extends"],$s=vc;d();c();p();f();m();function qs(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();c();p();f();m();var qr=class{constructor(){this._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();c();p();f();m();var Vs=Ve(Xi());d();c();p();f();m();function Ur(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function Vr(e){return e===null?e:Array.isArray(e)?e.map(Vr):typeof e=="object"?Tc(e)?Cc(e):st(e,Vr):e}function Tc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Cc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Je(t,"Unknown tagged value")}}d();c();p();f();m();function Us(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(jn(e.query.arguments)),t.push(jn(e.query.selection)),t.join("")}function jn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${jn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Ac={aggregate:!1,aggregateRaw:!1,createMany:!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,updateOne:!0,upsertOne:!0};function Jn(e){return Ac[e]}d();c();p();f();m();var jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Jn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Sc(o),containsWrite:l,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?js(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:Us(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.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})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}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}){if(Rc(t),Ic(t,i)||t instanceof ke)throw t;if(t instanceof Y&&kc(t)){let u=Js(t.meta);$r({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=ht({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new Y(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new De(a,this.client._clientVersion);if(t instanceof ue)throw new ue(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof De)throw new De(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Vs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=Vr(xn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Sc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:js(e)};Je(e,"Unknown transaction kind")}}function js(e){return{id:e.id,payload:e.payload}}function Ic(e,t){return Ur(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function kc(e){return e.code==="P2009"||e.code==="P2012"}function Js(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Js)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Qs="5.11.0";var Gs=Qs;d();c();p();f();m();function Hs(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ws(t[n]);return r})}function Ws({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ve(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ws);default:return t}}d();c();p();f();m();var Zs=Ve(Ln());d();c();p();f();m();var J=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(J,"PrismaClientConstructorValidationError");var Ks=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],zs=["pretty","colorless","minimal"],Ys=["info","query","warn","error"],Mc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`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 J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`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 J(`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 J(`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===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nr(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(At()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`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 J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!zs.includes(e)){let t=xt(e,zs);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ys.includes(r)){let n=xt(r,Ys);throw new J(`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 J(`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 J(`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 J(`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 J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`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 J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Xs(e,t){for(let[r,n]of Object.entries(e)){if(!Ks.includes(r)){let i=xt(r,Ks);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Mc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('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=Oc(e,t);return r?` Did you mean "${r}"?`:""}function Oc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Zs.default)(e,i)}));r.sort((i,o)=>i.distance{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)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Ur(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Be=ne("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Nc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},_c=Symbol.for("prisma.client.transaction.id"),Lc={id:0,nextId(){return++this.id}};function Fc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new qr;this._createPrismaPromise=Un();this.$extends=qo;var u,l,g,h,v,S,A,R,D,M,B,I,L,X;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,rs(e),n&&Xs(n,e);let i=n!=null&&n.adapter?fn(n.adapter):void 0,o=new cr().on("error",()=>{});this._extensions=Mr.empty(),this._previewFeatures=Nr(e),this._clientVersion=(h=e.clientVersion)!=null?h:Gs,this._activeProvider=e.activeProvider,this._tracingHelper=Fs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(v=e.injectableEdgeEnv)==null?void 0:v.call(e);try{let F=n!=null?n:{},Ze=(S=F.__internal)!=null?S:{},$e=Ze.debug===!0;$e&&ne.enable("prisma:client");let fe=Ct.resolve(e.dirname,e.relativePath);wi.existsSync(fe)||(fe=e.dirname),Be("dirname",e.dirname),Be("relativePath",e.relativePath),Be("cwd",fe);let qe=Ze.engine||{};if(F.errorFormat?this._errorFormat=F.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:fe,dirname:e.dirname,enableDebugLogs:$e,allowTriggerPanic:qe.allowTriggerPanic,datamodelPath:Ct.join(e.dirname,(A=e.filename)!=null?A:"schema.prisma"),prismaPath:(R=qe.binaryPath)!=null?R:void 0,engineEndpoint:qe.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:F.log&&qs(F.log),logQueries:F.log&&!!(typeof F.log=="string"?F.log==="query":F.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(D=a==null?void 0:a.parsed)!=null?D:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ns(F,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(M=F.transactionOptions)==null?void 0:M.maxWait)!=null?B:2e3,timeout:(L=(I=F.transactionOptions)==null?void 0:I.timeout)!=null?L:5e3,isolationLevel:(X=F.transactionOptions)==null?void 0:X.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:yt,getBatchRequestPayload:gr,prismaGraphQLToJSError:$t,PrismaClientUnknownRequestError:ue,PrismaClientInitializationError:G,PrismaClientKnownRequestError:Y,debug:ne("prisma:client:accelerateEngine"),engineVersion:ra.version,clientVersion:e.clientVersion}},Be("clientVersion",e.clientVersion),this._engine=ms(e,this._engineConfig),this._requestHandler=new Jr(this,o),F.log)for(let Q of F.log){let Ae=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Ae&&this.$on(Ae,Ue=>{var Xe;ot.log(`${(Xe=ot.tags[Ae])!=null?Xe:""}`,Ue.message||Ue.query)})}this._metrics=new St(this._engine)}catch(F){throw F.clientVersion=this._clientVersion,F}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$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:qn({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]=ta(n,i);return $n(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=>($n(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:Rs,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:qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Hs)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ta(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Lc.nextId(),s=Bs(n.length),a=n.map((u,l)=>{var v,S,A;if((u==null?void 0:u[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=(v=i==null?void 0:i.isolationLevel)!=null?v:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(A=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?A:u});return ea(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let v={kind:"itx",...a};u=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return u}_createItxClient(n){return qt(ge($o(this),[ie("_appliedParent",()=>this._appliedParent._createItxClient(n)),ie("_createPrismaPromise",()=>Un(n)),ie(_c,()=>n.id),Lt($s)]))}$transaction(n,i){let o;typeof n=="function"?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){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:Nc,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,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,M=>h(g,B=>(M==null||M.end(),u(B))));let{runInTransaction:v,args:S,...A}=g,R={...n,...A};S&&(R.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&v===!1&&delete R.transaction;let D=await Ho(this,R);return R.model?jo({result:D,modelName:R.model,args:R.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):D};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=l?l(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Ts({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return ne.enabled("prisma:client")&&(Be("Prisma Client call:"),Be(`prisma.${i}(${So(n)})`),Be("Generated request:"),Be(JSON.stringify(R,null,2)+` +`)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}}return t}function ta(e,t){return Bc(e)?[new le(e,t),Os]:[e,Ns]}function Bc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var $c=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function qc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!$c.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();var export_warnEnvConflicts=void 0;export{Ui as Debug,ve as Decimal,gi as Extensions,St as MetricsClient,ke as NotFoundError,G as PrismaClientInitializationError,Y as PrismaClientKnownRequestError,De as PrismaClientRustPanicError,ue as PrismaClientUnknownRequestError,te as PrismaClientValidationError,yi as Public,le as Sql,tu as defineDmmfProperty,au as empty,Fc as getPrismaClient,Cn as getRuntime,su as join,qc as makeStrictEnum,ln as objectEnumValues,io as raw,oo as sqltag,export_warnEnvConflicts as warnEnvConflicts,pr as warnOnce}; +//# sourceMappingURL=edge-esm.js.map diff --git a/src/db/clients/account/runtime/edge.js b/src/db/clients/account/runtime/edge.js new file mode 100644 index 0000000..caee515 --- /dev/null +++ b/src/db/clients/account/runtime/edge.js @@ -0,0 +1,28 @@ +"use strict";var ua=Object.create;var ir=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var ca=Object.getOwnPropertyNames;var pa=Object.getPrototypeOf,fa=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)ir(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ca(t))!fa.call(e,i)&&i!==r&&ir(e,i,{get:()=>t[i],enumerable:!(n=la(t,i))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?ua(pa(e)):{},zn(t||!e||!e.__esModule?ir(r,"default",{value:e,enumerable:!0}):r,e)),Gr=e=>zn(ir({},"__esModule",{value:!0}),e);var y,c=be(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Yn,b,p=be(()=>{"use strict";b=(Yn=globalThis.performance)!=null?Yn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=be(()=>{"use strict";E=()=>{};E.prototype=E});var m=be(()=>{"use strict"});var hi=Ie(nt=>{"use strict";d();c();p();f();m();var ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ma=ri(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;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 D=A.indexOf("=");D===-1&&(D=R);var M=D===R?0:4-D%4;return[D,M]}function u(A){var R=a(A),D=R[0],M=R[1];return(D+M)*3/4-M}function l(A,R,D){return(R+D)*3/4-D}function g(A){var R,D=a(A),M=D[0],B=D[1],I=new n(l(A,M,B)),L=0,ee=B>0?M-4:M,F;for(F=0;F>16&255,I[L++]=R>>8&255,I[L++]=R&255;return B===2&&(R=r[A.charCodeAt(F)]<<2|r[A.charCodeAt(F+1)]>>4,I[L++]=R&255),B===1&&(R=r[A.charCodeAt(F)]<<10|r[A.charCodeAt(F+1)]<<4|r[A.charCodeAt(F+2)]>>2,I[L++]=R>>8&255,I[L++]=R&255),I}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,D){for(var M,B=[],I=R;Iee?ee:L+I));return M===1?(R=A[D-1],B.push(t[R>>2]+t[R<<4&63]+"==")):M===2&&(R=(A[D-2]<<8)+A[D-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),da=ri(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=u;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===l)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,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+v>=1?r+=S/l:r+=S*Math.pow(2,1-v),r*l>=2&&(a++,l/=2),a+v>=h?(u=0,a=h):a+v>=1?(u=(r*l-1)*Math.pow(2,o),a=a+v):(u=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=u&255,A+=R,u/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=D*128}}),Hr=ma(),tt=da(),Zn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=T;nt.SlowBuffer=ba;nt.INSPECT_MAX_BYTES=50;var or=2147483647;nt.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=ga();!T.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 ga(){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(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>or)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(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 zr(e)}return ni(e,t,r)}T.poolSize=8192;function ni(e,t,r){if(typeof e=="string")return ya(e,t);if(ArrayBuffer.isView(e))return wa(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return oi(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 T.from(n,t,r);let i=Ea(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.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)}T.from=function(e,t,r){return ni(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ii(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 ha(e,t,r){return ii(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return ha(e,t,r)};function zr(e){return ii(e),xe(e<0?0:Yr(e)|0)}T.allocUnsafe=function(e){return zr(e)};T.allocUnsafeSlow=function(e){return zr(e)};function ya(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=si(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:Yr(e.length)|0,r=xe(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function ba(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.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?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function si(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return gi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=si;function xa(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 Da(this,t,r);case"utf8":case"utf-8":return ui(this,t,r);case"ascii":return Ia(this,t,r);case"latin1":case"binary":return ka(this,t,r);case"base64":return Ra(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.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+=" ... "),""};Zn&&(T.prototype[Zn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.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),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Xr(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=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Xn(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):Xn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Xn(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 u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){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 Pa(this,e,t,r);case"utf8":case"utf-8":return va(this,e,t,r);case"ascii":case"latin1":case"binary":return Ta(this,e,t,r);case"base64":return Ca(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Aa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ra(e,t,r){return t===0&&r===e.length?Hr.fromByteArray(e):Hr.fromByteArray(e.slice(t,r))}function ui(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 u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&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 Sa(n)}var ei=4096;function Sa(e){let t=e.length;if(t<=ei)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")}T.prototype.readUintLE=T.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};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.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};T.prototype.readUint32BE=T.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])};T.prototype.readBigUInt64LE=ke(function(e){e=e>>>0,rt(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,rt(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};T.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};T.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]};T.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};T.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};T.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};T.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]};T.prototype.readBigInt64LE=ke(function(e){e=e>>>0,rt(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,rt(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),tt.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),tt.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),tt.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.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};T.prototype.writeUint8=T.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};T.prototype.writeUint16LE=T.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};T.prototype.writeUint16BE=T.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};T.prototype.writeUint32LE=T.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};T.prototype.writeUint32BE=T.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 li(e,t,r,n,i){di(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 ci(e,t,r,n,i){di(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}T.prototype.writeBigUInt64LE=ke(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=ke(function(e,t=0){return ci(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.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};T.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};T.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};T.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};T.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};T.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};T.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};T.prototype.writeBigInt64LE=ke(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=ke(function(e,t=0){return ci(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pi(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 fi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return fi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return fi(this,e,t,!1,r)};function mi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return mi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return mi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.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=ti(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ti(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ti(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 Oa(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function di(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)}Oa(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(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 Na=/[^+/0-9A-Za-z-_]/g;function _a(e){if(e=e.split("=")[0],e=e.trim().replace(Na,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(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 La(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function gi(e){return Hr.toByteArray(_a(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Xr(e){return e!==e}var Ba=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"?$a:e}function $a(){throw new Error("BigInt not supported")}});var w,d=be(()=>{"use strict";w=Ve(hi())});function qa(){return!1}var Ua,Va,bi,xi=be(()=>{"use strict";d();c();p();f();m();Ua={},Va={existsSync:qa,promises:Ua},bi=Va});var Oi=Ie((uf,Mi)=>{"use strict";d();c();p();f();m();Mi.exports=(on(),Gr(nn)).format});var nn={};vt(nn,{default:()=>Qa,deprecate:()=>_i,format:()=>Fi,inspect:()=>Li,promisify:()=>Ni});function Ni(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function _i(e,t){return(...r)=>(console.warn(t),e(...r))}function Li(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Fi,Ja,Qa,on=be(()=>{"use strict";d();c();p();f();m();Fi=Oi(),Ja={promisify:Ni,deprecate:_i,inspect:Li,format:Fi},Qa=Ja});function za(...e){return e.join("/")}function Ya(...e){return e.join("/")}var Ji,Za,Xa,At,Qi=be(()=>{"use strict";d();c();p();f();m();Ji="/",Za={sep:Ji},Xa={resolve:za,posix:Za,join:Ya,sep:Ji},At=Xa});var cr,Hi=be(()=>{"use strict";d();c();p();f();m();cr=class{constructor(){this.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 Ki=Ie((mm,Wi)=>{"use strict";d();c();p();f();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 Zi=Ie((Cm,Yi)=>{"use strict";d();c();p();f();m();Yi.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 eo=Ie((Dm,Xi)=>{"use strict";d();c();p();f();m();var ou=Zi();Xi.exports=e=>typeof e=="string"?e.replace(ou(),""):e});var io=Ie((Rh,lu)=>{lu.exports={name:"@prisma/engines-version",version:"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"efd2449663b3d73d637ea1fd226bafbcf45b3102"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.22",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var oo=Ie(()=>{"use strict";d();c();p();f();m()});var Un=Ie((tR,hs)=>{"use strict";d();c();p();f();m();hs.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;san,Decimal:()=>ye,Extensions:()=>en,MetricsClient:()=>at,NotFoundError:()=>Pe,PrismaClientInitializationError:()=>G,PrismaClientKnownRequestError:()=>K,PrismaClientRustPanicError:()=>ve,PrismaClientUnknownRequestError:()=>se,PrismaClientValidationError:()=>Z,Public:()=>tn,Sql:()=>ae,defineDmmfProperty:()=>no,empty:()=>ao,getPrismaClient:()=>oa,getRuntime:()=>Or,join:()=>so,makeStrictEnum:()=>sa,objectEnumValues:()=>fr,raw:()=>yn,sqltag:()=>wn,warnEnvConflicts:()=>void 0,warnOnce:()=>It});module.exports=Gr(Uc);d();c();p();f();m();var en={};vt(en,{defineExtension:()=>yi,getExtensionContext:()=>wi});d();c();p();f();m();d();c();p();f();m();function yi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function wi(e){return e}var tn={};vt(tn,{validator:()=>Ei});d();c();p();f();m();d();c();p();f();m();function Ei(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var rn,Pi,vi,Ti,Ci=!0;typeof y!="undefined"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:Pi,NO_COLOR:vi,TERM:Ti}=y.env||{},Ci=y.stdout&&y.stdout.isTTY);var ja={enabled:!Pi&&vi==null&&Ti!=="dumb"&&(rn!=null&&rn!=="0"||Ci)};function V(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 Bp=V(0,0),ar=V(1,22),ur=V(2,22),$p=V(3,23),Ai=V(4,24),qp=V(7,27),Up=V(8,28),Vp=V(9,29),jp=V(30,39),it=V(31,39),Ri=V(32,39),Si=V(33,39),Ii=V(34,39),Jp=V(35,39),ki=V(36,39),Qp=V(37,39),Di=V(90,39),Gp=V(90,39),Hp=V(40,49),Wp=V(41,49),Kp=V(42,49),zp=V(43,49),Yp=V(44,49),Zp=V(45,49),Xp=V(46,49),ef=V(47,49);d();c();p();f();m();var Ga=100,Bi=["green","yellow","blue","magenta","cyan","red"],lr=[],$i=Date.now(),Ha=0,sn=typeof y!="undefined"?y.env:{},qi,Ui;(Ui=globalThis.DEBUG)!=null||(globalThis.DEBUG=(qi=sn.DEBUG)!=null?qi:"");var Vi;(Vi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=sn.DEBUG_COLORS?sn.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)=>{var o;let[t,r,...n]=e,i;typeof require=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{let a=(on(),Gr(nn));y.stderr.write(a.format(...s)+` +`)}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function Wa(e){let t={color:Bi[Ha++%Bi.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&&lr.push([o,...n]),lr.length>Ga&&lr.shift(),Ct.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:Ka(g)),l=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var an=new Proxy(Wa,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function Ka(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 ji(){lr.length=0}var ne=an;d();c();p();f();m();d();c();p();f();m();var Gi="library";function Rt(e){let t=eu();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Gi)}function eu(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var De;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(De||(De={}));var ot={};vt(ot,{error:()=>nu,info:()=>ru,log:()=>tu,query:()=>iu,should:()=>zi,tags:()=>St,warn:()=>un});d();c();p();f();m();var St={error:it("prisma:error"),warn:Si("prisma:warn"),info:ki("prisma:info"),query:Ii("prisma:query")},zi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function tu(...e){console.log(...e)}function un(e,...t){zi.warn()&&console.warn(`${St.warn} ${e}`,...t)}function ru(e,...t){console.info(`${St.info} ${e}`,...t)}function nu(e,...t){console.error(`${St.error} ${e}`,...t)}function iu(e,...t){console.log(`${St.query} ${e}`,...t)}d();c();p();f();m();function Je(e,t){throw new Error(t)}d();c();p();f();m();function ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var cn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function st(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function pn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{to.has(e)||(to.add(e),un(t,...r))};d();c();p();f();m();var K=class extends Error{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(K,"PrismaClientKnownRequestError");var Pe=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(Pe,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");d();c();p();f();m();var ve=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(ve,"PrismaClientRustPanicError");d();c();p();f();m();var se=class extends Error{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(se,"PrismaClientUnknownRequestError");d();c();p();f();m();var Z=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(Z,"PrismaClientValidationError");d();c();p();f();m();var at=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function kt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function no(e,t){let r=kt(()=>su(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function su(e){return{datamodel:{models:fn(e.models),enums:fn(e.enums),types:fn(e.types)}}}function fn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var pr=Symbol(),mn=new WeakMap,Te=class{constructor(t){t===pr?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)}},Dt=class extends Te{_getNamespace(){return"NullTypes"}},Mt=class extends Dt{};dn(Mt,"DbNull");var Ot=class extends Dt{};dn(Ot,"JsonNull");var Nt=class extends Dt{};dn(Nt,"AnyNull");var fr={classes:{DbNull:Mt,JsonNull:Ot,AnyNull:Nt},instances:{DbNull:new Mt(pr),JsonNull:new Ot(pr),AnyNull:new Nt(pr)}};function dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function _t(e){return{ok:!1,error:e,map(){return _t(e)},flatMap(){return _t(e)}}}var gn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},hn=e=>{let t=new gn,r=Qe(t,e.startTransaction.bind(e)),n={errorRegistry:t,queryRaw:Qe(t,e.queryRaw.bind(e)),executeRaw:Qe(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>au(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=uu(t,e.getConnectionInfo.bind(e))),n},au=(e,t)=>({provider:t.provider,options:t.options,queryRaw:Qe(e,t.queryRaw.bind(t)),executeRaw:Qe(e,t.executeRaw.bind(t)),commit:Qe(e,t.commit.bind(t)),rollback:Qe(e,t.rollback.bind(t))});function Qe(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}function uu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}var ia=Ve(io());var cD=Ve(oo());Hi();xi();Qi();d();c();p();f();m();var ae=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){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var mr={enumerable:!0,configurable:!0,writable:!0};function dr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>mr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var uo=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=cu(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){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=lo(Reflect.ownKeys(o),r),a=lo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.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 u=r.get(s);return u?u.getPropertyDescriptor?{...mr,...u==null?void 0:u.getPropertyDescriptor(s)}:mr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[uo]=function(){let o={...this};return delete o[uo],o},i}function cu(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 lo(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function Ft(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function gr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var ut=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&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}};d();c();p();f();m();d();c();p();f();m();function co(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function lt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var ct=9e15,_e=1e9,En="0123456789abcdef",wr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Er="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",bn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ct,maxE:ct,crypto:!1},go,Ce,_=!0,xr="[DecimalError] ",Ne=xr+"Invalid argument: ",ho=xr+"Precision limit exceeded",yo=xr+"crypto unavailable",wo="[object Decimal]",re=Math.floor,H=Math.pow,pu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,fu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,mu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,O=7,du=9007199254740991,gu=wr.length-1,xn=Er.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(Ne+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,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<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())+O,n.rounding=1,r=hu(n,To(n,r)),n.precision=e,n.rounding=t,k(Ce==2||Ce==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,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*H(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=X(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=H(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,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),s+2,1),X(a.d).slice(0,s)===(r=X(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-re(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return q(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(q(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/vr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=pt(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.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=pt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/vr(5,e)),i=pt(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}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,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};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=q(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=ce(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,u,l=this,g=l.constructor,h=g.precision,v=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=xn)return s=ce(g,h+4,v).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=xn)return s=ce(g,h+4,v).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/O+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/O),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),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,u,l=this,g=l.constructor,h=g.precision,v=g.rounding,S=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.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+S,s=Oe(l,a),n=t?br(g,a+10):Oe(e,a),u=q(s,n,a,1),Bt(u.d,i=h,v))do if(a+=10,s=Oe(l,a),n=t?br(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+X(u.d).slice(i+1,i+15)+1==1e14&&(u=k(u,h+1,0));break}while(Bt(u.d,i+=10,v));return _=!0,k(u,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,v=e.d,a=A.precision,u=A.rounding,!l[0]||!v[0]){if(v[0])e.s=-e.s;else if(l[0])e=new A(S);else return new A(u===3?-0:0);return _?k(e,a,u):e}if(r=re(e.e/O),g=re(S.e/O),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=v.length):(t=v,r=g,s=l.length),n=Math.max(Math.ceil(a/O),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=v.length,h=n0;--n)l[s++]=0;for(n=v.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=Pr(l,n),_?k(e,a,u):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ne+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())+O,n.rounding=1,r=wu(n,To(n,r)),n.precision=e,n.rounding=t,k(Ce>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,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=X(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=re((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),X(o.d).slice(0,r)===(t=X(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,u+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,u+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,u,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=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,u,l,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=re(g.e/O)+re(e.e/O),u=v.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*v[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=Pr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Tn(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:(ue(e,0,_e),t===void 0?t=n.rounding:ue(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=he(n,!0):(ue(e,0,_e),t===void 0?t=i.rounding:ue(t,0,8),n=k(new i(n),e+1,t),r=he(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=he(i):(ue(e,0,_e),t===void 0?t=o.rounding:ue(t,0,8),n=k(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(l=r=new R(1),n=u=new R(0),t=new R(n),o=t.e=bo(A)-S.e-1,s=o%O,t.d[0]=H(10,s<0?O+s:s),e==null)e=o>0?t:l;else{if(a=new R(e),!a.isInt()||a.lt(l))throw Error(Ne+a);e=a.gt(t)?o>0?t:l:a}for(_=!1,a=new R(X(A)),g=R.precision,R.precision=o=A.length*O*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,v=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return Tn(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:ue(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=q(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 Tn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return k(a,n,o);if(t=re(e.e/O),t>=e.d.length-1&&(r=l<0?-l:l)<=du)return i=xo(u,a,r,n),e.s<0?new u(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(_=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Pn(e.times(Oe(a,n+r)),n),i.d&&(i=k(i,n+5,1),Bt(i.d,n,o)&&(t=n+10,i=k(Pn(e.times(Oe(a,t+r)),t),t+5,1),+X(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,u.rounding=o,k(i,n,o))};C.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):(ue(e,1,_e),t===void 0?t=i.rounding:ue(t,0,8),n=k(new i(n),e,t),r=he(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):(ue(e,1,_e),t===void 0?t=n.rounding:ue(t,0,8)),k(new n(r),e,t)};C.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};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=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function X(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Ne+e)}function Bt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,i=0):(i=Math.ceil((t+1)/O),t%=O),o=H(10,O-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)==H(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)==H(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 hu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/vr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=pt(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 q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}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,u){var l,g,h,v,S,A,R,D,M,B,I,L,ee,F,Ze,$e,fe,qe,Q,Se,Ue=n.constructor,Xe=n.s==i.s?1:-1,te=n.d,U=i.d;if(!te||!te[0]||!U||!U[0])return new Ue(!n.s||!i.s||(te?U&&te[0]==U[0]:!U)?NaN:te&&te[0]==0||!U?Xe*0:Xe/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=O,g=re(n.e/S)-re(i.e/S)),Q=U.length,fe=te.length,M=new Ue(Xe),B=M.d=[],h=0;U[h]==(te[h]||0);h++);if(U[h]>(te[h]||0)&&g--,o==null?(F=o=Ue.precision,s=Ue.rounding):a?F=o+(n.e-i.e)+1:F=o,F<0)B.push(1),A=!0;else{if(F=F/S+2|0,h=0,Q==1){for(v=0,U=U[0],F++;(h1&&(U=e(U,v,u),te=e(te,v,u),Q=U.length,fe=te.length),$e=Q,I=te.slice(0,Q),L=I.length;L=u/2&&++qe;do v=0,l=t(U,I,Q,L),l<0?(ee=I[0],Q!=L&&(ee=ee*u+(I[1]||0)),v=ee/qe|0,v>1?(v>=u&&(v=u-1),R=e(U,v,u),D=R.length,L=I.length,l=t(R,I,D,L),l==1&&(v--,r(R,Q=10;v/=10)h++;M.e=h+g*S-1,k(M,a?o+M.e+1:o,s,A)}return M}}();function k(e,t,r,n){var i,o,s,a,u,l,g,h,v,S=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+=O,s=t,g=h[v=0],u=g/H(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/O),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=u=0,i=1,o%=O,s=o-O+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=O,s=o-O+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(O-t%O)%O),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=H(10,O-o),h[v]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(v==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[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Me(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Me(-i-1)+o,r&&(n=r-s)>0&&(o+=Me(n))):i>=s?(o+=Me(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Me(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Me(n))),o}function Pr(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function br(e,t,r){if(t>gu)throw _=!0,r&&(e.precision=r),Error(ho);return k(new e(wr),t,1,!0)}function ce(e,t,r){if(t>xn)throw Error(ho);return k(new e(Er),t,r,!0)}function bo(e){var t=e.length-1,r=t*O+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 Me(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/O+4);for(_=!1;;){if(r%2&&(o=o.times(t),fo(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),fo(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=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,u=A):u=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new v(1),v.precision=u;;){if(o=k(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),X(a.d).slice(0,u)===X(s.d).slice(0,u)){for(i=h;i--;)s=k(s.times(s),u,1);if(t==null)if(l<3&&Bt(s.d,u-n,S,l))v.precision=u+=10,r=o=a=new v(1),g=0,l++;else return k(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,v,S=1,A=10,R=e,D=R.d,M=R.constructor,B=M.rounding,I=M.precision;if(R.s<0||!D||!D[0]||!R.e&&D[0]==1&&D.length==1)return new M(D&&!D[0]?-1/0:R.s!=1?NaN:D?0:R);if(t==null?(_=!1,g=I):g=t,M.precision=g+=A,r=X(D),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=X(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new M("0."+r),o++):R=new M(n+"."+r.slice(1))}else return l=br(M,g+2,I).times(o+""),R=Oe(new M(n+"."+r.slice(1)),g-A).plus(l),M.precision=I,t==null?k(R,I,B,_=!0):R;for(h=R,u=s=R=q(R.minus(1),R.plus(1),g,1),v=k(R.times(R),g,1),i=3;;){if(s=k(s.times(v),g,1),l=u.plus(q(s,new M(i),g,1)),X(l.d).slice(0,g)===X(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(br(M,g+2,I).times(o+""))),u=q(u,new M(S),g,1),t==null)if(Bt(u.d,g-A,B,a))M.precision=g+=A,l=s=R=q(h.minus(1),h.plus(1),g,1),v=k(R.times(R),g,1),i=a=1;else return k(u,M.precision=I,B,_=!0);else return M.precision=I,u;u=l,i+=2}}function vo(e){return String(e.s*e.s/0)}function vn(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)%O,r<0&&(n+=O),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(fu.test(t))r=16,t=t.toLowerCase();else if(pu.test(t))r=2;else if(mu.test(t))r=8;else throw Error(Ne+t);for(o=t.search(/p/i),o>0?(u=+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)),l=yr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=Pr(l,g),e.d=l,_=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):He.pow(2,u))),_=!0,e)}function wu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:pt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vr(5,r)),t=pt(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 pt(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/O);for(_=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),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,l++}return _=!0,s.d.length=h+1,s}function vr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ce=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ce=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ce=po(r)?n?2:3:n?4:1,t;Ce=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Tn(e,t,r,n){var i,o,s,a,u,l,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ue(r,1,_e),n===void 0?n=S.rounding:ue(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=vo(e);else{for(g=he(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(".",""),v=new S(1),v.e=g.length-s,v.d=yr(he(v),10,i),v.e=v.d.length),h=yr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,v,r,n,0,i),h=e.d,o=e.e,l=go),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=yr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function Eu(e){return new this(e).abs()}function bu(e){return new this(e).acos()}function xu(e){return new this(e).acosh()}function Pu(e,t){return new this(e).plus(t)}function vu(e){return new this(e).asin()}function Tu(e){return new this(e).asinh()}function Cu(e){return new this(e).atan()}function Au(e){return new this(e).atanh()}function Ru(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=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Su(e){return new this(e).cbrt()}function Iu(e){return k(e=new this(e),e.e+1,2)}function ku(e,t,r){return new this(e).clamp(t,r)}function Du(e){if(!e||typeof e!="object")throw Error(xr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,_e,"rounding",0,8,"toExpNeg",-ct,0,"toExpPos",0,ct,"maxE",0,ct,"minE",-ct,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ne+r+": "+n);if(r="crypto",i&&(this[r]=bn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(yo);else this[r]=!1;else throw Error(Ne+r+": "+n);return this}function Mu(e){return new this(e).cos()}function Ou(e){return new this(e).cosh()}function Co(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,mo(o)){l.s=o.s,_?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(l.e=NaN,l.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++;n`}};function mt(e){return e instanceof $t}d();c();p();f();m();d();c();p();f();m();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},Ao={bold:ar,red:it,green:Ri,dim:ur,enabled:!0},dt={write(e){e.writeLine(",")}};d();c();p();f();m();var we=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.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();c();p();f();m();var Le=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var gt=class extends Le{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Tr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new we("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(dt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var Ro=": ",Rr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ro.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ro).write(this.value)}};d();c();p();f();m();var z=class e extends Le{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof gt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}writeEmpty(r){let n=new we("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(dt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var Y=class extends Le{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)}};var Cn=class{constructor(t){this.errorMessages=[];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 Sr(e){return new Cn(So(e))}function So(e){let t=new z;for(let[r,n]of Object.entries(e)){let i=new Rr(r,Io(n));t.addField(i)}return t}function Io(e){if(typeof e=="string")return new Y(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Y(String(e));if(typeof e=="bigint")return new Y(`${e}n`);if(e===null)return new Y("null");if(e===void 0)return new Y("undefined");if(ft(e))return new Y(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new Y(`Buffer.alloc(${e.byteLength})`):new Y(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=hr(e)?e.toISOString():"Invalid Date";return new Y(`new Date("${t}")`)}return e instanceof Te?new Y(`Prisma.${e._getName()}`):mt(e)?new Y(`prisma.${co(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ol(e):typeof e=="object"?So(e):new Y(Object.prototype.toString.call(e))}function ol(e){let t=new gt;for(let r of e)t.addItem(Io(r));return t}function ko(e){if(e===void 0)return"";let t=Sr(e);return new ut(0,{colors:Ar}).write(t).toString()}d();c();p();f();m();var sl="P2037";function qt({error:e,user_facing_error:t},r,n){return t.error_code?new K(al(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function al(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===sl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var An=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new An}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Do={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=ll(e);return Object.entries(t).reduce((n,[i,o])=>(Do[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ll(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Mo(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}d();c();p();f();m();function cl(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function pl(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function Oo(e,t){return t({action:"count",unpacker:pl(e),argsMapper:cl})(e)}d();c();p();f();m();function fl(e={}){let t=ht(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 ml(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function No(e,t){return t({action:"groupBy",unpacker:ml(e),argsMapper:fl})(e)}function _o(e,t,r){if(t==="aggregate")return n=>Mo(n,r);if(t==="count")return n=>Oo(n,r);if(t==="groupBy")return n=>No(n,r)}d();c();p();f();m();function Lo(e,t){let r=t.fields.filter(i=>!i.relationName),n=cn(r,i=>i.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 $t(e,o,s.type,s.isList,s.kind==="enum")},...dr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var Fo=e=>Array.isArray(e)?e:e.split("."),Rn=(e,t)=>Fo(t).reduce((r,n)=>r&&r[n],e),Bo=(e,t,r)=>Fo(t).reduceRight((n,i,o,s)=>Object.assign({},Rn(e,s.slice(0,o)),{[i]:n}),r);function dl(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function gl(e,t,r){return t===void 0?e!=null?e:{}:Bo(t,r,e||!0)}function Sn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=dl(n,i),h=gl(u,o,g),v=r({dataPath:g,callsite:l})(h),S=hl(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let M=[a[R].type,r,R],B=[g,h];return Sn(e,...M,...B)},...dr([...S,...Object.getOwnPropertyNames(v)])})}}function hl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var yl=Ve(Ki());var wl={red:it,gray:Di,dim:ur,bold:ar,underline:Ai,highlightSource:e=>e.highlight()},El={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function bl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function xl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=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${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Pl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Pl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function yt(e){let t=e.showColors?wl:El,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=bl(e),xl(r,t)}function $o(e,t,r,n){return e===De.ModelAction.findFirstOrThrow||e===De.ModelAction.findUniqueOrThrow?vl(t,r,n):n}function vl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=yt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Z(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof K&&o.code==="P2025"?new Pe(`No ${e} found`,t):o})}}d();c();p();f();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}var Tl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Cl=["aggregate","count","groupBy"];function In(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Al(e,t),Sl(e,t),Lt(r),ie("name",()=>t),ie("$name",()=>t),ie("$parent",()=>e._appliedParent)];return ge({},n)}function Al(e,t){let r=Ee(t),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=$o(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...u})})};return Tl.includes(o)?Sn(e,t,a):Rl(i)?_o(e,i,a):a({})}}}function Rl(e){return Cl.includes(e)}function Sl(e,t){return Ge(ie("fields",()=>{let r=e._runtimeDataModel.models[t];return Lo(t,r)}))}d();c();p();f();m();function qo(e){return e.replace(/^./,t=>t.toUpperCase())}var kn=Symbol();function Ut(e){let t=[Il(e),ie(kn,()=>e),ie("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Lt(r)),ge(e,t)}function Il(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Ge({getKeys(){return n},getPropertyValue(i){let o=qo(i);if(e._runtimeDataModel.models[o]!==void 0)return In(e,o);if(e._runtimeDataModel.models[i]!==void 0)return In(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Uo(e){return e[kn]?e[kn]:e}function Vo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(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 Ut(t)}d();c();p();f();m();d();c();p();f();m();function jo({result:e,modelName:t,select:r,extensions:n}){let i=n.getAllComputedFields(t);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(Ft(u))}kl(e,a.needs)&&o.push(Dl(a,ge(e,o)))}return o.length>0||s.length>0?ge(e,[...o,...s]):e}function kl(e,t){return t.every(r=>ln(e,r))}function Dl(e,t){return Ge(ie(e.name,()=>e.compute(t)))}d();c();p();f();m();function kr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=kr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function Qo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:kr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>jo({result:s,modelName:Ee(a),select:u.select,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Go(e){if(e instanceof ae)return Ml(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.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:Go((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=Zo(o,g),l.args=u,Wo(e,l,r,n+1)}})})}function Ko(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!=null?r:"$none",o);return Wo(e,t,s)}function zo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Yo(r,n,0,e):e(r)}}function Yo(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 u=a.customDataProxyFetch;return a.customDataProxyFetch=Zo(i,u),Yo(a,t,r+1,n)}})}var Ho=e=>e;function Zo(e=Ho,t=Ho){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function es(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ol({...e,...Xo(t.name,e,t.result.$allModels),...Xo(t.name,e,t.result[n])})}function Ol(e){let t=new de,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 st(e,n=>({...n,needs:r(n.name,new Set)}))}function Xo(e,t,r){return r?st(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Nl(t,o,i)})):{}}function Nl(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function ts(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}var Dr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=kt(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=kt(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return es((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],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()}},Mr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Dr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Dr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var rs=ne("prisma:client"),ns={Vercel:"vercel","Netlify CI":"netlify"};function is({postinstall:e,ciName:t,clientVersion:r}){if(rs("checkPlatformCaching:postinstall",e),rs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ns){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/${ns[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function os(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var _l="Cloudflare-Workers",Ll="node";function ss(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===_l?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Ll?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Fl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Or(){let e=ss();return{id:e,prettyName:Fl[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function wt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Or().id==="workerd"?new G(`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 G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Nr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var le=class extends Nr{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var Et=class extends le{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(Et,"ForcedRetryError");d();c();p();f();m();var We=class extends le{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(We,"InvalidDatasourceError");d();c();p();f();m();var Ke=class extends le{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Ke,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends le{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 ze=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(ze,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var Dn="This request could not be understood by the server",jt=class extends j{constructor(r,n,i){super(n||Dn,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(jt,"BadRequestError");d();c();p();f();m();var Jt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(Jt,"HealthcheckTimeoutError");d();c();p();f();m();var Qt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(Qt,"EngineStartupError");d();c();p();f();m();var Gt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Gt,"EngineVersionNotSupportedError");d();c();p();f();m();var Mn="Request timed out",Ht=class extends j{constructor(r,n=Mn){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Ht,"GatewayTimeoutError");d();c();p();f();m();var Bl="Interactive transaction error",Wt=class extends j{constructor(r,n=Bl){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Wt,"InteractiveTransactionError");d();c();p();f();m();var $l="Request parameters are invalid",Kt=class extends j{constructor(r,n=$l){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Kt,"InvalidRequestError");d();c();p();f();m();var On="Requested resource does not exist",zt=class extends j{constructor(r,n=On){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};N(zt,"NotFoundError");d();c();p();f();m();var Nn="Unknown server error",bt=class extends j{constructor(r,n,i){super(n||Nn,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(bt,"ServerError");d();c();p();f();m();var _n="Unauthorized, check your connection string",Yt=class extends j{constructor(r,n=_n){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(Yt,"UnauthorizedError");d();c();p();f();m();var Ln="Usage exceeded, retry again later",Zt=class extends j{constructor(r,n=Ln){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Zt,"UsageExceededError");async function ql(e){let t;try{t=await e.text()}catch(r){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(r){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 ql(e);if(n.type==="QueryEngineError")throw new K(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 ze(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Gt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Jt(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 Kt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,xt(_n,n));if(e.status===404)return new zt(r,xt(On,n));if(e.status===429)throw new Zt(r,xt(Ln,n));if(e.status===504)throw new Ht(r,xt(Mn,n));if(e.status>=500)throw new bt(r,xt(Nn,n));if(e.status>=400)throw new jt(r,xt(Dn,n))}function xt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();m();function as(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();c();p();f();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function us(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Ae[s]+Ae[a]+Ae[u]+Ae[l];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,u=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[u]+"="),r}d();c();p();f();m();function ls(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("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();c();p();f();m();function Ul(e){return e[0]*1e3+e[1]/1e6}function cs(e){return new Date(Ul(e))}d();c();p();f();m();var ps={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var er=class extends le{constructor(r,n){super(`Cannot fetch data from service: +${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};N(er,"RequestError");async function Ye(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Fn)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new er(s,{clientVersion:n})}}function jl(e){return{...e.headers,"Content-Type":"application/json"}}function Jl(e){return{method:e.method,headers:jl(e)}}function Ql(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Bn(t.headers)}}async function Fn(e,t={}){let r=Gl("https"),n=Jl(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:v}}=g;h>=301&&h<=399&&v&&(v.startsWith("http")===!1?s(Fn(`${o}${v}`,t)):s(Fn(v,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(Ql(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Gl=typeof require!="undefined"?require:()=>{},Bn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Hl=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,fs=ne("prisma:client:dataproxyEngine");async function Wl(e,t){var s,a,u;let r=ps["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Hl.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,v]=l.split("."),S=Kl(`<=${g}.${h}.${v}`),A=await Ye(S,{clientVersion:n});if(!A.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${A.status} ${A.statusText}, response body: ${await A.text()||""}`);let R=await A.text();fs("length of body fetched from unpkg.com",R.length);let D;try{D=JSON.parse(R)}catch(M){throw console.error("JSON.parse error: body fetched from unpkg.com: ",R),M}return D.version}throw new Ke("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ms(e,t){let r=await Wl(e,t);return fs("version",r),r}function Kl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var ds=3,$n=ne("prisma:client:dataproxyEngine"),qn=class{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,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},tr=class{constructor(t){this.name="DataProxyEngine";ls(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=us(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[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new qn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ms(t,this.config),$n("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:cs(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Ye(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$n("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==null?void 0:n.kind)==="itx"?n.options:void 0,s=gr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?qt(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}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 Ye(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?qt(u.errors[0],this.config.clientVersion,this.config.activeProvider):new se(u.errors,{clientVersion:this.config.clientVersion});return u}})}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 u=await Ye(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,v=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Ye(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;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=wt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new We(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new We(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new We(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new Ke("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof le)||!o.isRetryable)throw o;if(n>=ds)throw o instanceof Et?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${ds} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await as(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof ze)throw await this.uploadSchema(),new Et({clientVersion:this.clientVersion,cause:t});if(t)throw t}};function gs({copyEngine:e=!0},t){let r;try{r=wt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&It("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Rt(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["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."],new Z(u.join(` +`),{clientVersion:t.clientVersion})}if(i)return new tr(t);throw new Z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function _r({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var xs=Ve(Un());d();c();p();f();m();function Es(e,t){let r=bs(e),n=zl(r),i=Zl(n);i?Lr(i,t):t.addErrorMessage(()=>"Unknown error")}function bs(e){return e.errors.flatMap(t=>t.kind==="Union"?bs(t):[t])}function zl(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:Yl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Yl(e,t){return[...new Set(e.concat(t))]}function Zl(e){return pn(e,(t,r)=>{let n=ys(t),i=ys(r);return n!==i?n-i:ws(t)-ws(r)})}function ys(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ws(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var Re=class{constructor(t,r){this.name=t;this.value=r;this.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();c();p();f();m();var Fr=class{constructor(){this.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(dt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Lr(e,t){switch(e.kind){case"IncludeAndSelect":Xl(e,t);break;case"IncludeOnScalar":ec(e,t);break;case"EmptySelection":tc(e,t);break;case"UnknownSelectionField":rc(e,t);break;case"UnknownArgument":nc(e,t);break;case"UnknownInputField":ic(e,t);break;case"RequiredArgumentMissing":oc(e,t);break;case"InvalidArgumentType":sc(e,t);break;case"InvalidArgumentValue":ac(e,t);break;case"ValueTooLarge":uc(e,t);break;case"SomeFieldsMissing":lc(e,t);break;case"TooManyFieldsGiven":cc(e,t);break;case"Union":Es(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function Xl(e,t){var n,i;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof z&&((n=r.getField("include"))==null||n.markAsError(),(i=r.getField("select"))==null||i.markAsError()),t.addErrorMessage(o=>`Please ${o.bold("either")} use ${o.green("`include`")} or ${o.green("`select`")}, but ${o.red("not both")} at the same time.`)}function ec(e,t){var s,a;let[r,n]=Br(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new Re(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${rr(u)}`:l+=".",l+=` +Note that ${u.bold("include")} statements only accept relation fields.`,l})}function tc(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),Ts(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${rr(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function rc(e,t){var o;let[r,n]=Br(e.selectionPath),i=t.arguments.getDeepSelectionParent(r);i&&((o=i.value.getField(n))==null||o.markAsError(),Ts(i.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return i&&a.push(`for ${s.bold(i.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(rr(s)),a.join(" ")})}function nc(e,t){var i;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof z&&((i=n.getField(r))==null||i.markAsError(),pc(n,e.arguments)),t.addErrorMessage(o=>Ps(o,r,e.arguments.map(s=>s.name)))}function ic(e,t){var o;let[r,n]=Br(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof z){(o=i.getDeepField(e.argumentPath))==null||o.markAsError();let s=i.getDeepFieldValue(r);s instanceof z&&Cs(s,e.inputType)}t.addErrorMessage(s=>Ps(s,n,e.inputType.fields.map(a=>a.name)))}function Ps(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(rr(e)),n.join(" ")}function oc(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof Y&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof z))return;let[i,o]=Br(e.argumentPath),s=new Fr,a=n.getDeepFieldValue(i);if(a instanceof z)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new Re(o,s).makeRequired())}else{let u=e.inputTypes.map(vs).join(" | ");a.addSuggestion(new Re(o,u).makeRequired())}}function vs(e){return e.kind==="list"?`${vs(e.elementType)}[]`:e.name}function sc(e,t){var i;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof z&&((i=n.getDeepFieldValue(e.argumentPath))==null||i.markAsError()),t.addErrorMessage(o=>{let s=$r("or",e.argument.typeNames.map(a=>o.green(a)));return`Argument \`${o.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${o.red(e.inferredType)}.`})}function ac(e,t){var i;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof z&&((i=n.getDeepFieldValue(e.argumentPath))==null||i.markAsError()),t.addErrorMessage(o=>{let s=[`Invalid value for argument \`${o.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=$r("or",e.argument.typeNames.map(u=>o.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function uc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof z){let o=n.getDeepField(e.argumentPath),s=o==null?void 0:o.value;s==null||s.markAsError(),s instanceof Y&&(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 lc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof z){let i=n.getDeepFieldValue(e.argumentPath);i instanceof z&&Cs(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")} ${$r("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(rr(i)),o.join(" ")})}function cc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof z){let o=n.getDeepFieldValue(e.argumentPath);o instanceof z&&(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 ${$r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ts(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Re(r.name,"true"))}function pc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Re(r.name,r.typeNames.join(" | ")))}function Cs(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Re(r.name,r.typeNames.join(" | ")))}function Br(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function rr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function $r(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,xs.default)(e,i);o>fc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Is=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var ks=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function nr(e){try{return Ds(e,"fast")}catch(t){return Ds(e,"slow")}}function Ds(e,t){return JSON.stringify(e.map(r=>Pc(r,t)))}function Pc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:lt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ye.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:vc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Os(e):e}function vc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Os(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ms);let t={};for(let r of Object.keys(e))t[r]=Ms(e[r]);return t}function Ms(e){return typeof e=="bigint"?e.toString():Os(e)}var Tc=/^(\s*alter\s)/i,Ns=ne("prisma:client");function Jn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Tc.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 Qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:nr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:nr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:nr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ks(r),i={values:nr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Ns(`prisma.${e}(${n}, ${i.values})`):Ns(`prisma.${e}(${n})`),{query:n,parameters:i}},_s={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ls={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Gn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=Fs(r(o)):Fs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Fs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var Bs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Hn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Bs}};function $s(e){return e.includes("tracing")?new Hn:Bs}d();c();p();f();m();function qs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var Cc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Us=Cc;d();c();p();f();m();function Vs(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();c();p();f();m();var Ur=class{constructor(){this._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();c();p();f();m();var Js=Ve(eo());d();c();p();f();m();function Vr(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function jr(e){return e===null?e:Array.isArray(e)?e.map(jr):typeof e=="object"?Ac(e)?Rc(e):st(e,jr):e}function Ac(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Rc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ye(t);case"Json":return JSON.parse(t);default:Je(t,"Unknown tagged value")}}d();c();p();f();m();function js(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wn(e.query.arguments)),t.push(Wn(e.query.selection)),t.join("")}function Wn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Sc={aggregate:!1,aggregateRaw:!1,createMany:!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,updateOne:!0,upsertOne:!0};function Kn(e){return Sc[e]}d();c();p();f();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Kn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:kc(o),containsWrite:l,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?Qs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:js(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.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})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}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}){if(Ic(t),Dc(t,i)||t instanceof Pe)throw t;if(t instanceof K&&Mc(t)){let u=Gs(t.meta);qr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=yt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new K(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ve(a,this.client._clientVersion);if(t instanceof se)throw new se(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof ve)throw new ve(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Js.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=jr(Rn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function kc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Qs(e)};Je(e,"Unknown transaction kind")}}function Qs(e){return{id:e.id,payload:e.payload}}function Dc(e,t){return Vr(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function Mc(e){return e.code==="P2009"||e.code==="P2012"}function Gs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Gs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Hs="5.11.0";var Ws=Hs;d();c();p();f();m();function Ks(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=zs(t[n]);return r})}function zs({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ye(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(zs);default:return t}}d();c();p();f();m();var ea=Ve(Un());d();c();p();f();m();var J=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(J,"PrismaClientConstructorValidationError");var Ys=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Zs=["pretty","colorless","minimal"],Xs=["info","query","warn","error"],Nc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`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 J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`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 J(`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 J(`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===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!_r(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Rt()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`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 J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Zs.includes(e)){let t=Pt(e,Zs);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Xs.includes(r)){let n=Pt(r,Xs);throw new J(`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 J(`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 J(`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 J(`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 J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`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 J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ta(e,t){for(let[r,n]of Object.entries(e)){if(!Ys.includes(r)){let i=Pt(r,Ys);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Nc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('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=_c(e,t);return r?` Did you mean "${r}"?`:""}function _c(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ea.default)(e,i)}));r.sort((i,o)=>i.distance{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)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Vr(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Be=ne("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Lc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Fc=Symbol.for("prisma.client.transaction.id"),Bc={id:0,nextId(){return++this.id}};function oa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ur;this._createPrismaPromise=Gn();this.$extends=Vo;var u,l,g,h,v,S,A,R,D,M,B,I,L,ee;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,is(e),n&&ta(n,e);let i=n!=null&&n.adapter?hn(n.adapter):void 0,o=new cr().on("error",()=>{});this._extensions=Mr.empty(),this._previewFeatures=_r(e),this._clientVersion=(h=e.clientVersion)!=null?h:Ws,this._activeProvider=e.activeProvider,this._tracingHelper=$s(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(v=e.injectableEdgeEnv)==null?void 0:v.call(e);try{let F=n!=null?n:{},Ze=(S=F.__internal)!=null?S:{},$e=Ze.debug===!0;$e&&ne.enable("prisma:client");let fe=At.resolve(e.dirname,e.relativePath);bi.existsSync(fe)||(fe=e.dirname),Be("dirname",e.dirname),Be("relativePath",e.relativePath),Be("cwd",fe);let qe=Ze.engine||{};if(F.errorFormat?this._errorFormat=F.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:fe,dirname:e.dirname,enableDebugLogs:$e,allowTriggerPanic:qe.allowTriggerPanic,datamodelPath:At.join(e.dirname,(A=e.filename)!=null?A:"schema.prisma"),prismaPath:(R=qe.binaryPath)!=null?R:void 0,engineEndpoint:qe.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:F.log&&Vs(F.log),logQueries:F.log&&!!(typeof F.log=="string"?F.log==="query":F.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(D=a==null?void 0:a.parsed)!=null?D:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:os(F,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(M=F.transactionOptions)==null?void 0:M.maxWait)!=null?B:2e3,timeout:(L=(I=F.transactionOptions)==null?void 0:I.timeout)!=null?L:5e3,isolationLevel:(ee=F.transactionOptions)==null?void 0:ee.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:wt,getBatchRequestPayload:gr,prismaGraphQLToJSError:qt,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:G,PrismaClientKnownRequestError:K,debug:ne("prisma:client:accelerateEngine"),engineVersion:ia.version,clientVersion:e.clientVersion}},Be("clientVersion",e.clientVersion),this._engine=gs(e,this._engineConfig),this._requestHandler=new Qr(this,o),F.log)for(let Q of F.log){let Se=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Se&&this.$on(Se,Ue=>{var Xe;ot.log(`${(Xe=ot.tags[Se])!=null?Xe:""}`,Ue.message||Ue.query)})}this._metrics=new at(this._engine)}catch(F){throw F.clientVersion=this._clientVersion,F}return this._appliedParent=Ut(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$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{ji()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({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]=na(n,i);return Jn(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=>(Jn(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:Is,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:Qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Ks)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...na(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Bc.nextId(),s=qs(n.length),a=n.map((u,l)=>{var v,S,A;if((u==null?void 0:u[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=(v=i==null?void 0:i.isolationLevel)!=null?v:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(A=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?A:u});return ra(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let v={kind:"itx",...a};u=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return u}_createItxClient(n){return Ut(ge(Uo(this),[ie("_appliedParent",()=>this._appliedParent._createItxClient(n)),ie("_createPrismaPromise",()=>Gn(n)),ie(Fc,()=>n.id),Ft(Us)]))}$transaction(n,i){let o;typeof n=="function"?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){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:Lc,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,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,M=>h(g,B=>(M==null||M.end(),u(B))));let{runInTransaction:v,args:S,...A}=g,R={...n,...A};S&&(R.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&v===!1&&delete R.transaction;let D=await Ko(this,R);return R.model?Qo({result:D,modelName:R.model,args:R.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):D};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=l?l(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>As({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return ne.enabled("prisma:client")&&(Be("Prisma Client call:"),Be(`prisma.${i}(${ko(n)})`),Be("Generated request:"),Be(JSON.stringify(R,null,2)+` +`)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}}return t}function na(e,t){return $c(e)?[new ae(e,t),_s]:[e,Ls]}function $c(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var qc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function sa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!qc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=edge.js.map diff --git a/src/db/clients/account/runtime/index-browser.d.ts b/src/db/clients/account/runtime/index-browser.d.ts new file mode 100644 index 0000000..b739ed1 --- /dev/null +++ b/src/db/clients/account/runtime/index-browser.d.ts @@ -0,0 +1,365 @@ +declare class AnyNull extends NullTypesEnumValue { +} + +declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +declare class DbNull extends NullTypesEnumValue { +} + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: Runtime; + prettyName: string; + isEdge: boolean; +}; + +declare class JsonNull extends NullTypesEnumValue { +} + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +declare type Narrowable = string | number | bigint | boolean | []; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +export { } diff --git a/src/db/clients/account/runtime/index-browser.js b/src/db/clients/account/runtime/index-browser.js new file mode 100644 index 0000000..4f82417 --- /dev/null +++ b/src/db/clients/account/runtime/index-browser.js @@ -0,0 +1,13 @@ +"use strict";var de=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Je(n))!je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=Ge(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Ce(Xn,{Decimal:()=>We,Public:()=>he,getRuntime:()=>Ae,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Ce(he,{validator:()=>Me});function Me(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},J=class extends ge{_getNamespace(){return"NullTypes"}},j=class extends J{};me(j,"DbNull");var X=class extends J{};me(X,"JsonNull");var K=class extends J{};me(K,"AnyNull");var Oe={classes:{DbNull:j,JsonNull:X,AnyNull:K},instances:{DbNull:new j(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var Qe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!Qe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Ye="Cloudflare-Workers",xe="node";function be(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Ye?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===xe?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Ae(){let e=be();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,V=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",$=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",A=Math.floor,M=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*M(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=M(i,1/3),e=A((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-A(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=W(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=W(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=W(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),Q(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(Q(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=A(e.e/m),c=A(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=A((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=A(c.e/m)+A(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(R(e,0,V),n===void 0?n=t.rounding:R(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(R(e,0,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(R(e,0,V),n===void 0?n=s.rounding:R(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=M(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:R(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(M(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=A(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(R(e,1,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(R(e,1,V),n===void 0?n=t.rounding:R(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=M(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==M(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==M(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=W(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,_,C,q,E,P,x,I,le,z,G,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,b=t.d,k=r.d;if(!b||!b[0]||!k||!k[0])return new ee(!t.s||!r.s||(b?k&&b[0]==k[0]:!k)?NaN:b&&b[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=A(t.e/g)-A(r.e/g)),T=k.length,G=b.length,C=new ee(ae),q=C.d=[],a=0;k[a]==(b[a]||0);a++);if(k[a]>(b[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),b=e(b,d,l),T=k.length,G=b.length),z=T,E=b.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(x=E[0],T!=P&&(x=x*l+(E[1]||0)),d=x/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),_=N.length,P=E.length,f=n(N,E,_,P),f==1&&(d--,i(N,T<_?y:k,_,l))):(d==0&&(f=d=1),N=k.slice()),_=N.length,_=10;d/=10)a++;C.e=a+c*g-1,p(C,u?s+C.e+1:s,o,v)}return C}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/M(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/M(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%M(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/M(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=M(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=M(10,m-s),a[d]=o>0?(c/M(10,r-o)%M(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),Re(s.d,o)&&(r=!0)),i=A(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),Re(n.d,o)}return w=!0,s}function _e(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[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(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(M(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&Q(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,_=N.d,C=N.constructor,q=C.rounding,E=C.precision;if(N.s<0||!_||!_[0]||!N.e&&_[0]==1&&_.length==1)return new C(_&&!_[0]?-1/0:N.s!=1?NaN:_?0:N);if(n==null?(w=!1,c=E):c=n,C.precision=c+=v,i=O(_),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new C("0."+i),s++):N=new C(t+"."+i.slice(1))}else return f=se(C,c+2,E).times(s+""),N=B(new C(t+"."+i.slice(1)),c-v).plus(f),C.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new C(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(C,c+2,E).times(s+""))),l=S(l,new C(g),c,1),n==null)if(Q(l.d,c-v,q,u))C.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,C.precision=E,q,w=!0);else return C.precision=E,l;l=f,r+=2}}function $e(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?M(2,l):Y.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:W(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=W(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function W(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function Ve(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=_e(i)?t?2:3:t?4:1,n;Z=_e(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(R(i,1,V),t===void 0?t=g.rounding:R(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=$e(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,V,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error($+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t + * MIT Licence + *) +*/ +//# sourceMappingURL=index-browser.js.map diff --git a/src/db/clients/account/runtime/library.d.ts b/src/db/clients/account/runtime/library.d.ts new file mode 100644 index 0000000..db23760 --- /dev/null +++ b/src/db/clients/account/runtime/library.d.ts @@ -0,0 +1,3158 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: EngineConfig['accelerateUtils']; +}; + +export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { +} + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = Pick; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: CustomDataProxyFetch; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResult | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; +}; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection

= UnwrapPayload<{ + default: P; +}>['default']; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +declare type Dictionary = { + [key: string]: T | undefined; +}; + +export declare namespace DMMF { + export type Document = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; + }>; + export type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; + }>; + export type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; + }>; + export type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; + }>; + export type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; + }>; + export type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + }>; + export type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + }>; + export type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; + }>; + export type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; + }>; + export type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; + }>; + export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + export type FieldNamespace = 'model' | 'prisma'; + export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + export type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationName?: string; + documentation?: string; + }>; + export type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: any[]; + }>; + export type FieldDefaultScalar = string | boolean | number; + export type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; + }>; + export type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; + }>; + export type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; + }>; + export type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; + }; + export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + export type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + deprecation?: Deprecation; + }>; + export type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; + }>; + export type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; + }>; + export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + export type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; + }>; + export type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + }; + fields: SchemaArg[]; + }>; + export type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; + }>; + export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + export type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + update?: string | null; + updateMany?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; + }>; + export enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + update = "update", + updateMany = "updateMany", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist, why? + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" + } +} + +export declare interface DriverAdapter extends Queryable { + /** + * Starts new transation. + */ + startTransaction(): Promise>; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): Result_4; +} + +/** Client */ +export declare type DynamicClientExtensionArgs> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; +} & { + [P in Exclude]: >(...args: ToTuple) => PrismaPromise; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; +}; + +export declare type DynamicModelExtensionFnResult> = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult : (args: Exact) => DynamicModelExtensionFnResult; + +export declare type DynamicModelExtensionThis> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions_2): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + datamodelPath: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: ErrorCapturingDriverAdapter; + /** + * The contents of the schema encoded into a string + * @remarks only used by DataProxyEngine.ts + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: WasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineProtocol = 'graphql' | 'json'; + +declare type EngineSpan = { + span: boolean; + name: string; + trace_id: string; + span_id: string; + parent_span_id: string; + start_time: [number, number]; + end_time: [number, number]; + attributes?: Record; + links?: { + trace_id: string; + span_id: string; + }[]; +}; + +declare type EngineSpanEvent = { + span: boolean; + spans: EngineSpan[]; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +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: '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; +}; + +declare interface ErrorCapturingDriverAdapter extends DriverAdapter { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +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 */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResult, + GetSelect, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +declare type Fetch = typeof nodeFetch; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: Dictionary; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection

: A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection

: unknown) : DefaultSelection

; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = unknown extends R ? Base : { + [K in KR | keyof Base]: K extends KR ? R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never : Base[K]; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _metrics: MetricsClient; + _middlewares: MiddlewareHandler; + _previewFeatures: string[]; + _activeProvider: string; + _extensions: MergedExtensionsList; + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + /** + * Hook a middleware into the client + * @param middleware to hook + */ + $use(middleware: QueryMiddleware): void; + $on(eventType: E, callback: EventCallback): void; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions | undefined; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options | undefined; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + readonly $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + filename?: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: string; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: WasmLoadingConfig; +}; + +export declare type GetResult

= { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + update: GetFindResult; + updateMany: GetBatchResult; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[O]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: Runtime; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; +}; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime = [number, number]; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: (fetch: Fetch) => Fetch; +} & Omit; + +declare enum IsolationLevel { + ReadUncommitted = "ReadUncommitted", + ReadCommitted = "ReadCommitted", + RepeatableRead = "RepeatableRead", + Snapshot = "Snapshot", + Serializable = "Serializable" +} + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +export declare interface JsonArray extends Array { +} + +declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: Transaction_2.IsolationLevel; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { +} + +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _engine; + constructor(engine: Engine); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare class MiddlewareHandler { + private _middlewares; + use(middleware: M): void; + get(id: number): M | undefined; + has(id: number): boolean; + length(): number; +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +/** + * Imitates `fetch` via `https` to only suit our needs, it does nothing more. + * This is because we cannot bundle `node-fetch` as it uses many other Node.js + * utilities, while also bloating our bundles. This approach is much leaner. + * @param url + * @param options + * @returns + */ +declare function nodeFetch(url: string, options?: RequestOptions): Promise; + +declare class NodeHeaders { + readonly headers: Map; + constructor(init?: Record); + append(name: string, value: string): void; + delete(name: string): void; + get(name: string): string | null; + has(name: string): boolean; + set(name: string, value: string): void; + forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void; +} + +/** + * @deprecated Please don´t rely on type checks to this error anymore. + * This will become a regular `PrismaClientKnownRequestError` with code `P2025` + * in the future major version of the client. + * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`. + */ +export declare class NotFoundError extends PrismaClientKnownRequestError { + constructor(message: string, clientVersion: string); +} + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * List of Prisma enums that must use unique objects instead of strings as their values. + */ +export declare const objectEnumNames: string[]; + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + maxWait?: number; + timeout?: number; + isolationLevel?: IsolationLevel; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: DriverAdapter | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 extends Promise { + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = { + sql: string; + args: Array; +}; + +declare interface Queryable { + readonly provider: 'mysql' | 'postgres' | 'sqlite'; + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the type-aware result set of the query. + * + * This is the preferred way of executing `SELECT` queries. + */ + queryRaw(params: Query): Promise>; + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the number of affected rows. + * + * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, + * as well as transactional queries. + */ + executeRaw(params: Query): Promise>; +} + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + telemetry?: QueryEngineTelemetry; + engineProtocol: EngineProtocol; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string): Promise; + disconnect(headers: string): Promise; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId?: string): Promise; + sdlSchema(): Promise; + dmmf(traceparent: string): Promise; + startTransaction(options: string, traceHeaders: string): Promise; + commitTransaction(id: string, traceHeaders: string): Promise; + rollbackTransaction(id: string, traceHeaders: string): Promise; + metrics(options: string): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResult = { + data: T; + elapsed: number; +}; + +declare type QueryEngineTelemetry = { + enabled: Boolean; + endpoint: string; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]]; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + method?: string; + headers?: Record; + body?: string; +}; + +declare type RequestOptions_2 = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestResponse = { + ok: boolean; + url: string; + statusText?: string; + status: number; + headers: NodeHeaders; + text: () => Promise; + json: () => Promise; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Operation, + FluentOperation, + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare interface ResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; + +declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get text(): string; + get sql(): string; + get statement(): string; + inspect(): { + text: string; + sql: string; + values: unknown[]; + }; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + createEngineSpan(engineSpanEvent: EngineSpanEvent): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends Queryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise>; + /** + * Rolls back the transaction. + */ + rollback(): Promise>; +} + +declare namespace Transaction_2 { + export { + IsolationLevel, + Options, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + OperationPayload as Payload + } +} +export { Types } + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + JsonObject, + JsonArray, + JsonValue, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +declare type WasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => { + __wbg_set_wasm(exports: unknown): any; + QueryEngine: QueryEngineConstructor; + }; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine.ts + */ + getQueryEngineWasmModule: () => Promise; +}; + +export { } diff --git a/src/db/clients/account/runtime/library.js b/src/db/clients/account/runtime/library.js new file mode 100644 index 0000000..5608d65 --- /dev/null +++ b/src/db/clients/account/runtime/library.js @@ -0,0 +1,140 @@ +"use strict";var Fl=Object.create;var Rt=Object.defineProperty;var Ml=Object.getOwnPropertyDescriptor;var $l=Object.getOwnPropertyNames;var ql=Object.getPrototypeOf,Bl=Object.prototype.hasOwnProperty;var X=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Or=(e,r)=>{for(var t in r)Rt(e,t,{get:r[t],enumerable:!0})},no=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of $l(r))!Bl.call(e,i)&&i!==t&&Rt(e,i,{get:()=>r[i],enumerable:!(n=Ml(r,i))||n.enumerable});return e};var _=(e,r,t)=>(t=e!=null?Fl(ql(e)):{},no(r||!e||!e.__esModule?Rt(t,"default",{value:e,enumerable:!0}):t,e)),Vl=e=>no(Rt({},"__esModule",{value:!0}),e);var Ao=X((Od,Un)=>{"use strict";var v=Un.exports;Un.exports.default=v;var D="\x1B[",Br="\x1B]",dr="\x07",Ft=";",So=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?D+(e+1)+"G":D+(r+1)+";"+(e+1)+"H"};v.cursorMove=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=D+-e+"D":e>0&&(t+=D+e+"C"),r<0?t+=D+-r+"A":r>0&&(t+=D+r+"B"),t};v.cursorUp=(e=1)=>D+e+"A";v.cursorDown=(e=1)=>D+e+"B";v.cursorForward=(e=1)=>D+e+"C";v.cursorBackward=(e=1)=>D+e+"D";v.cursorLeft=D+"G";v.cursorSavePosition=So?"\x1B7":D+"s";v.cursorRestorePosition=So?"\x1B8":D+"u";v.cursorGetPosition=D+"6n";v.cursorNextLine=D+"E";v.cursorPrevLine=D+"F";v.cursorHide=D+"?25l";v.cursorShow=D+"?25h";v.eraseLines=e=>{let r="";for(let t=0;t[Br,"8",Ft,Ft,r,dr,e,Br,"8",Ft,Ft,dr].join("");v.image=(e,r={})=>{let t=`${Br}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+e.toString("base64")+dr};v.iTerm={setCwd:(e=process.cwd())=>`${Br}50;CurrentDir=${e}${dr}`,annotation:(e,r={})=>{let t=`${Br}1337;`,n=typeof r.x<"u",i=typeof r.y<"u";if((n||i)&&!(n&&i&&typeof r.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+dr}}});var Qn=X((Fd,Io)=>{"use strict";Io.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 Ru=require("os"),_o=require("tty"),pe=Qn(),{env:G}=process,je;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?je=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(je=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?je=1:G.FORCE_COLOR==="false"?je=0:je=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function Gn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Jn(e,r){if(je===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&je===void 0)return 0;let t=je||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Ru.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 Su(e){let r=Jn(e,e&&e.isTTY);return Gn(r)}ko.exports={supportsColor:Su,stdout:Gn(Jn(!0,_o.isatty(1))),stderr:Gn(Jn(!0,_o.isatty(2)))}});var Oo=X(($d,No)=>{"use strict";var Au=Do(),fr=Qn();function Lo(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 Hn(e){let{env:r}=process;if("FORCE_HYPERLINK"in r)return!(r.FORCE_HYPERLINK.length>0&&parseInt(r.FORCE_HYPERLINK,10)===0);if(fr("no-hyperlink")||fr("no-hyperlinks")||fr("hyperlink=false")||fr("hyperlink=never"))return!1;if(fr("hyperlink=true")||fr("hyperlink=always")||"NETLIFY"in r)return!0;if(!Au.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in r||"TEAMCITY_VERSION"in r)return!1;if("TERM_PROGRAM"in r){let t=Lo(r.TERM_PROGRAM_VERSION);switch(r.TERM_PROGRAM){case"iTerm.app":return t.major===3?t.minor>=1:t.major>3;case"WezTerm":return t.major>=20200620;case"vscode":return t.major>1||t.major===1&&t.minor>=72}}if("VTE_VERSION"in r){if(r.VTE_VERSION==="0.50.0")return!1;let t=Lo(r.VTE_VERSION);return t.major>0||t.minor>=50}return!1}No.exports={supportsHyperlink:Hn,stdout:Hn(process.stdout),stderr:Hn(process.stderr)}});var Mo=X((qd,Vr)=>{"use strict";var Iu=Ao(),Wn=Oo(),Fo=(e,r,{target:t="stdout",...n}={})=>Wn[t]?Iu.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`;Vr.exports=(e,r,t={})=>Fo(e,r,t);Vr.exports.stderr=(e,r,t={})=>Fo(e,r,{target:"stderr",...t});Vr.exports.isSupported=Wn.stdout;Vr.exports.stderr.isSupported=Wn.stderr});var qo=X((Kd,_u)=>{_u.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",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","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var Vo=X((zd,$t)=>{"use strict";var ku=require("fs"),Bo=require("path"),Du=require("os"),Lu=qo(),Nu=Lu.version,Ou=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Fu(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` +`);let n;for(;(n=Ou.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 zn(e){console.log(`[dotenv@${Nu}][DEBUG] ${e}`)}function Mu(e){return e[0]==="~"?Bo.join(Du.homedir(),e.slice(1)):e}function $u(e){let r=Bo.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(r=Mu(e.path)),e.encoding!=null&&(t=e.encoding));try{let o=Mt.parse(ku.readFileSync(r,{encoding:t}));return Object.keys(o).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(i===!0&&(process.env[s]=o[s]),n&&zn(i===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=o[s]}),{parsed:o}}catch(o){return n&&zn(`Failed to load ${r} ${o.message}`),{error:o}}}var Mt={config:$u,parse:Fu};$t.exports.config=Mt.config;$t.exports.parse=Mt.parse;$t.exports=Mt});var Ho=X((nf,Jo)=>{"use strict";Jo.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Ko=X((of,Wo)=>{"use strict";var ju=Ho();Wo.exports=e=>{let r=ju(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}});var Xn=X((sf,Uu)=>{Uu.exports={name:"@prisma/engines-version",version:"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"efd2449663b3d73d637ea1fd226bafbcf45b3102"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.22",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ei=X(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.enginesVersion=void 0;Bt.enginesVersion=Xn().prisma.enginesVersion});var oi=X((_f,Zo)=>{"use strict";Zo.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=X((Lf,rs)=>{"use strict";rs.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 ui=X((Nf,ns)=>{"use strict";var Xu=ts();ns.exports=e=>typeof e=="string"?e.replace(Xu(),""):e});var is=X((Mf,jt)=>{"use strict";jt.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()};jt.exports.default=jt.exports});var Wi=X((C0,Va)=>{"use strict";Va.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;sOn,Decimal:()=>Te,Extensions:()=>kn,MetricsClient:()=>yr,NotFoundError:()=>Le,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>j,PrismaClientValidationError:()=>K,Public:()=>Dn,Sql:()=>oe,defineDmmfProperty:()=>ss,empty:()=>ls,getPrismaClient:()=>Ll,getRuntime:()=>fn,join:()=>as,makeStrictEnum:()=>Nl,objectEnumValues:()=>Gt,raw:()=>Ei,sqltag:()=>bi,warnEnvConflicts:()=>Ol,warnOnce:()=>Hr});module.exports=Vl(ld);var kn={};Or(kn,{defineExtension:()=>io,getExtensionContext:()=>oo});function io(e){return typeof e=="function"?e:r=>r.$extends(e)}function oo(e){return e}var Dn={};Or(Dn,{validator:()=>so});function so(...e){return r=>r}var St={};Or(St,{$:()=>po,bgBlack:()=>Yl,bgBlue:()=>ru,bgCyan:()=>nu,bgGreen:()=>Xl,bgMagenta:()=>tu,bgRed:()=>Zl,bgWhite:()=>iu,bgYellow:()=>eu,black:()=>Hl,blue:()=>Ze,bold:()=>W,cyan:()=>_e,dim:()=>Ie,gray:()=>Fr,green:()=>$e,grey:()=>zl,hidden:()=>Gl,inverse:()=>Ql,italic:()=>Ul,magenta:()=>Wl,red:()=>ce,reset:()=>jl,strikethrough:()=>Jl,underline:()=>ee,white:()=>Kl,yellow:()=>de});var Ln,ao,lo,uo,co=!0;typeof process<"u"&&({FORCE_COLOR:Ln,NODE_DISABLE_COLORS:ao,NO_COLOR:lo,TERM:uo}=process.env||{},co=process.stdout&&process.stdout.isTTY);var po={enabled:!ao&&lo==null&&uo!=="dumb"&&(Ln!=null&&Ln!=="0"||co)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!po.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var jl=F(0,0),W=F(1,22),Ie=F(2,22),Ul=F(3,23),ee=F(4,24),Ql=F(7,27),Gl=F(8,28),Jl=F(9,29),Hl=F(30,39),ce=F(31,39),$e=F(32,39),de=F(33,39),Ze=F(34,39),Wl=F(35,39),_e=F(36,39),Kl=F(37,39),Fr=F(90,39),zl=F(90,39),Yl=F(40,49),Zl=F(41,49),Xl=F(42,49),eu=F(43,49),ru=F(44,49),tu=F(45,49),nu=F(46,49),iu=F(47,49);var ou=100,mo=["green","yellow","blue","magenta","cyan","red"],Mr=[],fo=Date.now(),su=0,Nn=typeof process<"u"?process.env:{};globalThis.DEBUG??(globalThis.DEBUG=Nn.DEBUG??"");globalThis.DEBUG_COLORS??(globalThis.DEBUG_COLORS=Nn.DEBUG_COLORS?Nn.DEBUG_COLORS==="true":!0);var $r={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,i;typeof require=="function"&&typeof process<"u"&&typeof process.stderr<"u"&&typeof process.stderr.write=="function"?i=(...o)=>{let s=require("util");process.stderr.write(s.format(...o)+` +`)}:i=console.warn??console.log,i(`${r} ${t}`,...n)},formatters:{}};function au(e){let r={color:mo[su++%mo.length],enabled:$r.enabled(e),namespace:e,log:$r.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Mr.push([o,...n]),Mr.length>ou&&Mr.shift(),$r.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:lu(c)),u=`+${Date.now()-fo}ms`;fo=Date.now(),globalThis.DEBUG_COLORS?a(St[s](W(o)),...l,St[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var On=new Proxy(au,{get:(e,r)=>$r[r],set:(e,r,t)=>$r[r]=t});function lu(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=Mr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return r.length!!(e&&typeof e=="object"),_t=e=>e&&!!e[ke],we=(e,r,t)=>{if(_t(e)){let n=e[ke](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if($n(e)){if(!$n(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];_t(a)&&a[uu]?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.lengthwe(u,s[c],t))&&i.every((u,c)=>we(u,a[c],t))&&(o.length===0||we(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>we(s,r[a],t))}return Object.keys(e).every(n=>{let i=e[n];return(n in r||_t(o=i)&&o[ke]().matcherType==="optional")&&we(i,r[n],t);var o})}return Object.is(r,e)},Ve=e=>{var r,t,n;return $n(e)?_t(e)?(r=(t=(n=e[ke]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?qr(e,Ve):qr(Object.values(e),Ve):[]},qr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function fe(e){return Object.assign(e,{optional:()=>cu(e),and:r=>B(e,r),or:r=>pu(e,r),select:r=>r===void 0?Eo(e):Eo(r,e)})}function cu(e){return fe({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ve(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:we(e,r,n),selections:t}},getSelectionKeys:()=>Ve(e),matcherType:"optional"})})}function B(...e){return fe({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,Ve),matcherType:"and"})})}function pu(...e){return fe({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return qr(e,Ve).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,Ve),matcherType:"or"})})}function k(e){return{[ke]:()=>({match:r=>({matched:!!e(r)})})}}function Eo(...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 fe({[ke]:()=>({match:n=>{let i={[r??kt]:n};return{matched:t===void 0||we(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??kt].concat(t===void 0?[]:Ve(t))})})}function Ee(e){return typeof e=="number"}function Xe(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}var xd=fe(k(function(e){return!0}));var er=e=>Object.assign(fe(e),{startsWith:r=>{return er(B(e,(t=r,k(n=>Xe(n)&&n.startsWith(t)))));var t},endsWith:r=>{return er(B(e,(t=r,k(n=>Xe(n)&&n.endsWith(t)))));var t},minLength:r=>er(B(e,(t=>k(n=>Xe(n)&&n.length>=t))(r))),maxLength:r=>er(B(e,(t=>k(n=>Xe(n)&&n.length<=t))(r))),includes:r=>{return er(B(e,(t=r,k(n=>Xe(n)&&n.includes(t)))));var t},regex:r=>{return er(B(e,(t=r,k(n=>Xe(n)&&!!n.match(t)))));var t}}),Pd=er(k(Xe)),be=e=>Object.assign(fe(e),{between:(r,t)=>be(B(e,((n,i)=>k(o=>Ee(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(B(e,(t=>k(n=>Ee(n)&&nbe(B(e,(t=>k(n=>Ee(n)&&n>t))(r))),lte:r=>be(B(e,(t=>k(n=>Ee(n)&&n<=t))(r))),gte:r=>be(B(e,(t=>k(n=>Ee(n)&&n>=t))(r))),int:()=>be(B(e,k(r=>Ee(r)&&Number.isInteger(r)))),finite:()=>be(B(e,k(r=>Ee(r)&&Number.isFinite(r)))),positive:()=>be(B(e,k(r=>Ee(r)&&r>0))),negative:()=>be(B(e,k(r=>Ee(r)&&r<0)))}),vd=be(k(Ee)),Be=e=>Object.assign(fe(e),{between:(r,t)=>Be(B(e,((n,i)=>k(o=>qe(o)&&n<=o&&i>=o))(r,t))),lt:r=>Be(B(e,(t=>k(n=>qe(n)&&nBe(B(e,(t=>k(n=>qe(n)&&n>t))(r))),lte:r=>Be(B(e,(t=>k(n=>qe(n)&&n<=t))(r))),gte:r=>Be(B(e,(t=>k(n=>qe(n)&&n>=t))(r))),positive:()=>Be(B(e,k(r=>qe(r)&&r>0))),negative:()=>Be(B(e,k(r=>qe(r)&&r<0)))}),Td=Be(k(qe)),Cd=fe(k(function(e){return typeof e=="boolean"})),Rd=fe(k(function(e){return typeof e=="symbol"})),Sd=fe(k(function(e){return e==null}));var qn={matched:!1,value:void 0};function mr(e){return new Bn(e,qn)}var Bn=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=>we(u,this.input,a))||i&&!i(this.input)?qn:{matched:!0,value:t(o?kt in s?s[kt]: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)}:qn)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let r;try{r=JSON.stringify(this.input)}catch{r=this.input}throw new Error(`Pattern matching error: no pattern matches value ${r}`)}run(){return this.exhaustive()}returnType(){return this}};var Po=require("util");var mu={warn:de("prisma:warn")},du={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Dt(e,...r){du.warn()&&console.warn(`${mu.warn} ${e}`,...r)}var fu=(0,Po.promisify)(xo.default.exec),te=N("prisma:get-platform"),gu=["1.0.x","1.1.x","3.0.x"];async function vo(){let e=Nt.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Ot("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 yu(),n=await Cu(),i=bu({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await wu(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function hu(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=mr({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 te(`Found distro info: +${JSON.stringify(a,null,2)}`),a}async function yu(){let e="/etc/os-release";try{let r=await Vn.default.readFile(e,{encoding:"utf-8"});return hu(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Eu(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return To(t)}}function bo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return To(t)}}function To(e){let r=(()=>{if(Ro(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(gu.includes(r))return r}function bu(e){return mr(e).with({familyDistro:"musl"},()=>(te('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(te('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(te('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(te(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function wu(e){let r='grep -v "libssl.so.0"',t=await wo(e);if(t){te(`Found libssl.so file using platform-specific paths: ${t}`);let o=bo(t);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}te('Falling back to "ldconfig" and other generic paths');let n=await Ot(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await wo(["/lib64","/usr/lib64","/lib"])),n){te(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=bo(n);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ot("openssl version -v");if(i){te(`Found openssl binary with version: ${i}`);let o=Eu(i);if(te(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return te("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function wo(e){for(let r of e){let t=await xu(r);if(t)return t}}async function xu(e){try{return(await Vn.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 rr(){let{binaryTarget:e}=await Co();return e}function Pu(e){return e.binaryTarget!==void 0}async function jn(){let{memoized:e,...r}=await Co();return r}var Lt={};async function Co(){if(Pu(Lt))return Promise.resolve({...Lt,memoized:!0});let e=await vo(),r=vu(e);return Lt={...e,binaryTarget:r},{...Lt,memoized:!1}}function vu(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Dt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures. 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=mr({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.");Dt(`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&&te(`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||Ro(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Dt(`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 Tu(e){try{return await e()}catch{return}}function Ot(e){return Tu(async()=>{let r=await fu(e);return te(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function Cu(){return typeof Nt.default.machine=="function"?Nt.default.machine():(await Ot("uname -m"))?.trim()}function Ro(e){return e.startsWith("1.")}var $o=_(Mo());function Kn(e){return(0,$o.default)(e,e,{fallback:ee})}var Zn=_(Vo()),qt=_(require("fs"));var gr=_(require("path"));function jo(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 Yn=N("prisma:tryLoadEnv");function jr({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Uo(e);t.conflictCheck!=="none"&&qu(n,r,t.conflictCheck);let i=null;return Qo(n?.path,r)||(i=Uo(r)),!n&&!i&&Yn("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 qu(e,r,t){let n=e?.dotenvResult.parsed,i=!Qo(e?.path,r);if(n&&r&&i&&qt.default.existsSync(r)){let o=Zn.default.parse(qt.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gr.default.relative(process.cwd(),e.path),l=gr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${ee(a)} and ${ee(l)} +Conflicting env vars: +${s.map(c=>` ${W(c)}`).join(` +`)} + +We suggest to move the contents of ${ee(l)} to ${ee(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 ${ee(a)} and ${ee(l)} +Env vars from ${ee(l)} overwrite the ones from ${ee(a)} + `;console.warn(`${de("warn(prisma)")} ${u}`)}}}}function Uo(e){if(Bu(e)){Yn(`Environment variables loaded from ${e}`);let r=Zn.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:jo(r),message:Ie(`Environment variables loaded from ${gr.default.relative(process.cwd(),e)}`),path:e}}else Yn(`Environment variables not found at ${e}`);return null}function Qo(e,r){return e&&r&&gr.default.resolve(e)===gr.default.resolve(r)}function Bu(e){return!!(e&&qt.default.existsSync(e))}var Go="library";function Ur(e){let r=Vu();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Go)}function Vu(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Qu=_(ei());var M=_(require("path")),Gu=_(ei()),hf=N("prisma:engines");function zo(){return M.default.join(__dirname,"../")}var yf="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=_(require("fs")),Yo=N("chmodPlusX");function ti(e){if(process.platform==="win32")return;let r=ri.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){Yo(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);Yo(`Have to call chmodPlusX on ${e}`),ri.default.chmodSync(e,n)}function ni(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: ${Kn("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ie(e.id)}\`).`,s=mr({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 De;(r=>{let e;(E=>(E.findUnique="findUnique",E.findUniqueOrThrow="findUniqueOrThrow",E.findFirst="findFirst",E.findFirstOrThrow="findFirstOrThrow",E.findMany="findMany",E.create="create",E.createMany="createMany",E.update="update",E.updateMany="updateMany",E.upsert="upsert",E.delete="delete",E.deleteMany="deleteMany",E.groupBy="groupBy",E.count="count",E.aggregate="aggregate",E.findRaw="findRaw",E.aggregateRaw="aggregateRaw"))(e=r.ModelAction||(r.ModelAction={}))})(De||(De={}));var Qr=_(require("path"));function ii(e){return Qr.default.sep===Qr.default.posix.sep?e:e.split(Qr.default.sep).join(Qr.default.posix.sep)}var Xo=_(oi());function ai(e){return String(new si(e))}var si=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:Ju(r.binaryTargets)}));return`generator ${r.name} { +${(0,Xo.default)(Hu(n),2)} +}`}};function Ju(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 Hu(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)} = ${Wu(n)}`).join(` +`)}function Wu(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var Jr={};Or(Jr,{error:()=>Yu,info:()=>zu,log:()=>Ku,query:()=>Zu,should:()=>es,tags:()=>Gr,warn:()=>li});var Gr={error:ce("prisma:error"),warn:de("prisma:warn"),info:_e("prisma:info"),query:Ze("prisma:query")},es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Ku(...e){console.log(...e)}function li(e,...r){es.warn()&&console.warn(`${Gr.warn} ${e}`,...r)}function zu(e,...r){console.info(`${Gr.info} ${e}`,...r)}function Yu(e,...r){console.error(`${Gr.error} ${e}`,...r)}function Zu(e,...r){console.log(`${Gr.query} ${e}`,...r)}function Vt(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 tr(e,r){throw new Error(r)}function ci(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var pi=(e,r)=>e.reduce((t,n)=>(t[r(n)]=n,t),{});function hr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function mi(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{os.has(e)||(os.add(e),li(r,...t))};var V=class extends Error{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"}};w(V,"PrismaClientKnownRequestError");var Le=class extends V{constructor(r,t){super(r,{code:"P2025",clientVersion:t}),this.name="NotFoundError"}};w(Le,"NotFoundError");var R=class e extends Error{constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(R,"PrismaClientInitializationError");var ue=class extends Error{constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(ue,"PrismaClientRustPanicError");var j=class extends Error{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"}};w(j,"PrismaClientUnknownRequestError");var K=class extends Error{constructor(t,{clientVersion:n}){super(t);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(K,"PrismaClientValidationError");var yr=class{constructor(r){this._engine=r}prometheus(r){return this._engine.metrics({format:"prometheus",...r})}json(r){return this._engine.metrics({format:"json",...r})}};function Wr(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function ss(e,r){let t=Wr(()=>ec(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function ec(e){return{datamodel:{models:di(e.models),enums:di(e.enums),types:di(e.types)}}}function di(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var Qt=Symbol(),fi=new WeakMap,Ne=class{constructor(r){r===Qt?fi.set(this,`Prisma.${this._getName()}`):fi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return fi.get(this)}},Kr=class extends Ne{_getNamespace(){return"NullTypes"}},zr=class extends Kr{};gi(zr,"DbNull");var Yr=class extends Kr{};gi(Yr,"JsonNull");var Zr=class extends Kr{};gi(Zr,"AnyNull");var Gt={classes:{DbNull:zr,JsonNull:Yr,AnyNull:Zr},instances:{DbNull:new zr(Qt),JsonNull:new Yr(Qt),AnyNull:new Zr(Qt)}};function gi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}function Xr(e){return{ok:!1,error:e,map(){return Xr(e)},flatMap(){return Xr(e)}}}var hi=class{constructor(){this.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}},yi=e=>{let r=new hi,t=nr(r,e.startTransaction.bind(e)),n={errorRegistry:r,queryRaw:nr(r,e.queryRaw.bind(e)),executeRaw:nr(r,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await t(...i)).map(s=>rc(r,s))};return e.getConnectionInfo&&(n.getConnectionInfo=tc(r,e.getConnectionInfo.bind(e))),n},rc=(e,r)=>({provider:r.provider,options:r.options,queryRaw:nr(e,r.queryRaw.bind(r)),executeRaw:nr(e,r.executeRaw.bind(r)),commit:nr(e,r.commit.bind(r)),rollback:nr(e,r.rollback.bind(r))});function nr(e,r){return async(...t)=>{try{return await r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}function tc(e,r){return(...t)=>{try{return r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}var Il=_(Xn());var _l=require("async_hooks"),kl=require("events"),Dl=_(require("fs")),Tt=_(require("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 Jt={enumerable:!0,configurable:!0,writable:!0};function Ht(e){let r=new Set(e);return{getOwnPropertyDescriptor:()=>Jt,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var us=Symbol.for("nodejs.util.inspect.custom");function Pe(e,r){let t=nc(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=cs(Reflect.ownKeys(o),t),a=cs(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?{...Jt,...l?.getPropertyDescriptor(s)}:Jt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[us]=function(){let o={...this};return delete o[us],o},i}function nc(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 cs(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function rt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Er(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}var br=class{constructor(r=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=r}write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t){let n=t.length-1;for(let i=0;i0&&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}};function ps(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function wr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Wt(e){return e.toString()!=="Invalid Date"}var xr=9e15,Je=1e9,wi="0123456789abcdef",zt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Yt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xr,maxE:xr,crypto:!1},gs,Oe,x=!0,Xt="[DecimalError] ",Ge=Xt+"Invalid argument: ",hs=Xt+"Precision limit exceeded",ys=Xt+"crypto unavailable",Es="[object Decimal]",re=Math.floor,Q=Math.pow,ic=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,oc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,sc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,bs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,b=7,ac=9007199254740991,lc=zt.length-1,Pi=Yt.length-1,d={toStringTag:Es};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};d.ceil=function(){return y(new this.constructor(this),this.e+1,2)};d.clampedTo=d.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(Ge+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};d.comparedTo=d.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};d.cosine=d.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())+b,n.rounding=1,t=uc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Oe==2||Oe==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};d.cubeRoot=d.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(x=!1,o=c.s*Q(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=z(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=Q(t,1/3),e=re((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=O(u.plus(c).times(a),u.plus(l),s+2,1),z(a.d).slice(0,s)===(t=z(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 x=!0,y(n,e,p.rounding,r)};d.decimalPlaces=d.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-re(this.e/b))*b,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};d.dividedBy=d.div=function(e){return O(this,new this.constructor(e))};d.dividedToIntegerBy=d.divToInt=function(e){var r=this,t=r.constructor;return y(O(r,new t(e),0,1,1),t.precision,t.rounding)};d.equals=d.eq=function(e){return this.cmp(e)===0};d.floor=function(){return y(new this.constructor(this),this.e+1,3)};d.greaterThan=d.gt=function(e){return this.cmp(e)>0};d.greaterThanOrEqualTo=d.gte=function(e){var r=this.cmp(e);return r==1||r===0};d.hyperbolicCosine=d.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/rn(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)};d.hyperbolicSine=d.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/rn(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)};d.hyperbolicTangent=d.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,O(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};d.inverseCosine=d.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),i=t.precision,o=t.rounding;return n!==-1?n===0?r.isNeg()?ge(t,i,o):new t(0):new t(NaN):r.isZero()?ge(t,i+4,o).times(.5):(t.precision=i+6,t.rounding=1,r=r.asin(),e=ge(t,i+4,o).times(.5),t.precision=i,t.rounding=o,e.minus(r))};d.inverseHyperbolicCosine=d.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,x=!1,t=t.times(t).minus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};d.inverseHyperbolicSine=d.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,x=!1,t=t.times(t).plus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln())};d.inverseHyperbolicTangent=d.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=O(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)};d.inverseSine=d.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=ge(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)))};d.inverseTangent=d.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,m=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Pi)return s=ge(c,p+4,m).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Pi)return s=ge(c,p+4,m).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/b+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,r=Math.ceil(a/b),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};d.isNaN=function(){return!this.s};d.isNegative=d.isNeg=function(){return this.s<0};d.isPositive=d.isPos=function(){return this.s>0};d.isZero=function(){return!!this.d&&this.d[0]===0};d.lessThan=d.lt=function(e){return this.cmp(e)<0};d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1};d.logarithm=d.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,m=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(x=!1,a=p+f,s=Qe(u,a),n=r?Zt(c,a+10):Qe(e,a),l=O(s,n,a,1),tt(l.d,i=p,m))do if(a+=10,s=Qe(u,a),n=r?Zt(c,a+10):Qe(e,a),l=O(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(tt(l.d,i+=10,m));return x=!0,y(l,p,m)};d.minus=d.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,m,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(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,m=e.d,a=g.precision,l=g.rounding,!u[0]||!m[0]){if(m[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(t=re(e.e/b),c=re(f.e/b),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=m.length):(r=m,t=c,s=u.length),n=Math.max(Math.ceil(a/b),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=m.length,p=n0;--n)u[s++]=0;for(n=m.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)/he|0,u[i]%=he;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=en(u,n),x?y(e,a,l):e};d.precision=d.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ge+e);return t.d?(r=ws(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};d.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};d.sine=d.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())+b,n.rounding=1,t=pc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Oe>2?t.neg():t,e,r,!0)):new n(NaN)};d.squareRoot=d.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(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=z(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=re((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(O(s,o,t+2,1)).times(.5),z(o.d).slice(0,t)===(r=z(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 x=!0,y(n,l,c.rounding,e)};d.tangent=d.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=O(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Oe==2||Oe==4?t.neg():t,e,r,!0)):new n(NaN)};d.times=d.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,m=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!m||!m[0]||!f||!f[0])return new p(!e.s||m&&!m[0]&&!f||f&&!f[0]&&!m?NaN:!m||!f?e.s/0:e.s*0);for(t=re(c.e/b)+re(e.e/b),l=m.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*m[i-n-1]+r,o[i--]=a%he|0,r=a/he|0;o[i]=(o[i]+r)%he|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=en(o,t),x?y(e,p.precision,p.rounding):e};d.toBinary=function(e,r){return Ci(this,2,e,r)};d.toDecimalPlaces=d.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(se(e,0,Je),r===void 0?r=n.rounding:se(r,0,8),y(t,e+t.e+1,r))};d.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,!0):(se(e,0,Je),r===void 0?r=i.rounding:se(r,0,8),n=y(new i(n),e+1,r),t=ve(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};d.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=ve(i):(se(e,0,Je),r===void 0?r=o.rounding:se(r,0,8),n=y(new o(i),e+i.e+1,r),t=ve(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};d.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,m,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=t=new h(1),n=l=new h(0),r=new h(n),o=r.e=ws(g)-f.e-1,s=o%b,r.d[0]=Q(10,s<0?b+s:s),e==null)e=o>0?r:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Ge+a);e=a.gt(r)?o>0?r:u:a}for(x=!1,a=new h(z(g)),c=h.precision,h.precision=o=g.length*b*2;p=O(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=O(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,m=O(u,n,o,1).minus(f).abs().cmp(O(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],h.precision=c,x=!0,m};d.toHexadecimal=d.toHex=function(e,r){return Ci(this,16,e,r)};d.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:se(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]?(x=!1,t=O(t,e,0,r,1).times(e),x=!0,y(t)):(e.s=t.s,t=e),t};d.toNumber=function(){return+this};d.toOctal=function(e,r){return Ci(this,8,e,r)};d.toPower=d.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(Q(+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=re(e.e/b),r>=e.d.length-1&&(t=u<0?-u:u)<=ac)return i=xs(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):(x=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=vi(e.times(Qe(a,n+t)),n),i.d&&(i=y(i,n+5,1),tt(i.d,n,o)&&(r=n+10,i=y(vi(e.times(Qe(a,r+t)),r),r+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};d.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(se(e,1,Je),r===void 0?r=i.rounding:se(r,0,8),n=y(new i(n),e,r),t=ve(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};d.toSignificantDigits=d.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(se(e,1,Je),r===void 0?r=n.rounding:se(r,0,8)),y(new n(t),e,r)};d.toString=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};d.truncated=d.trunc=function(){return y(new this.constructor(this),this.e+1,1)};d.valueOf=d.toJSON=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function z(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(Ge+e)}function tt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=b,i=0):(i=Math.ceil((r+1)/b),r%=b),o=Q(10,b-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)==Q(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)==Q(10,r-3)-1,s}function Kt(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 uc(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/rn(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 O=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,m,f,g,h,A,T,C,E,I,me,le,Nr,U,ie,Ae,Y,pr,Ct=n.constructor,_n=n.s==i.s?1:-1,Z=n.d,L=i.d;if(!Z||!Z[0]||!L||!L[0])return new Ct(!n.s||!i.s||(Z?L&&Z[0]==L[0]:!L)?NaN:Z&&Z[0]==0||!L?_n*0:_n/0);for(l?(f=1,c=n.e-i.e):(l=he,f=b,c=re(n.e/f)-re(i.e/f)),Y=L.length,ie=Z.length,T=new Ct(_n),C=T.d=[],p=0;L[p]==(Z[p]||0);p++);if(L[p]>(Z[p]||0)&&c--,o==null?(le=o=Ct.precision,s=Ct.rounding):a?le=o+(n.e-i.e)+1:le=o,le<0)C.push(1),g=!0;else{if(le=le/f+2|0,p=0,Y==1){for(m=0,L=L[0],le++;(p1&&(L=e(L,m,l),Z=e(Z,m,l),Y=L.length,ie=Z.length),U=Y,E=Z.slice(0,Y),I=E.length;I=l/2&&++Ae;do m=0,u=r(L,E,Y,I),u<0?(me=E[0],Y!=I&&(me=me*l+(E[1]||0)),m=me/Ae|0,m>1?(m>=l&&(m=l-1),h=e(L,m,l),A=h.length,I=E.length,u=r(h,E,A,I),u==1&&(m--,t(h,Y=10;m/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,g)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,m,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+=b,s=r,c=p[m=0],l=c/Q(10,i-s-1)%10|0;else if(m=Math.ceil((o+1)/b),a=p.length,m>=a)if(n){for(;a++<=m;)p.push(0);c=l=0,i=1,o%=b,s=o-b+1}else break e;else{for(c=a=p[m],i=1;a>=10;a/=10)i++;o%=b,s=o-b+i,l=s<0?0:c/Q(10,i-s-1)%10|0}if(n=n||r<0||p[m+1]!==void 0||(s<0?c:c%Q(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/Q(10,i-s):0:p[m-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=Q(10,(b-r%b)%b),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=m,a=1,m--):(p.length=m+1,a=Q(10,b-o),p[m]=s>0?(c/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(m==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]==he&&(p[0]=1));break}else{if(p[m]+=a,p[m]!=he)break;p[m--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return x&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ue(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ue(-i-1)+o,t&&(n=t-s)>0&&(o+=Ue(n))):i>=s?(o+=Ue(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Ue(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ue(n))),o}function en(e,r){var t=e[0];for(r*=b;t>=10;t/=10)r++;return r}function Zt(e,r,t){if(r>lc)throw x=!0,t&&(e.precision=t),Error(hs);return y(new e(zt),r,1,!0)}function ge(e,r,t){if(r>Pi)throw Error(hs);return y(new e(Yt),r,t,!0)}function ws(e){var r=e.length-1,t=r*b+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 Ue(e){for(var r="";e--;)r+="0";return r}function xs(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/b+4);for(x=!1;;){if(t%2&&(o=o.times(r),ds(o.d,s)&&(i=!0)),t=re(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),ds(r.d,s)}return x=!0,o}function ms(e){return e.d[e.d.length-1]&1}function Ps(e,r,t){for(var n,i=new e(r[0]),o=0;++o17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(x=!1,l=g):l=r,a=new m(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(Q(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new m(1),m.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(O(o,t,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&&tt(s.d,l-n,f,u))m.precision=l+=10,t=o=a=new m(1),c=0,u++;else return y(s,m.precision=g,f,x=!0);else return m.precision=g,s}s=a}}function Qe(e,r){var t,n,i,o,s,a,l,u,c,p,m,f=1,g=10,h=e,A=h.d,T=h.constructor,C=T.rounding,E=T.precision;if(h.s<0||!A||!A[0]||!h.e&&A[0]==1&&A.length==1)return new T(A&&!A[0]?-1/0:h.s!=1?NaN:A?0:h);if(r==null?(x=!1,c=E):c=r,T.precision=c+=g,t=z(A),n=t.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)h=h.times(e),t=z(h.d),n=t.charAt(0),f++;o=h.e,n>1?(h=new T("0."+t),o++):h=new T(n+"."+t.slice(1))}else return u=Zt(T,c+2,E).times(o+""),h=Qe(new T(n+"."+t.slice(1)),c-g).plus(u),T.precision=E,r==null?y(h,E,C,x=!0):h;for(p=h,l=s=h=O(h.minus(1),h.plus(1),c,1),m=y(h.times(h),c,1),i=3;;){if(s=y(s.times(m),c,1),u=l.plus(O(s,new T(i),c,1)),z(u.d).slice(0,c)===z(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(Zt(T,c+2,E).times(o+""))),l=O(l,new T(f),c,1),r==null)if(tt(l.d,c-g,C,a))T.precision=c+=g,u=s=h=O(p.minus(1),p.plus(1),c,1),m=y(h.times(h),c,1),i=a=1;else return y(l,T.precision=E,C,x=!0);else return T.precision=E,l;l=u,i+=2}}function vs(e){return String(e.s*e.s/0)}function Ti(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)%b,t<0&&(n+=b),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),bs.test(r))return Ti(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(oc.test(r))t=16,r=r.toLowerCase();else if(ic.test(r))t=2;else if(sc.test(r))t=8;else throw Error(Ge+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=xs(n,new n(t),o,o*2)),u=Kt(r,t,he),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,x=!1,s&&(e=O(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):or.pow(2,l))),x=!0,e)}function pc(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/rn(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/b);for(x=!1,l=t.times(t),a=new e(n);;){if(s=O(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=O(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 x=!0,s.d.length=p+1,s}function rn(e,r){for(var t=e;--r;)t*=e;return t}function Ts(e,r){var t,n=r.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Oe=n?4:1,r;if(t=r.divToInt(i),t.isZero())Oe=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Oe=ms(t)?n?2:3:n?4:1,r;Oe=ms(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ci(e,r,t,n){var i,o,s,a,l,u,c,p,m,f=e.constructor,g=t!==void 0;if(g?(se(t,1,Je),n===void 0?n=f.rounding:se(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=vs(e);else{for(c=ve(e),s=c.indexOf("."),g?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),m=new f(1),m.e=c.length-s,m.d=Kt(ve(m),10,i),m.e=m.d.length),p=Kt(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=O(e,m,t,n,0,i),p=e.d,o=e.e,u=gs),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=Kt(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 mc(e){return new this(e).abs()}function dc(e){return new this(e).acos()}function fc(e){return new this(e).acosh()}function gc(e,r){return new this(e).plus(r)}function hc(e){return new this(e).asin()}function yc(e){return new this(e).asinh()}function Ec(e){return new this(e).atan()}function bc(e){return new this(e).atanh()}function wc(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=ge(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?ge(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=ge(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(O(e,r,o,1)),r=ge(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(O(e,r,o,1)),t}function xc(e){return new this(e).cbrt()}function Pc(e){return y(e=new this(e),e.e+1,2)}function vc(e,r,t){return new this(e).clamp(r,t)}function Tc(e){if(!e||typeof e!="object")throw Error(Xt+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Je,"rounding",0,8,"toExpNeg",-xr,0,"toExpPos",0,xr,"maxE",0,xr,"minE",-xr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(Ge+t+": "+n);if(t="crypto",i&&(this[t]=xi[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(ys);else this[t]=!1;else throw Error(Ge+t+": "+n);return this}function Cc(e){return new this(e).cos()}function Rc(e){return new this(e).cosh()}function Cs(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,fs(o)){u.s=o.s,x?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;x?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(ys);else for(;o=10;i/=10)n++;n`}};function Tr(e){return e instanceof nt}var tn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var nn=e=>e,on={bold:nn,red:nn,green:nn,dim:nn,enabled:!1},Rs={bold:W,red:ce,green:$e,dim:Ie,enabled:!0},Cr={write(e){e.writeLine(",")}};var Ce=class{constructor(r){this.contents=r;this.isUnderlined=!1;this.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 He=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Rr=class extends He{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new tn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let n=new Ce("[]");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithItems(t){let{colors:n}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Cr,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};var Ss=": ",sn=class{constructor(r,t){this.name=r;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ss.length}write(r){let t=new Ce(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(Ss).write(this.value)}};var J=class e extends He{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[n,...i]=t,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof Rr&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}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 n=this;for(let i of t){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(t){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of t){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let t=this.getField("select");if(t?.value instanceof e)return{kind:"select",value:t.value};let n=this.getField("include");if(n?.value instanceof e)return{kind:"include",value:n.value}}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(i=>i.getPrintWidth()))+2}write(t){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,n)}writeEmpty(t){let n=new Ce("{}");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithContents(t,n){t.writeLine("{").withIndent(()=>{t.writeJoined(Cr,[...n,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var H=class extends He{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Ce(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}};var Ri=class{constructor(r){this.errorMessages=[];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 an(e){return new Ri(As(e))}function As(e){let r=new J;for(let[t,n]of Object.entries(e)){let i=new sn(t,Is(n));r.addField(i)}return r}function Is(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(vr(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=Wt(e)?e.toISOString():"Invalid Date";return new H(`new Date("${r}")`)}return e instanceof Ne?new H(`Prisma.${e._getName()}`):Tr(e)?new H(`prisma.${ps(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Zc(e):typeof e=="object"?As(e):new H(Object.prototype.toString.call(e))}function Zc(e){let r=new Rr;for(let t of e)r.addItem(Is(t));return r}function _s(e){if(e===void 0)return"";let r=an(e);return new br(0,{colors:on}).write(r).toString()}var Xc="P2037";function sr({error:e,user_facing_error:r},t,n){return r.error_code?new V(ep(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 ep(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===Xc&&(t+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var it="";function ks(e){var r=e.split(` +`);return r.reduce(function(t,n){var i=np(n)||op(n)||lp(n)||mp(n)||cp(n);return i&&t.push(i),t},[])}var rp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tp=/\((\S*)(?::(\d+))(?::(\d+))\)/;function np(e){var r=rp.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=tp.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]||it,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var ip=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function op(e){var r=ip.exec(e);return r?{file:r[2],methodName:r[1]||it,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var sp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,ap=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function lp(e){var r=sp.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=ap.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||it,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var up=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function cp(e){var r=up.exec(e);return r?{file:r[3],methodName:r[1]||it,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var pp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function mp(e){var r=pp.exec(e);return r?{file:r[2],methodName:r[1]||it,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Si=class{getLocation(){return null}},Ai=class{constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=ks(r).find(i=>{if(!i.file)return!1;let o=ii(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 We(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Si:new Ai}var Ds={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Sr(e={}){let r=fp(e);return Object.entries(r).reduce((n,[i,o])=>(Ds[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function fp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function ln(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Ls(e,r){let t=ln(e);return r({action:"aggregate",unpacker:t,argsMapper:Sr})(e)}function gp(e={}){let{select:r,...t}=e;return typeof r=="object"?Sr({...t,_count:r}):Sr({...t,_count:{_all:!0}})}function hp(e={}){return typeof e.select=="object"?r=>ln(e)(r)._count:r=>ln(e)(r)._count._all}function Ns(e,r){return r({action:"count",unpacker:hp(e),argsMapper:gp})(e)}function yp(e={}){let r=Sr(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 Ep(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Os(e,r){return r({action:"groupBy",unpacker:Ep(e),argsMapper:yp})(e)}function Fs(e,r,t){if(r==="aggregate")return n=>Ls(n,t);if(r==="count")return n=>Ns(n,t);if(r==="groupBy")return n=>Os(n,t)}function Ms(e,r){let t=r.fields.filter(i=>!i.relationName),n=pi(t,i=>i.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")},...Ht(Object.keys(n))})}var $s=e=>Array.isArray(e)?e:e.split("."),Ii=(e,r)=>$s(r).reduce((t,n)=>t&&t[n],e),qs=(e,r,t)=>$s(r).reduceRight((n,i,o,s)=>Object.assign({},Ii(e,s.slice(0,o)),{[i]:n}),t);function bp(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function wp(e,r,t){return r===void 0?e??{}:qs(r,t,e||!0)}function _i(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=We(e._errorFormat),c=bp(n,i),p=wp(l,o,c),m=t({dataPath:c,callsite:u})(p),f=xp(e,r);return new Proxy(m,{get(g,h){if(!f.includes(h))return g[h];let T=[a[h].type,t,h],C=[c,p];return _i(e,...T,...C)},...Ht([...f,...Object.getOwnPropertyNames(m)])})}}function xp(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Gs=_(oi());var Qs=_(require("fs"));var Bs={keyword:_e,entity:_e,value:e=>W(Ze(e)),punctuation:Ze,directive:_e,function:_e,variable:e=>W(Ze(e)),string:e=>W($e(e)),boolean:de,number:_e,comment:Fr};var Pp=e=>e,un={},vp=0,P={manual:un.Prism&&un.Prism.manual,disableWorkerMessageHandler:un.Prism&&un.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let r=e;return new ye(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 ye)continue;if(me&&U!=r.length-1){C.lastIndex=ie;var p=C.exec(e);if(!p)break;var c=p.index+(I?p[1].length:0),m=p.index+p[0].length,a=U,l=ie;for(let L=r.length;a=l&&(++U,ie=l);if(r[U]instanceof ye)continue;u=a-U,Ae=e.slice(ie,l),p.index-=ie}else{C.lastIndex=0;var p=C.exec(Ae),u=1}if(!p){if(o)break;continue}I&&(le=p[1]?p[1].length:0);var c=p.index+le,p=p[0].slice(le),m=c+p.length,f=Ae.slice(0,c),g=Ae.slice(m);let Y=[U,u];f&&(++U,ie+=f.length,Y.push(f));let pr=new ye(h,E?P.tokenize(p,E):p,Nr,p,me);if(Y.push(pr),g&&Y.push(g),Array.prototype.splice.apply(r,Y),u!=1&&P.matchGrammar(e,r,t,U,ie,!0,h),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:ye};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 ye(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ye.stringify(t,r)}).join(""):Tp(e.type)(e.content)};function Tp(e){return Bs[e]||Pp}function Vs(e){return Cp(e,P.languages.javascript)}function Cp(e,r){return P.tokenize(e,r).map(n=>ye.stringify(n)).join("")}var js=_(Ko());function Us(e){return(0,js.default)(e)}var cn=class e{static read(r){let t;try{t=Qs.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,Us(n).split(` +`))}highlight(){let r=Vs(this.toString());return new e(this.firstLineNumber,r.split(` +`))}toString(){return this.lines.join(` +`)}};var Rp={red:ce,gray:Fr,dim:Ie,bold:W,underline:ee,highlightSource:e=>e.highlight()},Sp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ap({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function Ip({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Ap({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=cn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=kp(c),m=_p(c);if(!m)return s;s.functionName=`${m.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,m.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Gs.default)(i,g).slice(g)}}return s}function _p(e){let r=Object.keys(De.ModelAction).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 kp(e){let r=0;for(let t=0;t{if("rejectOnNotFound"in n.args){let o=Ar({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new K(o,{clientVersion:r})}return await t(n).catch(o=>{throw o instanceof V&&o.code==="P2025"?new Le(`No ${e} found`,r):o})}}function Re(e){return e.replace(/^./,r=>r.toLowerCase())}var Op=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fp=["aggregate","count","groupBy"];function ki(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[Mp(e,r),qp(e,r),et(t),ne("name",()=>r),ne("$name",()=>r),ne("$parent",()=>e._appliedParent)];return Pe({},n)}function Mp(e,r){let t=Re(r),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Js(o,r,e._clientVersion,s);let a=l=>u=>{let c=We(e._errorFormat);return e._createPrismaPromise(p=>{let m={args:u,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:p,callsite:c};return s({...m,...l})})};return Op.includes(o)?_i(e,r,a):$p(i)?Fs(e,i,a):a({})}}}function $p(e){return Fp.includes(e)}function qp(e,r){return ir(ne("fields",()=>{let t=e._runtimeDataModel.models[r];return Ms(r,t)}))}function Hs(e){return e.replace(/^./,r=>r.toUpperCase())}var Di=Symbol();function ot(e){let r=[Bp(e),ne(Di,()=>e),ne("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(et(t)),Pe(e,r)}function Bp(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Re),n=[...new Set(r.concat(t))];return ir({getKeys(){return n},getPropertyValue(i){let o=Hs(i);if(e._runtimeDataModel.models[o]!==void 0)return ki(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ki(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ws(e){return e[Di]?e[Di]:e}function Ks(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 ot(r)}function zs({result:e,modelName:r,select:t,extensions:n}){let i=n.getAllComputedFields(r);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(t){if(!t[a.name])continue;let l=a.needs.filter(u=>!t[u]);l.length>0&&s.push(rt(l))}Vp(e,a.needs)&&o.push(jp(a,Pe(e,o)))}return o.length>0||s.length>0?Pe(e,[...o,...s]):e}function Vp(e,r){return r.every(t=>ci(e,t))}function jp(e,r){return ir(ne(e.name,()=>e.compute(r)))}function pn({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]=pn({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Zs({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:pn({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(s,a,l)=>zs({result:s,modelName:Re(a),select:l.select,extensions:n})})}function Xs(e){if(e instanceof oe)return Up(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:Xs(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=oa(o,l),a.args=s,ra(e,a,t,n+1)}})})}function ta(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 ra(e,r,s)}function na(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?ia(t,n,0,e):e(t)}}function ia(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=oa(i,l),ia(a,r,t+1,n)}})}var ea=e=>e;function oa(e=ea,r=ea){return t=>e(r(t))}function aa(e,r,t){let n=Re(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Qp({...e,...sa(r.name,e,r.result.$allModels),...sa(r.name,e,r.result[n])})}function Qp(e){let r=new xe,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 hr(e,n=>({...n,needs:t(n.name,new Set)}))}function sa(e,r,t){return t?hr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Gp(r,o,i)})):{}}function Gp(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function la(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}var mn=class{constructor(r,t){this.extension=r;this.previous=t;this.computedFieldsCache=new xe;this.modelExtensionsCache=new xe;this.queryCallbacksCache=new xe;this.clientExtensions=Wr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Wr(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r})}getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>aa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Re(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()}},dn=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new mn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new mn(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 ua=N("prisma:client"),ca={Vercel:"vercel","Netlify CI":"netlify"};function pa({postinstall:e,ciName:r,clientVersion:t}){if(ua("checkPlatformCaching:postinstall",e),ua("checkPlatformCaching:ciName",r),e===!0&&r&&r in ca){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/${ca[r]}-build`;throw console.error(n),new R(n,t)}}function ma(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Jp="Cloudflare-Workers",Hp="node";function da(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Jp?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hp?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Wp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function fn(){let e=da();return{id:e,prettyName:Wp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var Ea=_(require("fs")),at=_(require("path"));function gn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: + +${Kp(e)}`}function Kp(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ai({...r,binaryTargets:o})}function Ke(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function ze(e){let{searchedLocations:r}=e;return`The following locations have been searched: +${[...new Set(r)].map(i=>` ${i}`).join(` +`)}`}function fa(e){let{runtimeBinaryTarget:r}=e;return`${Ke(e)} + +This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". +${gn(e)} + +${ze(e)}`}function hn(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 yn(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 ga(e){let{queryEngineName:r}=e;return`${Ke(e)}${yn(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}". + +${hn("engine-not-found-bundler-investigation")} + +${ze(e)}`}function ha(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${Ke(e)} + +This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". +${gn(e)} + +${ze(e)}`}function ya(e){let{queryEngineName:r}=e;return`${Ke(e)}${yn(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}". + +${hn("engine-not-found-tooling-investigation")} + +${ze(e)}`}var zp=N("prisma:client:engines:resolveEnginePath"),Yp=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function ba(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 Zp(e,r);if(zp("enginePath",n),n!==void 0&&e==="binary"&&ti(n),n!==void 0)return r.prismaPath=n;let o=await rr(),s=r.generator?.binaryTargets??[],a=s.some(m=>m.native),l=!s.some(m=>m.value===o),u=__filename.match(Yp())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:wa(e,o),expectedLocation:at.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=ha(c):l?p=fa(c):u?p=ga(c):p=ya(c),new R(p,r.clientVersion)}async function Zp(engineType,config){let binaryTarget=await rr(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,at.default.resolve(dirname,".."),config.generator?.output?.value??dirname,at.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(zo());for(let e of searchLocations){let r=wa(engineType,binaryTarget),t=at.default.join(e,r);if(searchedLocations.push(e),Ea.default.existsSync(t))return{enginePath:t,searchedLocations}}return{enginePath:void 0,searchedLocations}}function wa(e,r){return e==="library"?It(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var Li=_(ui());function xa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function Pa(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 va=_(is());function Ta({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,va.default)({user:r,repo:t,template:n,title:e,body:i})}function Ca({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=go(6e3-(s?.length??0)),l=Pa((0,Li.default)(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",c=(0,Li.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${r?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?xa(s):""} +\`\`\` +`),p=Ta({title:t,body:c});return`${t} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${ee(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. +`}function Ir({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 R(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new R("error: Missing URL environment variable, value, or override.",n);return i}var En=class extends Error{constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends En{constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function S(e,r){return{...e,isRetryable:r}}var _r=class extends ae{constructor(t){super("This request must be retried",S(t,!0));this.name="ForcedRetryError";this.code="P5001"}};w(_r,"ForcedRetryError");var ar=class extends ae{constructor(t,n){super(t,S(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(ar,"InvalidDatasourceError");var lr=class extends ae{constructor(t,n){super(t,S(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(lr,"NotImplementedYetError");var $=class extends ae{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 ur=class extends ${constructor(t){super("Schema needs to be uploaded",S(t,!0));this.name="SchemaMissingError";this.code="P5005"}};w(ur,"SchemaMissingError");var Ni="This request could not be understood by the server",lt=class extends ${constructor(t,n,i){super(n||Ni,S(t,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(lt,"BadRequestError");var ut=class extends ${constructor(t,n){super("Engine not started: healthcheck timeout",S(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(ut,"HealthcheckTimeoutError");var ct=class extends ${constructor(t,n,i){super(n,S(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(ct,"EngineStartupError");var pt=class extends ${constructor(t){super("Engine version is not supported",S(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(pt,"EngineVersionNotSupportedError");var Oi="Request timed out",mt=class extends ${constructor(t,n=Oi){super(n,S(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(mt,"GatewayTimeoutError");var Xp="Interactive transaction error",dt=class extends ${constructor(t,n=Xp){super(n,S(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(dt,"InteractiveTransactionError");var em="Request parameters are invalid",ft=class extends ${constructor(t,n=em){super(n,S(t,!1));this.name="InvalidRequestError";this.code="P5011"}};w(ft,"InvalidRequestError");var Fi="Requested resource does not exist",gt=class extends ${constructor(t,n=Fi){super(n,S(t,!1));this.name="NotFoundError";this.code="P5003"}};w(gt,"NotFoundError");var Mi="Unknown server error",kr=class extends ${constructor(t,n,i){super(n||Mi,S(t,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(kr,"ServerError");var $i="Unauthorized, check your connection string",ht=class extends ${constructor(t,n=$i){super(n,S(t,!1));this.name="UnauthorizedError";this.code="P5007"}};w(ht,"UnauthorizedError");var qi="Usage exceeded, retry again later",yt=class extends ${constructor(t,n=qi){super(n,S(t,!0));this.name="UsageExceededError";this.code="P5008"}};w(yt,"UsageExceededError");async function rm(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 Et(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await rm(e);if(n.type==="QueryEngineError")throw new V(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new kr(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new ur(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new pt(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 R(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new ut(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 ft(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new ht(t,Dr($i,n));if(e.status===404)return new gt(t,Dr(Fi,n));if(e.status===429)throw new yt(t,Dr(qi,n));if(e.status===504)throw new mt(t,Dr(Oi,n));if(e.status>=500)throw new kr(t,Dr(Mi,n));if(e.status>=400)throw new lt(t,Dr(Ni,n))}function Dr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Ra(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 Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Sa(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+=Fe[s]+Fe[a]+Fe[l]+Fe[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=Fe[s]+Fe[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=Fe[s]+Fe[a]+Fe[l]+"="),t}function Aa(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new R("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)}function tm(e){return e[0]*1e3+e[1]/1e6}function Ia(e){return new Date(tm(e))}var _a={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var bt=class extends ae{constructor(t,n){super(`Cannot fetch data from service: +${t}`,S(n,!0));this.name="RequestError";this.code="P5010"}};w(bt,"RequestError");async function cr(e,r,t=n=>n){let n=r.clientVersion;try{return typeof fetch=="function"?await t(fetch)(e,r):await t(Bi)(e,r)}catch(i){let o=i.message??"Unknown error";throw new bt(o,{clientVersion:n})}}function im(e){return{...e.headers,"Content-Type":"application/json"}}function om(e){return{method:e.method,headers:im(e)}}function sm(e,r){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:r.statusCode>=200&&r.statusCode<=299,status:r.statusCode,url:r.url,headers:new Vi(r.headers)}}async function Bi(e,r={}){let t=am("https"),n=om(r),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=t.request(e,n,u=>{let{statusCode:c,headers:{location:p}}=u;c>=301&&c<=399&&p&&(p.startsWith("http")===!1?s(Bi(`${o}${p}`,r)):s(Bi(p,r))),u.on("data",m=>i.push(m)),u.on("end",()=>s(sm(i,u))),u.on("error",a)});l.on("error",a),l.end(r.body??"")})}var am=typeof require<"u"?require:()=>{},Vi=class{constructor(r={}){this.headers=new Map;for(let[t,n]of Object.entries(r))if(typeof n=="string")this.headers.set(t,n);else if(Array.isArray(n))for(let i of n)this.headers.set(t,i)}append(r,t){this.headers.set(r,t)}delete(r){this.headers.delete(r)}get(r){return this.headers.get(r)??null}has(r){return this.headers.has(r)}set(r,t){this.headers.set(r,t)}forEach(r,t){for(let[n,i]of this.headers)r.call(t,i,n,this)}};var lm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ka=N("prisma:client:dataproxyEngine");async function um(e,r){let t=_a["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.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&&lm.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=cm(`<=${a}.${l}.${u}`),p=await cr(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 m=await p.text();ka("length of body fetched from unpkg.com",m.length);let f;try{f=JSON.parse(m)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",m),g}return f.version}throw new lr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Da(e,r){let t=await um(e,r);return ka("version",t),t}function cm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var La=3,ji=N("prisma:client:dataproxyEngine"),Ui=class{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,interactiveTransaction:t}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-transaction-id"]=t.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}},wt=class{constructor(r){this.name="DataProxyEngine";Aa(r),this.config=r,this.env={...r.env,...typeof process<"u"?process.env:{}},this.inlineSchema=Sa(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[r,t]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new Ui({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Da(r,this.config),ji("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:Ia(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),r?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await cr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||ji("schema response status",t.status);let n=await Et(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=Er(r,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t});return a.map(u=>"errors"in u&&u.errors.length>0?sr(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed: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 cr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||ji("graphql response status",a.status),await this.handleError(await Et(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?sr(l.errors[0],this.config.clientVersion,this.config.activeProvider):new j(l.errors,{clientVersion:this.config.clientVersion});return 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 cr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Et(l,this.clientVersion));let u=await l.json(),c=u.extensions;c&&this.propagateResponseExtensions(c);let p=u.id,m=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:m}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await cr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Et(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],n=Ir({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new ar(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new ar(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r);let l=a.get("api_key");if(l===null||l.length<1)throw new ar(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);return[s,l]}metrics(){throw new lr("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 ae)||!i.isRetryable)throw i;if(t>=La)throw i instanceof _r?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${La} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ra(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof ur)throw await this.uploadSchema(),new _r({clientVersion:this.clientVersion,cause:r});if(r)throw r}};function Na(e){if(e?.kind==="itx")return e.options.id}var Gi=_(require("os")),Oa=_(require("path"));var Qi=Symbol("PrismaLibraryEngineCache");function pm(){let e=globalThis;return e[Qi]===void 0&&(e[Qi]={}),e[Qi]}function mm(e){let r=pm();if(r[e]!==void 0)return r[e];let t=Oa.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Gi.default.constants.dlopen.RTLD_LAZY|Gi.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Fa={async loadLibrary(e){let r=await jn(),t=await ba("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>mm(t))}catch(n){let i=ni({e:n,platformInfo:r,id:t});throw new R(i,e.clientVersion)}}};var Ji,Ma={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new R(`The \`adapter\` option for \`PrismaClient\` is required in this context (${fn().prettyName})`,r);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",r);Ji===void 0&&(Ji=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new R("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);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await Ji;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var dm="P2036",Se=N("prisma:client:libraryEngine");function fm(e){return e.item_type==="query"&&"query"in e}function gm(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var $a=[...Mn,"native"],qa=0,xt=class{constructor(r,t){this.name="LibraryEngine";this.libraryLoader=t??Fa,r.engineWasm!==void 0&&(this.libraryLoader=t??Ma),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,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(),this.checkForTooManyEngines()}checkForTooManyEngines(){qa===10&&console.warn(`${de("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async transaction(r,t,n){await this.start();let i=JSON.stringify(t),o;if(r==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else r==="commit"?o=await this.engine?.commitTransaction(n.id,i):r==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(hm(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new V(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Se("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Fn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await rr();if(!$a.includes(r))throw new R(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${$e($a.join(", "))} or a path to the query engine library. +You may have to run ${$e("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),{adapter:t}=this.config;t&&Se("Using driver adapter: %O",t),this.engine=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"},n=>{r.deref()?.logger(n)},t),qa++}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new R(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);if(t){if("span"in t){this.config.tracingHelper.createEngineSpan(t);return}t.level=t?.level.toLowerCase()??"unknown",fm(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):gm(t)?this.loggerRustPanic=new ue(Hi(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(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Se(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Se("library starting");try{let t={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,Se("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new R(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Se("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(n=>setTimeout(n,5)),Se("library stopping");let t={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Se("library stopped")};return this.libraryStoppingPromise=this.config.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}){Se(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new j(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof R)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(Hi(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}){Se("requestBatch");let i=Er(r,t);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Na(t));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new j(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(r){if(r.user_facing_error.is_panic)return new ue(Hi(this,r.user_facing_error.message),this.config.clientVersion);let t=this.getExternalAdapterError(r.user_facing_error);return t?t.error:sr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r){if(r.error_code===dm&&this.config.adapter){let t=r.meta?.id;Vt(typeof t=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(t);return Vt(n,"External error with reported id was not registered"),n}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function hm(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Hi(e,r){return Ca({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Ba({copyEngine:e=!0},r){let t;try{t=Ir({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}e&&t?.startsWith("prisma://")&&Hr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Ur(r.generator),i=!!(t?.startsWith("prisma://")||!e),o=!!r.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?t?.startsWith("prisma://")?l=["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."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["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."],new K(l.join(` +`),{clientVersion:r.clientVersion})}if(i)return new wt(r);if(s)return new xt(r);throw new K("Invalid client engine type, please use `library` or `binary`",{clientVersion:r.clientVersion})}function bn({generator:e}){return e?.previewFeatures??[]}var Ja=_(Wi());function Qa(e,r){let t=Ga(e),n=ym(t),i=bm(n);i?wn(i,r):r.addErrorMessage(()=>"Unknown error")}function Ga(e){return e.errors.flatMap(r=>r.kind==="Union"?Ga(r):[r])}function ym(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:Em(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Em(e,r){return[...new Set(e.concat(r))]}function bm(e){return mi(e,(r,t)=>{let n=ja(r),i=ja(t);return n!==i?n-i:Ua(r)-Ua(t)})}function ja(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function Ua(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var Me=class{constructor(r,t){this.name=r;this.value=t;this.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)}};var xn=class{constructor(){this.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(Cr,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function wn(e,r){switch(e.kind){case"IncludeAndSelect":wm(e,r);break;case"IncludeOnScalar":xm(e,r);break;case"EmptySelection":Pm(e,r);break;case"UnknownSelectionField":vm(e,r);break;case"UnknownArgument":Tm(e,r);break;case"UnknownInputField":Cm(e,r);break;case"RequiredArgumentMissing":Rm(e,r);break;case"InvalidArgumentType":Sm(e,r);break;case"InvalidArgumentValue":Am(e,r);break;case"ValueTooLarge":Im(e,r);break;case"SomeFieldsMissing":_m(e,r);break;case"TooManyFieldsGiven":km(e,r);break;case"Union":Qa(e,r);break;default:throw new Error("not implemented: "+e.kind)}}function wm(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath);t&&t instanceof J&&(t.getField("include")?.markAsError(),t.getField("select")?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green("`include`")} or ${n.green("`select`")}, but ${n.red("not both")} at the same time.`)}function xm(e,r){let[t,n]=Pn(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 Me(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 Pm(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ka(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 vm(e,r){let[t,n]=Pn(e.selectionPath),i=r.arguments.getDeepSelectionParent(t);i&&(i.value.getField(n)?.markAsError(),Ka(i.value,e.outputType)),r.addErrorMessage(o=>{let s=[`Unknown field ${o.red(`\`${n}\``)}`];return i&&s.push(`for ${o.bold(i.kind)} statement`),s.push(`on model ${o.bold(`\`${e.outputType.name}\``)}.`),s.push(Pt(o)),s.join(" ")})}function Tm(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof J&&(n.getField(t)?.markAsError(),Dm(n,e.arguments)),r.addErrorMessage(i=>Ha(i,t,e.arguments.map(o=>o.name)))}function Cm(e,r){let[t,n]=Pn(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof J){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t);o instanceof J&&za(o,e.inputType)}r.addErrorMessage(o=>Ha(o,n,e.inputType.fields.map(s=>s.name)))}function Ha(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Nm(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(Pt(e)),n.join(" ")}function Rm(e,r){let t;r.addErrorMessage(l=>t?.value instanceof H&&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);if(!(n instanceof J))return;let[i,o]=Pn(e.argumentPath),s=new xn,a=n.getDeepFieldValue(i);if(a instanceof J)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 Me(o,s).makeRequired())}else{let l=e.inputTypes.map(Wa).join(" | ");a.addSuggestion(new Me(o,l).makeRequired())}}function Wa(e){return e.kind==="list"?`${Wa(e.elementType)}[]`:e.name}function Sm(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof J&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=vn("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 Am(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof J&&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=vn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Im(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof J){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(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 _m(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof J){let i=n.getDeepFieldValue(e.argumentPath);i instanceof J&&za(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")} ${vn("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 km(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof J){let o=n.getDeepFieldValue(e.argumentPath);o instanceof J&&(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 ${vn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ka(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new Me(t.name,"true"))}function Dm(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new Me(t.name,t.typeNames.join(" | ")))}function za(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new Me(t.name,t.typeNames.join(" | ")))}function Pn(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 vn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Lm=3;function Nm(e,r){let t=1/0,n;for(let i of r){let o=(0,Ja.default)(e,i);o>Lm||o({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.model?.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)})}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};var el=e=>({command:e});var rl=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function vt(e){try{return tl(e,"fast")}catch{return tl(e,"slow")}}function tl(e,r){return JSON.stringify(e.map(t=>Um(t,r)))}function Um(e,r){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:wr(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Te.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Qm(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&r==="slow"?il(e):e}function Qm(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function il(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(nl);let r={};for(let t of Object.keys(e))r[t]=nl(e[t]);return r}function nl(e){return typeof e=="bigint"?e.toString():il(e)}var Gm=/^(\s*alter\s)/i,ol=N("prisma:client");function Yi(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Gm.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 Zi=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:vt(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:vt(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=rl(t),i={values:vt(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?ol(`prisma.${e}(${n}, ${i.values})`):ol(`prisma.${e}(${n})`),{query:n,parameters:i}},sl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},al={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Xi(e){return function(t){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=ll(t(o))):ll(t(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ll(e){return typeof e.then=="function"?e:Promise.resolve(e)}var ul={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,r){return r()}},eo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}createEngineSpan(r){return this.getGlobalTracingHelper().createEngineSpan(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??ul}};function cl(e){return e.includes("tracing")?new eo:ul}function pl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}var Jm=["$connect","$disconnect","$on","$transaction","$use","$extends"],ml=Jm;function dl(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 Cn=class{constructor(){this._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 gl=_(ui());function Rn(e){return typeof e.batchRequestIdx=="number"}function Sn(e){return e===null?e:Array.isArray(e)?e.map(Sn):typeof e=="object"?Hm(e)?Wm(e):hr(e,Sn):e}function Hm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Wm({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":return Buffer.from(r,"base64");case"DateTime":return new Date(r);case"Decimal":return new Te(r);case"Json":return JSON.parse(r);default:tr(r,"Unknown tagged value")}}function fl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(ro(e.query.arguments)),r.push(ro(e.query.selection)),r.join("")}function ro(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${ro(n)})`:t}).join(" ")})`}var Km={aggregate:!1,aggregateRaw:!1,createMany:!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,updateOne:!0,upsertOne:!0};function to(e){return Km[e]}var An=class{constructor(r){this.options=r;this.tickActive=!1;this.batches={}}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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>to(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Ym(o),containsWrite:u,customDataProxyFetch:i})).map((p,m)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[m],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?hl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:to(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:fl(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})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}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}){if(zm(r),Zm(r,i)||r instanceof Le)throw r;if(r instanceof V&&Xm(r)){let l=yl(r.meta);Tn({args:o,errors:[l],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion})}let a=r.message;if(n&&(a=Ar({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),r.code){let l=s?{modelName:s,...r.meta}:r.meta;throw new V(a,{code:r.code,clientVersion:this.client._clientVersion,meta:l,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new ue(a,this.client._clientVersion);if(r instanceof j)throw new j(a,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof R)throw new R(a,this.client._clientVersion);if(r instanceof ue)throw new ue(a,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,gl.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.values(r)[0],o=t.filter(a=>a!=="select"&&a!=="include"),s=Sn(Ii(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Ym(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:hl(e)};tr(e,"Unknown transaction kind")}}function hl(e){return{id:e.id,payload:e.payload}}function Zm(e,r){return Rn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Xm(e){return e.code==="P2009"||e.code==="P2012"}function yl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(yl)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var El="5.11.0";var bl=El;function wl(e){return e.map(r=>{let t={};for(let n of Object.keys(r))t[n]=xl(r[n]);return t})}function xl({prisma__type:e,prisma__value:r}){switch(e){case"bigint":return BigInt(r);case"bytes":return Buffer.from(r,"base64");case"decimal":return new Te(r);case"datetime":case"date":return new Date(r);case"time":return new Date(`1970-01-01T${r}Z`);case"array":return r.map(xl);default:return r}}var Cl=_(Wi());var q=class extends Error{constructor(r){super(r+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(q,"PrismaClientConstructorValidationError");var Pl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],vl=["pretty","colorless","minimal"],Tl=["info","query","warn","error"],rd={datasources:(e,{datasourceNames:r})=>{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[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Lr(t,r)||` Available datasources: ${r.join(", ")}`;throw new q(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`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 q(`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 q(`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===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!bn(r).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ur()==="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(!vl.includes(e)){let r=Lr(e,vl);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!Tl.includes(t)){let n=Lr(t,Tl);throw new q(`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=Lr(i,o);throw new q(`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 q(`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 q(`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 q(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Lr(t,r);throw new q(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Rl(e,r){for(let[t,n]of Object.entries(e)){if(!Pl.includes(t)){let i=Lr(t,Pl);throw new q(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}rd[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Lr(e,r){if(r.length===0||typeof e!="string")return"";let t=td(e,r);return t?` Did you mean "${t}"?`:""}function td(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,Cl.default)(e,i)}));t.sort((i,o)=>i.distance{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(!Rn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Ye=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var nd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},id=Symbol.for("prisma.client.transaction.id"),od={id:0,nextId(){return++this.id}};function Ll(e){class r{constructor(n){this._originalClient=this;this._middlewares=new Cn;this._createPrismaPromise=Xi();this.$extends=Ks;e=n?.__internal?.configOverride?.(e)??e,pa(e),n&&Rl(n,e);let i=n?.adapter?yi(n.adapter):void 0,o=new kl.EventEmitter().on("error",()=>{});this._extensions=dn.empty(),this._previewFeatures=bn(e),this._clientVersion=e.clientVersion??bl,this._activeProvider=e.activeProvider,this._tracingHelper=cl(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Tt.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Tt.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=!i&&jr(s,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=Tt.default.resolve(e.dirname,e.relativePath);Dl.default.existsSync(p)||(p=e.dirname),Ye("dirname",e.dirname),Ye("relativePath",e.relativePath),Ye("cwd",p);let m=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:m.allowTriggerPanic,datamodelPath:Tt.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:m.binaryPath??void 0,engineEndpoint:m.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&dl(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,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ma(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:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Ir,getBatchRequestPayload:Er,prismaGraphQLToJSError:sr,PrismaClientUnknownRequestError:j,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:N("prisma:client:accelerateEngine"),engineVersion:Il.version,clientVersion:e.clientVersion}},Ye("clientVersion",e.clientVersion),this._engine=Ba(e,this._engineConfig),this._requestHandler=new In(this,o),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{Jr.log(`${Jr.tags[g]??""}`,h.message||h.query)})}this._metrics=new yr(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=ot(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$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{ho()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Al(n,i);return Yi(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=>(Yi(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new K(`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:el,callsite:We(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:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(wl)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Al(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=od.nextId(),s=pl(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 Sl(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 ot(Pe(Ws(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Xi(n)),ne(id,()=>n.id),rt(ml)]))}$transaction(n,i){let o;typeof n=="function"?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??nd,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,A=>c(u,T=>(A?.end(),l(T))));let{runInTransaction:p,args:m,...f}=u,g={...n,...f};m&&(g.args=i.middlewareArgsToRequestArgs(m)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await ta(this,g);return g.model?Zs({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new _l.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:m,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>Ya({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return N.enabled("prisma:client")&&(Ye("Prisma Client call:"),Ye(`prisma.${i}(${_s(n)})`),Ye("Generated request:"),Ye(JSON.stringify(h,null,2)+` +`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:m,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}}return r}function Al(e,r){return sd(e)?[new oe(e,r),sl]:[e,al]}function sd(e){return Array.isArray(e)&&Array.isArray(e.raw)}var ad=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Nl(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!ad.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function Ol(e){jr(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +/*! Bundled license information: + +decimal.js/decimal.mjs: + (*! + * decimal.js v10.4.3 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licence + *) +*/ +//# sourceMappingURL=library.js.map diff --git a/src/db/clients/account/runtime/wasm.js b/src/db/clients/account/runtime/wasm.js new file mode 100644 index 0000000..4a6a454 --- /dev/null +++ b/src/db/clients/account/runtime/wasm.js @@ -0,0 +1,29 @@ +"use strict";var ko=Object.create;var Et=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var Mo=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},Hr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Io(t))!Oo.call(e,i)&&i!==r&&Et(e,i,{get:()=>t[i],enumerable:!(n=Lo(t,i))||n.enumerable});return e};var De=(e,t,r)=>(r=e!=null?ko(Mo(e)):{},Hr(t||!e||!e.__esModule?Et(r,"default",{value:e,enumerable:!0}):r,e)),ar=e=>Hr(Et({},"__esModule",{value:!0}),e);function lr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(No.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(v=0){return $(v,"offset"),Z(v,"offset"),V(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,C=0){let T=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=Fo[T];return $(C,"offset"),Z(C,"offset"),V(C,"offset",this.length-1),Do(v,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,v,f),C+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 zr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function xt(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function V(e,t,r=$o+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 $(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 Z(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 Do(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 Kr(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 qo(e,t="utf8"){return h.from(e,t)}var h,Fo,No,Bo,Uo,$o,y,ur,u=se(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Kr(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return lr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return Uo.includes(r)}static compare(r,n){xt(r,"buff1"),xt(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return lr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){$(r,"offset"),Z(r,"offset"),V(r,"offset",this.length-1),$(n,"byteLength"),Z(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){$(n,"offset"),Z(n,"offset"),V(n,"offset",this.length-1),$(i,"byteLength"),Z(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){V(n,"targetStart"),V(i,"sourceStart",this.length),V(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-f:r.length),f);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),f=typeof n=="string"?0:n;return f=typeof n=="number"?f:null,f=Number.isNaN(f)?null:f,f??=o?this.length:0,f=f<0?this.length+f:f,a.length===0&&o===!1?f>=this.length?this.length:f:a.length===0&&o===!0?(f>=this.length?this.length:f)||this.length:s((v,C)=>(o?C<=f:C>=f)&&this[C]===a[0]&&a.every((k,R)=>this[C+R]===k))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Bo.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+ur(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+ur(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");zr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Fo={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]},No=new TextEncoder,Bo=new TextDecoder,Uo=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],$o=4294967295;_o(h.prototype);y=new Proxy(qo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),ur=String.fromCodePoint});var g,c=se(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var E,m=se(()=>{"use strict";E=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var w,p=se(()=>{"use strict";w=()=>{};w.prototype=w});var b,d=se(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});function en(e,t){var r,n,i,o,s,a,f,v,C=e.constructor,T=C.precision;if(!e.s||!t.s)return t.s||(t=new C(e)),B?O(t,T):t;if(f=e.d,v=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(T/D),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=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/j|0,f[o]%=j;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,B?O(t,T):t}function ue(e,t,r){if(e!==~~e||er)throw Error(ke+e)}function le(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(mr+q(e));if(!e.s)return new C(te);for(t==null?(B=!1,a=T):a=t,s=new C(.03125);e.abs().gte(.1);)e=e.times(s),v+=5;for(n=Math.log(Se(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=O(i.times(e),a),r=r.times(++f),s=o.plus(he(i,r,a)),le(s.d).slice(0,a)===le(o.d).slice(0,a)){for(;v--;)o=O(o.times(o),a);return C.precision=T,t==null?(B=!0,O(o,T)):o}o=s}}function q(e){for(var t=e.e*D,r=e.d[0];r>=10;r/=10)t++;return t}function cr(e,t,r){if(t>e.LN10.sd())throw B=!0,r&&(e.precision=r),Error(ne+"LN10 precision limit exceeded");return O(new e(e.LN10),t)}function xe(e){for(var t="";e--;)t+="0";return t}function Ye(e,t){var r,n,i,o,s,a,f,v,C,T=1,k=10,R=e,L=R.d,S=R.constructor,I=S.precision;if(R.s<1)throw Error(ne+(R.s?"NaN":"-Infinity"));if(R.eq(te))return new S(0);if(t==null?(B=!1,v=I):v=t,R.eq(10))return t==null&&(B=!0),cr(S,v);if(v+=k,S.precision=v,r=le(L),n=r.charAt(0),o=q(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=le(R.d),n=r.charAt(0),T++;o=q(R),n>1?(R=new S("0."+r),o++):R=new S(n+"."+r.slice(1))}else return f=cr(S,v+2,I).times(o+""),R=Ye(new S(n+"."+r.slice(1)),v-k).plus(f),S.precision=I,t==null?(B=!0,O(R,I)):R;for(a=s=R=he(R.minus(te),R.plus(te),v),C=O(R.times(R),v),i=3;;){if(s=O(s.times(C),v),f=a.plus(he(s,new S(i),v)),le(f.d).slice(0,v)===le(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(cr(S,v+2,I).times(o+""))),a=he(a,new S(T),v),S.precision=I,t==null?(B=!0,O(a,I)):a;a=f,i+=2}}function Yr(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=Ne(r/D),e.d=[],n=(r+1)%D,r<0&&(n+=D),nPt||e.e<-Pt))throw Error(mr+r)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,r){var n,i,o,s,a,f,v,C,T=e.d;for(s=1,o=T[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=D,i=t,v=T[C=0];else{if(C=Math.ceil((n+1)/D),o=T.length,C>=o)return e;for(v=o=T[C],s=1;o>=10;o/=10)s++;n%=D,i=n-D+s}if(r!==void 0&&(o=Se(10,s-i-1),a=v/o%10|0,f=t<0||T[C+1]!==void 0||v%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?v/Se(10,s-i):0:T[C-1])%10&1||r==(e.s<0?8:7))),t<1||!T[0])return f?(o=q(e),T.length=1,t=t-o-1,T[0]=Se(10,(D-t%D)%D),e.e=Ne(-t/D)||0):(T.length=1,T[0]=e.e=e.s=0),e;if(n==0?(T.length=C,o=1,C--):(T.length=C+1,o=Se(10,D-n),T[C]=i>0?(v/Se(10,s-i)%Se(10,i)|0)*o:0),f)for(;;)if(C==0){(T[0]+=o)==j&&(T[0]=1,++e.e);break}else{if(T[C]+=o,T[C]!=j)break;T[C--]=0,o=1}for(n=T.length;T[--n]===0;)T.pop();if(B&&(e.e>Pt||e.e<-Pt))throw Error(mr+q(e));return e}function rn(e,t){var r,n,i,o,s,a,f,v,C,T,k=e.constructor,R=k.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new k(e),B?O(t,R):t;if(f=e.d,T=t.d,n=t.e,v=e.e,f=f.slice(),s=v-n,s){for(C=s<0,C?(r=f,s=-s,a=T.length):(r=T,n=v,a=f.length),i=Math.max(Math.ceil(R/D),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=T.length,C=i0;--i)f[a++]=0;for(i=T.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+xe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+xe(-i-1)+o,r&&(n=r-s)>0&&(o+=xe(n))):i>=s?(o+=xe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+xe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=xe(n))),e.s<0?"-"+o:o}function Xr(e,t){if(e.length>t)return e.length=t,!0}function nn(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(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 Yr(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,jo.test(o))Yr(s,o);else throw Error(ke+o)}if(i.prototype=A,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=nn,i.config=i.set=Qo,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(ke+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ke+r+": "+n);return this}var Fe,Vo,pr,B,ne,ke,mr,Ne,Se,jo,te,j,D,Zr,Pt,A,he,pr,vt,on=se(()=>{"use strict";u();c();m();p();d();l();Fe=1e9,Vo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},B=!0,ne="[DecimalError] ",ke=ne+"Invalid argument: ",mr=ne+"Exponent out of range: ",Ne=Math.floor,Se=Math.pow,jo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,D=7,Zr=9007199254740991,Pt=Ne(Zr/D),A={};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};A.comparedTo=A.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};A.decimalPlaces=A.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*D;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};A.dividedBy=A.div=function(e){return he(this,new this.constructor(e))};A.dividedToIntegerBy=A.idiv=function(e){var t=this,r=t.constructor;return O(he(t,new r(e),0,1),r.precision)};A.equals=A.eq=function(e){return!this.cmp(e)};A.exponent=function(){return q(this)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){return this.cmp(e)>=0};A.isInteger=A.isint=function(){return this.e>this.d.length-2};A.isNegative=A.isneg=function(){return this.s<0};A.isPositive=A.ispos=function(){return this.s>0};A.isZero=function(){return this.s===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.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(te))throw Error(ne+"NaN");if(r.s<1)throw Error(ne+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(B=!1,t=he(Ye(r,o),Ye(e,o),o),B=!0,O(t,i))};A.minus=A.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rn(t,e):en(t,(e.s=-e.s,e))};A.modulo=A.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ne+"NaN");return r.s?(B=!1,t=he(r,e,0,1).times(e),B=!0,r.minus(t)):O(new n(r),i)};A.naturalExponential=A.exp=function(){return tn(this)};A.naturalLogarithm=A.ln=function(){return Ye(this)};A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};A.plus=A.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?en(t,e):rn(t,(e.s=-e.s,e))};A.precision=A.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);if(t=q(i)+1,n=i.d.length-1,r=n*D+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};A.squareRoot=A.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(ne+"NaN")}for(e=q(a),B=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=le(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ne((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(he(a,o,s+2)).times(.5),le(o.d).slice(0,s)===(t=le(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(O(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return B=!0,O(n,r)};A.times=A.mul=function(e){var t,r,n,i,o,s,a,f,v,C=this,T=C.constructor,k=C.d,R=(e=new T(e)).d;if(!C.s||!e.s)return new T(0);for(e.s*=C.s,r=C.e+e.e,f=k.length,v=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*k[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,B?O(e,T.precision):e};A.toDecimalPlaces=A.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ue(e,0,Fe),t===void 0?t=n.rounding:ue(t,0,8),O(r,e+q(r)+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Le(n,!0):(ue(e,0,Fe),t===void 0?t=i.rounding:ue(t,0,8),n=O(new i(n),e+1,t),r=Le(n,!0,e+1)),r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Le(i):(ue(e,0,Fe),t===void 0?t=o.rounding:ue(t,0,8),n=O(new o(i),e+q(i)+1,t),r=Le(n.abs(),!1,e+q(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};A.toInteger=A.toint=function(){var e=this,t=e.constructor;return O(new t(e),q(e)+1,t.rounding)};A.toNumber=function(){return+this};A.toPower=A.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,v=12,C=+(e=new f(e));if(!e.s)return new f(te);if(a=new f(a),!a.s){if(e.s<1)throw Error(ne+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,e.eq(te))return O(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=C<0?-C:C)<=Zr){for(i=new f(te),t=Math.ceil(n/D+4),B=!1;r%2&&(i=i.times(a),Xr(i.d,t)),r=Ne(r/2),r!==0;)a=a.times(a),Xr(a.d,t);return B=!0,e.s<0?new f(te).div(i):O(i,n)}}else if(o<0)throw Error(ne+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,B=!1,i=e.times(Ye(a,n+v)),B=!0,i=tn(i),i.s=o,i};A.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=q(i),n=Le(i,r<=o.toExpNeg||r>=o.toExpPos)):(ue(e,1,Fe),t===void 0?t=o.rounding:ue(t,0,8),i=O(new o(i),e,t),r=q(i),n=Le(i,e<=r||r<=o.toExpNeg,e)),n};A.toSignificantDigits=A.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ue(e,1,Fe),t===void 0?t=n.rounding:ue(t,0,8)),O(new n(r),e,t)};A.toString=A.valueOf=A.val=A.toJSON=A[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=q(e),r=e.constructor;return Le(e,t<=r.toExpNeg||t>=r.toExpPos)};he=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%j|0,s=o/j|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,v,C,T,k,R,L,S,I,ie,Y,N,X,Ae,sr,oe,bt,wt=n.constructor,So=n.s==i.s?1:-1,ae=n.d,U=i.d;if(!n.s)return new wt(n);if(!i.s)throw Error(ne+"Division by zero");for(f=n.e-i.e,oe=U.length,Ae=ae.length,R=new wt(So),L=R.d=[],v=0;U[v]==(ae[v]||0);)++v;if(U[v]>(ae[v]||0)&&--f,o==null?Y=o=wt.precision:s?Y=o+(q(n)-q(i))+1:Y=o,Y<0)return new wt(0);if(Y=Y/D+2|0,v=0,oe==1)for(C=0,U=U[0],Y++;(v1&&(U=e(U,C),ae=e(ae,C),oe=U.length,Ae=ae.length),X=oe,S=ae.slice(0,oe),I=S.length;I=j/2&&++sr;do C=0,a=t(U,S,oe,I),a<0?(ie=S[0],oe!=I&&(ie=ie*j+(S[1]||0)),C=ie/sr|0,C>1?(C>=j&&(C=j-1),T=e(U,C),k=T.length,I=S.length,a=t(T,S,k,I),a==1&&(C--,r(T,oe{"use strict";on();P=class extends vt{static isDecimal(t){return t instanceof vt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new vt(`0.${n.slice(0,t)}`)}}},ce=P});function Jo(){return!1}var Wo,Go,un,cn=se(()=>{"use strict";u();c();m();p();d();l();Wo={},Go={existsSync:Jo,promises:Wo},un=Go});var xn=Re((Eu,En)=>{"use strict";u();c();m();p();d();l();En.exports=(yr(),ar(hr)).format});var hr={};ze(hr,{default:()=>zo,deprecate:()=>vn,format:()=>Tn,inspect:()=>Cn,promisify:()=>Pn});function Pn(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function vn(e,t){return(...r)=>(console.warn(t),e(...r))}function Cn(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Tn,Ko,zo,yr=se(()=>{"use strict";u();c();m();p();d();l();Tn=xn(),Ko={promisify:Pn,deprecate:vn,inspect:Cn,format:Tn},zo=Ko});function ts(...e){return e.join("/")}function rs(...e){return e.join("/")}var kn,ns,is,Ze,Ln=se(()=>{"use strict";u();c();m();p();d();l();kn="/",ns={sep:kn},is={resolve:ts,posix:ns,join:rs,sep:kn},Ze=is});var St,Mn=se(()=>{"use strict";u();c();m();p();d();l();St=class{constructor(){this.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 _n=Re((Vc,On)=>{"use strict";u();c();m();p();d();l();On.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 Nn=Re((rm,Fn)=>{"use strict";u();c();m();p();d();l();Fn.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 Un=Re((um,Bn)=>{"use strict";u();c();m();p();d();l();var cs=Nn();Bn.exports=e=>typeof e=="string"?e.replace(cs(),""):e});var jn=Re((Uf,fs)=>{fs.exports={name:"@prisma/engines-version",version:"5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"efd2449663b3d73d637ea1fd226bafbcf45b3102"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.22",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Qn=Re(()=>{"use strict";u();c();m();p();d();l()});var Ur=Re((PT,Di)=>{"use strict";u();c();m();p();d();l();Di.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;swr,Decimal:()=>ce,Extensions:()=>dr,MetricsClient:()=>$e,NotFoundError:()=>ye,PrismaClientInitializationError:()=>M,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>be,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>W,Public:()=>fr,Sql:()=>ee,defineDmmfProperty:()=>Vn,empty:()=>Wn,getPrismaClient:()=>To,getRuntime:()=>Ce,join:()=>Jn,makeStrictEnum:()=>Ao,objectEnumValues:()=>It,raw:()=>Lr,sqltag:()=>Ir,warnEnvConflicts:()=>void 0,warnOnce:()=>nt});module.exports=ar(Ja);u();c();m();p();d();l();var dr={};ze(dr,{defineExtension:()=>sn,getExtensionContext:()=>an});u();c();m();p();d();l();u();c();m();p();d();l();function sn(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();m();p();d();l();function an(e){return e}var fr={};ze(fr,{validator:()=>ln});u();c();m();p();d();l();u();c();m();p();d();l();function ln(...e){return t=>t}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var gr,mn,pn,dn,fn=!0;typeof g<"u"&&({FORCE_COLOR:gr,NODE_DISABLE_COLORS:mn,NO_COLOR:pn,TERM:dn}=g.env||{},fn=g.stdout&&g.stdout.isTTY);var Ho={enabled:!mn&&pn==null&&dn!=="dumb"&&(gr!=null&&gr!=="0"||fn)};function _(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ho.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var zl=_(0,0),Ct=_(1,22),Tt=_(2,22),Yl=_(3,23),gn=_(4,24),Xl=_(7,27),Zl=_(8,28),eu=_(9,29),tu=_(30,39),Be=_(31,39),hn=_(32,39),At=_(33,39),yn=_(34,39),ru=_(35,39),bn=_(36,39),nu=_(37,39),wn=_(90,39),iu=_(90,39),ou=_(40,49),su=_(41,49),au=_(42,49),lu=_(43,49),uu=_(44,49),cu=_(45,49),mu=_(46,49),pu=_(47,49);u();c();m();p();d();l();var Yo=100,An=["green","yellow","blue","magenta","cyan","red"],Rt=[],Rn=Date.now(),Xo=0,br=typeof g<"u"?g.env:{};globalThis.DEBUG??=br.DEBUG??"";globalThis.DEBUG_COLORS??=br.DEBUG_COLORS?br.DEBUG_COLORS==="true":!0;var Xe={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,i;typeof require=="function"&&typeof g<"u"&&typeof g.stderr<"u"&&typeof g.stderr.write=="function"?i=(...o)=>{let s=(yr(),ar(hr));g.stderr.write(s.format(...o)+` +`)}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function Zo(e){let t={color:An[Xo++%An.length],enabled:Xe.enabled(e),namespace:e,log:Xe.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Rt.push([o,...n]),Rt.length>Yo&&Rt.shift(),Xe.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:es(C)),v=`+${Date.now()-Rn}ms`;Rn=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var wr=new Proxy(Zo,{get:(e,t)=>Xe[t],set:(e,t,r)=>Xe[t]=r});function es(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 Sn(){Rt.length=0}var re=wr;u();c();m();p();d();l();u();c();m();p();d();l();var Er=["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 In="library";function et(e){let t=os();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":In)}function os(){let e=g.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u();c();m();p();d();l();u();c();m();p();d();l();var Ie;(t=>{let e;(N=>(N.findUnique="findUnique",N.findUniqueOrThrow="findUniqueOrThrow",N.findFirst="findFirst",N.findFirstOrThrow="findFirstOrThrow",N.findMany="findMany",N.create="create",N.createMany="createMany",N.update="update",N.updateMany="updateMany",N.upsert="upsert",N.delete="delete",N.deleteMany="deleteMany",N.groupBy="groupBy",N.count="count",N.aggregate="aggregate",N.findRaw="findRaw",N.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Ie||={});var rt={};ze(rt,{error:()=>ls,info:()=>as,log:()=>ss,query:()=>us,should:()=>Dn,tags:()=>tt,warn:()=>xr});u();c();m();p();d();l();var tt={error:Be("prisma:error"),warn:At("prisma:warn"),info:bn("prisma:info"),query:yn("prisma:query")},Dn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function ss(...e){console.log(...e)}function xr(e,...t){Dn.warn()&&console.warn(`${tt.warn} ${e}`,...t)}function as(e,...t){console.info(`${tt.info} ${e}`,...t)}function ls(e,...t){console.error(`${tt.error} ${e}`,...t)}function us(e,...t){console.log(`${tt.query} ${e}`,...t)}u();c();m();p();d();l();function kt(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`)}u();c();m();p();d();l();function Me(e,t){throw new Error(t)}u();c();m();p();d();l();function Pr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();m();p();d();l();var vr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});u();c();m();p();d();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();m();p();d();l();function Cr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$n.has(e)||($n.add(e),xr(t,...r))};u();c();m();p();d();l();var Q=class extends Error{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"}};K(Q,"PrismaClientKnownRequestError");var ye=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(ye,"NotFoundError");u();c();m();p();d();l();var M=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(M,"PrismaClientInitializationError");u();c();m();p();d();l();var be=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(be,"PrismaClientRustPanicError");u();c();m();p();d();l();var J=class extends Error{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"}};K(J,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var W=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(W,"PrismaClientValidationError");u();c();m();p();d();l();var $e=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u();c();m();p();d();l();u();c();m();p();d();l();function it(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Vn(e,t){let r=it(()=>ms(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ms(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Tr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();m();p();d();l();var Lt=Symbol(),Ar=new WeakMap,we=class{constructor(t){t===Lt?Ar.set(this,`Prisma.${this._getName()}`):Ar.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ar.get(this)}},ot=class extends we{_getNamespace(){return"NullTypes"}},st=class extends ot{};Rr(st,"DbNull");var at=class extends ot{};Rr(at,"JsonNull");var lt=class extends ot{};Rr(lt,"AnyNull");var It={classes:{DbNull:st,JsonNull:at,AnyNull:lt},instances:{DbNull:new st(Lt),JsonNull:new at(Lt),AnyNull:new lt(Lt)}};function Rr(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}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 ut(e){return{ok:!1,error:e,map(){return ut(e)},flatMap(){return ut(e)}}}var Sr=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},kr=e=>{let t=new Sr,r=Oe(t,e.startTransaction.bind(e)),n={errorRegistry:t,queryRaw:Oe(t,e.queryRaw.bind(e)),executeRaw:Oe(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>ps(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ds(t,e.getConnectionInfo.bind(e))),n},ps=(e,t)=>({provider:t.provider,options:t.options,queryRaw:Oe(e,t.queryRaw.bind(t)),executeRaw:Oe(e,t.executeRaw.bind(t)),commit:Oe(e,t.commit.bind(t)),rollback:Oe(e,t.rollback.bind(t))});function Oe(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}function ds(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}var Co=De(jn());var ok=De(Qn());Mn();cn();Ln();u();c();m();p();d();l();var ee=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();m();p();d();l();u();c();m();p();d();l();var Mt={enumerable:!0,configurable:!0,writable:!0};function Ot(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Mt,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Gn=Symbol.for("nodejs.util.inspect.custom");function pe(e,t){let r=gs(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=Hn(Reflect.ownKeys(o),r),a=Hn(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?{...Mt,...f?.getPropertyDescriptor(s)}:Mt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Gn]=function(){let o={...this};return delete o[Gn],o},i}function gs(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 Hn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function _t(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();m();p();d();l();u();c();m();p();d();l();var qe=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&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}};u();c();m();p();d();l();u();c();m();p();d();l();function Kn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();m();p();d();l();function Ve(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Dt(e){return e.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(e){return P.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();m();p();d();l();var pt=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Qe(e){return e instanceof pt}u();c();m();p();d();l();u();c();m();p();d();l();var Ft=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Nt=e=>e,Bt={bold:Nt,red:Nt,green:Nt,dim:Nt,enabled:!1},zn={bold:Ct,red:Be,green:hn,dim:Tt,enabled:!0},Je={write(e){e.writeLine(",")}};u();c();m();p();d();l();var de=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.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();m();p();d();l();var Pe=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var We=class extends Pe{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Ft(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new de("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Je,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var Yn=": ",Ut=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Yn.length}write(t){let r=new de(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Yn).write(this.value)}};u();c();m();p();d();l();var G=class e extends Pe{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let f;if(s.value instanceof e?f=s.value.getField(a):s.value instanceof We&&(f=s.value.getField(Number(a))),!f)return;s=f}return s}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 n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select");if(r?.value instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if(n?.value instanceof e)return{kind:"include",value:n.value}}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(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}writeEmpty(r){let n=new de("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Je,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var H=class extends Pe{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new de(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var Mr=class{constructor(t){this.errorMessages=[];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 $t(e){return new Mr(Xn(e))}function Xn(e){let t=new G;for(let[r,n]of Object.entries(e)){let i=new Ut(r,Zn(n));t.addField(i)}return t}function Zn(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(je(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Dt(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof we?new H(`Prisma.${e._getName()}`):Qe(e)?new H(`prisma.${Kn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ys(e):typeof e=="object"?Xn(e):new H(Object.prototype.toString.call(e))}function ys(e){let t=new We;for(let r of e)t.addItem(Zn(r));return t}function ei(e){if(e===void 0)return"";let t=$t(e);return new qe(0,{colors:Bt}).write(t).toString()}u();c();m();p();d();l();var bs="P2037";function qt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(ws(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 ws(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===bs&&(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 Or=class{getLocation(){return null}};function ve(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Or}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ti={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ge(e={}){let t=xs(e);return Object.entries(t).reduce((n,[i,o])=>(ti[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function xs(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Vt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ri(e,t){let r=Vt(e);return t({action:"aggregate",unpacker:r,argsMapper:Ge})(e)}u();c();m();p();d();l();function Ps(e={}){let{select:t,...r}=e;return typeof t=="object"?Ge({...r,_count:t}):Ge({...r,_count:{_all:!0}})}function vs(e={}){return typeof e.select=="object"?t=>Vt(e)(t)._count:t=>Vt(e)(t)._count._all}function ni(e,t){return t({action:"count",unpacker:vs(e),argsMapper:Ps})(e)}u();c();m();p();d();l();function Cs(e={}){let t=Ge(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 Ts(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ii(e,t){return t({action:"groupBy",unpacker:Ts(e),argsMapper:Cs})(e)}function oi(e,t,r){if(t==="aggregate")return n=>ri(n,r);if(t==="count")return n=>ni(n,r);if(t==="groupBy")return n=>ii(n,r)}u();c();m();p();d();l();function si(e,t){let r=t.fields.filter(i=>!i.relationName),n=vr(r,i=>i.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 pt(e,o,s.type,s.isList,s.kind==="enum")},...Ot(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var ai=e=>Array.isArray(e)?e:e.split("."),_r=(e,t)=>ai(t).reduce((r,n)=>r&&r[n],e),li=(e,t,r)=>ai(t).reduceRight((n,i,o,s)=>Object.assign({},_r(e,s.slice(0,o)),{[i]:n}),r);function As(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Rs(e,t,r){return t===void 0?e??{}:li(t,r,e||!0)}function Dr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,v)=>({...f,[v.name]:v}),{});return f=>{let v=ve(e._errorFormat),C=As(n,i),T=Rs(f,o,C),k=r({dataPath:C,callsite:v})(T),R=Ss(e,t);return new Proxy(k,{get(L,S){if(!R.includes(S))return L[S];let ie=[a[S].type,r,S],Y=[C,T];return Dr(e,...ie,...Y)},...Ot([...R,...Object.getOwnPropertyNames(k)])})}}function Ss(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u();c();m();p();d();l();u();c();m();p();d();l();var ks=De(_n());var Ls={red:Be,gray:wn,dim:Tt,bold:Ct,underline:gn,highlightSource:e=>e.highlight()},Is={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ms({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Os({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(_s(t))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function _s(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function He(e){let t=e.showColors?Ls:Is,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ms(e),Os(r,t)}function ui(e,t,r,n){return e===Ie.ModelAction.findFirstOrThrow||e===Ie.ModelAction.findUniqueOrThrow?Ds(t,r,n):n}function Ds(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=He({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new W(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new ye(`No ${e} found`,t):o})}}u();c();m();p();d();l();function fe(e){return e.replace(/^./,t=>t.toLowerCase())}var Fs=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Ns=["aggregate","count","groupBy"];function Fr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Bs(e,t),$s(e,t),ct(r),z("name",()=>t),z("$name",()=>t),z("$parent",()=>e._appliedParent)];return pe({},n)}function Bs(e,t){let r=fe(t),n=Object.keys(Ie.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=f=>e._request(f);s=ui(o,t,e._clientVersion,s);let a=f=>v=>{let C=ve(e._errorFormat);return e._createPrismaPromise(T=>{let k={args:v,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:T,callsite:C};return s({...k,...f})})};return Fs.includes(o)?Dr(e,t,a):Us(i)?oi(e,i,a):a({})}}}function Us(e){return Ns.includes(e)}function $s(e,t){return _e(z("fields",()=>{let r=e._runtimeDataModel.models[t];return si(t,r)}))}u();c();m();p();d();l();function ci(e){return e.replace(/^./,t=>t.toUpperCase())}var Nr=Symbol();function dt(e){let t=[qs(e),z(Nr,()=>e),z("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(ct(r)),pe(e,t)}function qs(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(fe),n=[...new Set(t.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=ci(i);if(e._runtimeDataModel.models[o]!==void 0)return Fr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function mi(e){return e[Nr]?e[Nr]:e}function pi(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 dt(t)}u();c();m();p();d();l();u();c();m();p();d();l();function di({result:e,modelName:t,select:r,extensions:n}){let i=n.getAllComputedFields(t);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(r){if(!r[a.name])continue;let f=a.needs.filter(v=>!r[v]);f.length>0&&s.push(mt(f))}Vs(e,a.needs)&&o.push(js(a,pe(e,o)))}return o.length>0||s.length>0?pe(e,[...o,...s]):e}function Vs(e,t){return t.every(r=>Pr(e,r))}function js(e,t){return _e(z(e.name,()=>e.compute(t)))}u();c();m();p();d();l();function jt({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let v=typeof s=="object"?s:{};t[o]=jt({visitor:i,result:t[o],args:v,modelName:f.type,runtimeDataModel:n})}}function gi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:jt({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,f)=>di({result:s,modelName:fe(a),select:f.select,extensions:n})})}u();c();m();p();d();l();u();c();m();p();d();l();l();function hi(e){if(e instanceof ee)return Qs(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:hi(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Pi(o,f),a.args=s,bi(e,a,r,n+1)}})})}function wi(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 bi(e,t,s)}function Ei(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?xi(r,n,0,e):e(r)}}function xi(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=Pi(i,f),xi(a,t,r+1,n)}})}var yi=e=>e;function Pi(e=yi,t=yi){return r=>e(t(r))}u();c();m();p();d();l();u();c();m();p();d();l();function Ci(e,t,r){let n=fe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Js({...e,...vi(t.name,e,t.result.$allModels),...vi(t.name,e,t.result[n])})}function Js(e){let t=new me,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 Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function vi(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ws(t,o,i)})):{}}function Ws(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ti(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}var Qt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new me;this.modelExtensionsCache=new me;this.queryCallbacksCache=new me;this.clientExtensions=it(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.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,()=>Ci(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=fe(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()}},Jt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Qt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Qt(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();m();p();d();l();var Ai=re("prisma:client"),Ri={Vercel:"vercel","Netlify CI":"netlify"};function Si({postinstall:e,ciName:t,clientVersion:r}){if(Ai("checkPlatformCaching:postinstall",e),Ai("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ri){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/${Ri[t]}-build`;throw console.error(n),new M(n,r)}}u();c();m();p();d();l();function ki(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Gs="Cloudflare-Workers",Hs="node";function Li(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Gs?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Ks={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Ce(){let e=Li();return{id:e,prettyName:Ks[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();m();p();d();l();u();c();m();p();d();l();function Wt({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 Ce().id==="workerd"?new M(`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 M(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new M("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function Ii(e){if(e?.kind==="itx")return e.options.id}u();c();m();p();d();l();var Br,Mi={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new M(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ce().prettyName})`,t);if(n===void 0)throw new M("WASM engine was unexpectedly `undefined`",t);Br===void 0&&(Br=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new M("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(f.exports),o.QueryEngine})());let i=await Br;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var zs="P2036",ge=re("prisma:client:libraryEngine");function Ys(e){return e.item_type==="query"&&"query"in e}function Xs(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var AC=[...Er,"native"],Oi=0,gt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Mi,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,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(),this.checkForTooManyEngines()}checkForTooManyEngines(){Oi===10&&console.warn(`${At("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(Zs(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(ge("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await 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),{adapter:r}=this.config;r&&ge("Using driver adapter: %O",r),this.engine=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"},n=>{t.deref()?.logger(n)},r),Oi++}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new M(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",Ys(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Xs(r),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(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{ge("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,ge("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new M(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ge("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),ge("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,ge("library stopped")};return this.libraryStoppingPromise=this.config.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}){ge(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof M)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");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}){ge("requestBatch");let i=_t(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ii(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:f}=s;if(Array.isArray(a))return a.map(v=>v.errors&&v.errors.length>0?this.loggerRustPanic??this.buildQueryError(v.errors[0]):{data:v,elapsed:0});throw f&&f.length===1?new Error(f[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:qt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===zs&&this.config.adapter){let r=t.meta?.id;kt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return kt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Zs(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}u();c();m();p();d();l();var Gt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Ht=class{constructor(t){this.config=t;this.name="AccelerateEngine";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}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new M(Gt,this.config.clientVersion)}metrics(t){throw new M(Gt,this.config.clientVersion)}request(t,r){throw new M(Gt,this.config.clientVersion)}requestBatch(t,r){throw new M(Gt,this.config.clientVersion)}};function _i({copyEngine:e=!0},t){let r;try{r=Wt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&nt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=et(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let f;throw e?r?.startsWith("prisma://")?f=["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."]:f=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:f=["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."],new W(f.join(` +`),{clientVersion:t.clientVersion})}if(o)return new gt(t);if(i)return new Ht(t);{let f=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ce().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 W(f.join(` +`),{clientVersion:t.clientVersion})}throw new W("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}u();c();m();p();d();l();function Kt({generator:e}){return e?.previewFeatures??[]}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var $i=De(Ur());u();c();m();p();d();l();function Bi(e,t){let r=Ui(e),n=ea(r),i=ra(n);i?zt(i,t):t.addErrorMessage(()=>"Unknown error")}function Ui(e){return e.errors.flatMap(t=>t.kind==="Union"?Ui(t):[t])}function ea(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:ta(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ta(e,t){return[...new Set(e.concat(t))]}function ra(e){return Cr(e,(t,r)=>{let n=Fi(t),i=Fi(r);return n!==i?n-i:Ni(t)-Ni(r)})}function Fi(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ni(e){switch(e.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 Ee=class{constructor(t,r){this.name=t;this.value=r;this.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();m();p();d();l();var Yt=class{constructor(){this.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(Je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function zt(e,t){switch(e.kind){case"IncludeAndSelect":na(e,t);break;case"IncludeOnScalar":ia(e,t);break;case"EmptySelection":oa(e,t);break;case"UnknownSelectionField":sa(e,t);break;case"UnknownArgument":aa(e,t);break;case"UnknownInputField":la(e,t);break;case"RequiredArgumentMissing":ua(e,t);break;case"InvalidArgumentType":ca(e,t);break;case"InvalidArgumentValue":ma(e,t);break;case"ValueTooLarge":pa(e,t);break;case"SomeFieldsMissing":da(e,t);break;case"TooManyFieldsGiven":fa(e,t);break;case"Union":Bi(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function na(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof G&&(r.getField("include")?.markAsError(),r.getField("select")?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green("`include`")} or ${n.green("`select`")}, but ${n.red("not both")} at the same time.`)}function ia(e,t){let[r,n]=Xt(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 Ee(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)}. ${ht(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function oa(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ji(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ht(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function sa(e,t){let[r,n]=Xt(e.selectionPath),i=t.arguments.getDeepSelectionParent(r);i&&(i.value.getField(n)?.markAsError(),ji(i.value,e.outputType)),t.addErrorMessage(o=>{let s=[`Unknown field ${o.red(`\`${n}\``)}`];return i&&s.push(`for ${o.bold(i.kind)} statement`),s.push(`on model ${o.bold(`\`${e.outputType.name}\``)}.`),s.push(ht(o)),s.join(" ")})}function aa(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof G&&(n.getField(r)?.markAsError(),ga(n,e.arguments)),t.addErrorMessage(i=>qi(i,r,e.arguments.map(o=>o.name)))}function la(e,t){let[r,n]=Xt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof G){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r);o instanceof G&&Qi(o,e.inputType)}t.addErrorMessage(o=>qi(o,n,e.inputType.fields.map(s=>s.name)))}function qi(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ya(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ht(e)),n.join(" ")}function ua(e,t){let r;t.addErrorMessage(f=>r?.value instanceof H&&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);if(!(n instanceof G))return;let[i,o]=Xt(e.argumentPath),s=new Yt,a=n.getDeepFieldValue(i);if(a instanceof G)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 Ee(o,s).makeRequired())}else{let f=e.inputTypes.map(Vi).join(" | ");a.addSuggestion(new Ee(o,f).makeRequired())}}function Vi(e){return e.kind==="list"?`${Vi(e.elementType)}[]`:e.name}function ca(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof G&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Zt("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 ma(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof G&&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=Zt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function pa(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof G){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 da(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof G){let i=n.getDeepFieldValue(e.argumentPath);i instanceof G&&Qi(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")} ${Zt("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(ht(i)),o.join(" ")})}function fa(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof G){let o=n.getDeepFieldValue(e.argumentPath);o instanceof G&&(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 ${Zt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ji(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ee(r.name,"true"))}function ga(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Ee(r.name,r.typeNames.join(" | ")))}function Qi(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ee(r.name,r.typeNames.join(" | ")))}function Xt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ht({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Zt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ha=3;function ya(e,t){let r=1/0,n;for(let i of t){let o=(0,$i.default)(e,i);o>ha||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.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)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();m();p();d();l();var Hi=e=>({command:e});u();c();m();p();d();l();u();c();m();p();d();l();var Ki=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();m();p();d();l();l();function yt(e){try{return zi(e,"fast")}catch{return zi(e,"slow")}}function zi(e,t){return JSON.stringify(e.map(r=>Aa(r,t)))}function Aa(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:Ve(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ce.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:y.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ra(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Xi(e):e}function Ra(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Xi(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Yi);let t={};for(let r of Object.keys(e))t[r]=Yi(e[r]);return t}function Yi(e){return typeof e=="bigint"?e.toString():Xi(e)}var Sa=/^(\s*alter\s)/i,Zi=re("prisma:client");function Vr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Sa.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 jr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:yt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ki(r),i={values:yt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Zi(`prisma.${e}(${n}, ${i.values})`):Zi(`prisma.${e}(${n})`),{query:n,parameters:i}},eo={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ee(t,r)}},to={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();m();p();d();l();function Qr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=ro(r(o)):ro(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ro(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();m();p();d();l();var no={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Jr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??no}};function io(e){return e.includes("tracing")?new Jr:no}u();c();m();p();d();l();function oo(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();m();p();d();l();var ka=["$connect","$disconnect","$on","$transaction","$use","$extends"],so=ka;u();c();m();p();d();l();function ao(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();m();p();d();l();var tr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};u();c();m();p();d();l();var uo=De(Un());u();c();m();p();d();l();function rr(e){return typeof e.batchRequestIdx=="number"}u();c();m();p();d();l();l();function nr(e){return e===null?e:Array.isArray(e)?e.map(nr):typeof e=="object"?La(e)?Ia(e):Ue(e,nr):e}function La(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Ia({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return y.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ce(t);case"Json":return JSON.parse(t);default:Me(t,"Unknown tagged value")}}u();c();m();p();d();l();function lo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wr(e.query.arguments)),t.push(Wr(e.query.selection)),t.join("")}function Wr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wr(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Ma={aggregate:!1,aggregateRaw:!1,createMany:!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,updateOne:!0,upsertOne:!0};function Gr(e){return Ma[e]}u();c();m();p();d();l();var ir=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(T=>T.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),v=n.some(T=>Gr(T.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:_a(o),containsWrite:v,customDataProxyFetch:i})).map((T,k)=>{if(T instanceof Error)return T;try{return this.mapQueryEngineResult(n[k],T)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?co(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Gr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:lo(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})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}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}){if(Oa(t),Da(t,i)||t instanceof ye)throw t;if(t instanceof Q&&Fa(t)){let f=mo(t.meta);er({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=He({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new Q(a,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new be(a,this.client._clientVersion);if(t instanceof J)throw new J(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof M)throw new M(a,this.client._clientVersion);if(t instanceof be)throw new be(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,uo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=nr(_r(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function _a(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:co(e)};Me(e,"Unknown transaction kind")}}function co(e){return{id:e.id,payload:e.payload}}function Da(e,t){return rr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Fa(e){return e.code==="P2009"||e.code==="P2012"}function mo(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(mo)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();m();p();d();l();var po="5.11.0";var fo=po;u();c();m();p();d();l();l();function go(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=ho(t[n]);return r})}function ho({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return y.from(t,"base64");case"decimal":return new ce(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(ho);default:return t}}u();c();m();p();d();l();var Eo=De(Ur());u();c();m();p();d();l();var F=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(F,"PrismaClientConstructorValidationError");var yo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],bo=["pretty","colorless","minimal"],wo=["info","query","warn","error"],Ba={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new F(`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=Ke(r,t)||` Available datasources: ${t.join(", ")}`;throw new F(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new F(`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 F(`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 F(`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===null)return;if(e===void 0)throw new F('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Kt(t).includes("driverAdapters"))throw new F('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(et()==="binary")throw new F('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 F(`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 F(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!bo.includes(e)){let t=Ke(e,bo);throw new F(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new F(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!wo.includes(r)){let n=Ke(r,wo);throw new F(`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=Ke(i,o);throw new F(`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 F(`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 F(`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 F(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new F(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Ke(r,t);throw new F(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function xo(e,t){for(let[r,n]of Object.entries(e)){if(!yo.includes(r)){let i=Ke(r,yo);throw new F(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ba[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new F('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Ke(e,t){if(t.length===0||typeof e!="string")return"";let r=Ua(e,t);return r?` Did you mean "${r}"?`:""}function Ua(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Eo.default)(e,i)}));r.sort((i,o)=>i.distance{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=v=>{o||(o=!0,r(v))};for(let v=0;v{n[v]=C,a()},C=>{if(!rr(C)){f(C);return}C.batchRequestIdx===v?f(C):(i||(i=C),a())})})}var Te=re("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var $a={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},qa=Symbol.for("prisma.client.transaction.id"),Va={id:0,nextId(){return++this.id}};function To(e){class t{constructor(n){this._originalClient=this;this._middlewares=new tr;this._createPrismaPromise=Qr();this.$extends=pi;e=n?.__internal?.configOverride?.(e)??e,Si(e),n&&xo(n,e);let i=n?.adapter?kr(n.adapter):void 0,o=new St().on("error",()=>{});this._extensions=Jt.empty(),this._previewFeatures=Kt(e),this._clientVersion=e.clientVersion??fo,this._activeProvider=e.activeProvider,this._tracingHelper=io(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=e.injectableEdgeEnv?.();try{let f=n??{},v=f.__internal??{},C=v.debug===!0;C&&re.enable("prisma:client");let T=Ze.resolve(e.dirname,e.relativePath);un.existsSync(T)||(T=e.dirname),Te("dirname",e.dirname),Te("relativePath",e.relativePath),Te("cwd",T);let k=v.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:T,dirname:e.dirname,enableDebugLogs:C,allowTriggerPanic:k.allowTriggerPanic,datamodelPath:Ze.join(e.dirname,e.filename??"schema.prisma"),prismaPath:k.binaryPath??void 0,engineEndpoint:k.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&ao(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,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ki(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:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Wt,getBatchRequestPayload:_t,prismaGraphQLToJSError:qt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:M,PrismaClientKnownRequestError:Q,debug:re("prisma:client:accelerateEngine"),engineVersion:Co.version,clientVersion:e.clientVersion}},Te("clientVersion",e.clientVersion),this._engine=_i(e,this._engineConfig),this._requestHandler=new or(this,o),f.log)for(let R of f.log){let L=typeof R=="string"?R:R.emit==="stdout"?R.level:null;L&&this.$on(L,S=>{rt.log(`${rt.tags[L]??""}`,S.message||S.query)})}this._metrics=new $e(this._engine)}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=dt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$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{Sn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:jr({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]=vo(n,i);return Vr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new W("`$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=>(Vr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new W(`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:Hi,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:jr({clientMethod:i,activeProvider:a}),callsite:ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(go)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...vo(n,i));throw new W("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Va.nextId(),s=oo(n.length),a=n.map((f,v)=>{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,T={kind:"batch",id:o,index:v,isolationLevel:C,lock:s};return f.requestTransaction?.(T)??f});return Po(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 v={kind:"itx",...a};f=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return f}_createItxClient(n){return dt(pe(mi(this),[z("_appliedParent",()=>this._appliedParent._createItxClient(n)),z("_createPrismaPromise",()=>Qr(n)),z(qa,()=>n.id),mt(so)]))}$transaction(n,i){let o;typeof n=="function"?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??$a,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 v=>{let C=this._middlewares.get(++a);if(C)return this._tracingHelper.runInChildSpan(s.middleware,I=>C(v,ie=>(I?.end(),f(ie))));let{runInTransaction:T,args:k,...R}=v,L={...n,...R};k&&(L.args=i.middlewareArgsToRequestArgs(k)),n.transaction!==void 0&&T===!1&&delete L.transaction;let S=await wi(this,L);return L.model?gi({result:S,modelName:L.model,args:L.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:v,transaction:C,unpacker:T,otelParentCtx:k,customDataProxyFetch:R}){try{n=v?v(n):n;let L={name:"serialize"},S=this._tracingHelper.runInChildSpan(L,()=>Ji({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return re.enabled("prisma:client")&&(Te("Prisma Client call:"),Te(`prisma.${i}(${ei(n)})`),Te("Generated request:"),Te(JSON.stringify(S,null,2)+` +`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:S,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:T,otelParentCtx:k,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:R})}catch(L){throw L.clientVersion=this._clientVersion,L}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new W("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}}return t}function vo(e,t){return ja(e)?[new ee(e,t),eo]:[e,to]}function ja(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();m();p();d();l();var Qa=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ao(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qa.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm.js.map diff --git a/src/db/clients/account/schema.prisma b/src/db/clients/account/schema.prisma new file mode 100644 index 0000000..8601149 --- /dev/null +++ b/src/db/clients/account/schema.prisma @@ -0,0 +1,35 @@ +datasource db { + provider = "postgres" + url = env("DB_CONNECTION_STRING") +} + +generator client { + provider = "prisma-client-js" + output = "./clients/account" +} + +model VerificationToken { + id String @default(cuid()) @id + identifier String + nonce Int + issued DateTime @default(now()) + expires DateTime +} + +model Account { + id String @default(cuid()) @id + username String? + email String? + addresses String[] + disabled Boolean @default(false) + + favorite_speakers String[] + interested_sessions String[] + attending_sessions String[] + publicSchedule Boolean @default(false) + notifications Boolean @default(false) + appState_bogota String? + + createdAt DateTime @default(now()) + updatedAt DateTime? +} diff --git a/src/db/clients/account/wasm.d.ts b/src/db/clients/account/wasm.d.ts new file mode 100644 index 0000000..34c6161 --- /dev/null +++ b/src/db/clients/account/wasm.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/src/db/clients/account/wasm.js b/src/db/clients/account/wasm.js new file mode 100644 index 0000000..95253b8 --- /dev/null +++ b/src/db/clients/account/wasm.js @@ -0,0 +1,196 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.11.0 + * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102 + */ +Prisma.prismaVersion = { + client: "5.11.0", + engine: "efd2449663b3d73d637ea1fd226bafbcf45b3102" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.NotFoundError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.VerificationTokenScalarFieldEnum = { + id: 'id', + identifier: 'identifier', + nonce: 'nonce', + issued: 'issued', + expires: 'expires' +}; + +exports.Prisma.AccountScalarFieldEnum = { + id: 'id', + username: 'username', + email: 'email', + addresses: 'addresses', + disabled: 'disabled', + favorite_speakers: 'favorite_speakers', + interested_sessions: 'interested_sessions', + attending_sessions: 'attending_sessions', + publicSchedule: 'publicSchedule', + notifications: 'notifications', + appState_bogota: 'appState_bogota', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + + +exports.Prisma.ModelName = { + VerificationToken: 'VerificationToken', + Account: 'Account' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/yarn.lock b/yarn.lock index a19f604..8119adf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -819,21 +819,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@mapbox/node-pre-gyp@^1.0.0": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c" - integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA== - dependencies: - detect-libc "^2.0.0" - https-proxy-agent "^5.0.0" - make-dir "^3.1.0" - node-fetch "^2.6.7" - nopt "^5.0.0" - npmlog "^5.0.1" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.11" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -972,22 +957,60 @@ dependencies: "@octokit/openapi-types" "^16.0.0" -"@prisma/client@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.11.0.tgz#41d5664dea4172c954190a432f70b86d3e2e629b" - integrity sha512-0INHYkQIqgAjrt7NzhYpeDQi8x3Nvylc2uDngKyFDDj1tTRQ4uV1HnVmd1sQEraeVAN63SOK0dgCKQHlvjL0KA== +"@prisma/client@^5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.11.0.tgz#d8e55fab85163415b2245fb408b9106f83c8106d" + integrity sha512-SWshvS5FDXvgJKM/a0y9nDC1rqd7KG0Q6ZVzd+U7ZXK5soe73DJxJJgbNBt2GNXOa+ysWB4suTpdK5zfFPhwiw== + +"@prisma/debug@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.11.0.tgz#80e3f9d5a8f678c67a8783f7fcdda3cbbb8dd091" + integrity sha512-N6yYr3AbQqaiUg+OgjkdPp3KPW1vMTAgtKX6+BiB/qB2i1TjLYCrweKcUjzOoRM5BriA4idrkTej9A9QqTfl3A== + +"@prisma/engines-version@5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102": + version "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102.tgz#a7aa218b1ebf1077798c931632461aae8ce6a8f7" + integrity sha512-WXCuyoymvrS4zLz4wQagSsc3/nE6CHy8znyiMv8RKazKymOMd5o9FP5RGwGHAtgoxd+aB/BWqxuP/Ckfu7/3MA== + +"@prisma/engines@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.11.0.tgz#96e941c5c81ce68f3a8b4c481007d397564c5d4b" + integrity sha512-gbrpQoBTYWXDRqD+iTYMirDlF9MMlQdxskQXbhARhG6A/uFQjB7DZMYocMQLoiZXO/IskfDOZpPoZE8TBQKtEw== dependencies: - "@prisma/engines-version" "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" + "@prisma/debug" "5.11.0" + "@prisma/engines-version" "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102" + "@prisma/fetch-engine" "5.11.0" + "@prisma/get-platform" "5.11.0" -"@prisma/engines-version@4.11.0-57.8fde8fef4033376662cad983758335009d522acb": - version "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.11.0-57.8fde8fef4033376662cad983758335009d522acb.tgz#74af5ff56170c78e93ce46c56510160f58cd3c01" - integrity sha512-3Vd8Qq06d5xD8Ch5WauWcUUrsVPdMC6Ge8ILji8RFfyhUpqon6qSyGM0apvr1O8n8qH8cKkEFqRPsYjuz5r83g== +"@prisma/fetch-engine@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.11.0.tgz#cd7a2fa5b5d89f1da0689e329c56fa69223fba7d" + integrity sha512-994viazmHTJ1ymzvWugXod7dZ42T2ROeFuH6zHPcUfp/69+6cl5r9u3NFb6bW8lLdNjwLYEVPeu3hWzxpZeC0w== + dependencies: + "@prisma/debug" "5.11.0" + "@prisma/engines-version" "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102" + "@prisma/get-platform" "5.11.0" -"@prisma/engines@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.11.0.tgz#c99749bfe20f58e8f4d2b5e04fee0785eba440e1" - integrity sha512-0AEBi2HXGV02cf6ASsBPhfsVIbVSDC9nbQed4iiY5eHttW9ZtMxHThuKZE1pnESbr8HRdgmFSa/Kn4OSNYuibg== +"@prisma/get-platform@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.11.0.tgz#19a768127b1712c27f5dec8a0a79a4c9675829eb" + integrity sha512-rxtHpMLxNTHxqWuGOLzR2QOyQi79rK1u1XYAVLZxDGTLz/A+uoDnjz9veBFlicrpWjwuieM4N6jcnjj/DDoidw== + dependencies: + "@prisma/debug" "5.11.0" + +"@puppeteer/browsers@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.2.0.tgz#25b5c6d1c93eb91e7086ebc95b767fe7b3ee5ec4" + integrity sha512-MC7LxpcBtdfTbzwARXIkqGZ1Osn3nnZJlm+i0+VqHl72t//Xwl9wICrXT8BwtgC6s1xJNHsxOpvzISUqe92+sw== + dependencies: + debug "4.3.4" + extract-zip "2.0.1" + progress "2.0.3" + proxy-agent "6.4.0" + semver "7.6.0" + tar-fs "3.0.5" + unbzip2-stream "1.4.3" + yargs "17.7.2" "@sinclair/typebox@^0.25.16": version "0.25.24" @@ -1013,6 +1036,11 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -1288,9 +1316,9 @@ "@types/yargs-parser" "*" "@types/yauzl@^2.9.1": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" - integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== dependencies: "@types/node" "*" @@ -1418,6 +1446,13 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.1.3: version "4.3.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255" @@ -1499,14 +1534,6 @@ anymatch@^3.0.3, anymatch@~3.1.2: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - are-we-there-yet@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" @@ -1547,6 +1574,13 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -1557,6 +1591,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +b4a@^1.6.4: + version "1.6.6" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba" + integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== + babel-jest@^29.5.0: version "29.5.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" @@ -1622,11 +1661,43 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +bare-events@^2.0.0, bare-events@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.2.1.tgz#7b6d421f26a7a755e20bf580b727c84b807964c1" + integrity sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A== + +bare-fs@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-2.2.2.tgz#286bf54cc6f15f613bee6bb26f0c61c79fb14f06" + integrity sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA== + dependencies: + bare-events "^2.0.0" + bare-os "^2.0.0" + bare-path "^2.0.0" + streamx "^2.13.0" + +bare-os@^2.0.0, bare-os@^2.1.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-2.2.1.tgz#c94a258c7a408ca6766399e44675136c0964913d" + integrity sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w== + +bare-path@^2.0.0, bare-path@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-2.1.0.tgz#830f17fd39842813ca77d211ebbabe238a88cb4c" + integrity sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw== + dependencies: + bare-os "^2.1.0" + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +basic-ftp@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" + integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== + bech32@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" @@ -1642,6 +1713,13 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bl@^4.0.3: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -1845,12 +1923,14 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -chromium-bidi@0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.4.4.tgz#44f25d4fa5d2f3debc3fc3948d0657194cac4407" - integrity sha512-4BX5cSaponuvVT1+SbLYTOAgDoVtX/Khoc9UsbFJ/AsPVUeFAM3RiIDFI6XFhLYMi9WmVJqh1ZH+dRpNKkKwiQ== +chromium-bidi@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.13.tgz#e16512d77b161f2f92da91a48ea2ec4185668549" + integrity sha512-OHbYCetDxdW/xmlrafgOiLsIrw4Sp1BEeolbZ1UGJO5v/nekQOJBj/Kzyw6sqKcAVabUTo0GS3cTYgr6zIf00g== dependencies: - mitt "3.0.0" + mitt "3.0.1" + urlpattern-polyfill "10.0.0" + zod "3.22.4" ci-info@^3.2.0: version "3.8.0" @@ -1933,7 +2013,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.2, color-support@^1.1.3: +color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -1965,7 +2045,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -console-control-strings@^1.0.0, console-control-strings@^1.1.0: +console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -2015,15 +2095,15 @@ cors@^2.8.5: object-assign "^4" vary "^1" -cosmiconfig@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.0.tgz#947e174c796483ccf0a48476c24e4fefb7e1aea8" - integrity sha512-0tLZ9URlPGU7JsKq0DQOQ3FoRsYX8xDZ7xMiATQfaiGMz7EHowNkbU9u1coAOmnh9p/1ySpm0RB3JNWRXM5GCg== +cosmiconfig@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== dependencies: - import-fresh "^3.2.1" + env-paths "^2.2.1" + import-fresh "^3.3.0" js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" + parse-json "^5.2.0" create-require@^1.1.0: version "1.1.1" @@ -2046,6 +2126,11 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + dayjs@^1.11.7: version "1.11.7" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" @@ -2072,11 +2157,23 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -2087,6 +2184,15 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og== +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -2127,10 +2233,10 @@ devtools-protocol@0.0.1045489: resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz#f959ad560b05acd72d55644bc3fb8168a83abf28" integrity sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ== -devtools-protocol@0.0.1094867: - version "0.0.1094867" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz#2ab93908e9376bd85d4e0604aa2651258f13e374" - integrity sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ== +devtools-protocol@0.0.1249869: + version "0.0.1249869" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1249869.tgz#000c3cf1afc189a18db98135a50d4a8f95a47d29" + integrity sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg== dezalgo@^1.0.4: version "1.0.4" @@ -2236,7 +2342,7 @@ entities@~3.0.1: resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== -env-paths@^2.2.0: +env-paths@^2.2.0, env-paths@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== @@ -2278,6 +2384,17 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + eslint-config-prettier@^8.6.0: version "8.7.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz#f1cc58a8afebc50980bd53475451df146c13182d" @@ -2378,7 +2495,7 @@ espree@^9.4.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -2459,6 +2576,11 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + expect@^29.0.0, expect@^29.5.0: version "29.5.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" @@ -2535,6 +2657,11 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-fifo@^1.1.0, fast-fifo@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -2589,6 +2716,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2672,6 +2804,15 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -2694,21 +2835,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.2" - gauge@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" @@ -2759,6 +2885,21 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-uri@^6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" + integrity sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + fs-extra "^11.2.0" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -2809,6 +2950,11 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -2830,12 +2976,12 @@ gray-matter@^4.0.3: strip-bom-string "^1.0.0" handlebars@*, handlebars@^4.7.7: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + version "4.7.8" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" - neo-async "^2.6.0" + neo-async "^2.6.2" source-map "^0.6.1" wordwrap "^1.0.0" optionalDependencies: @@ -2925,6 +3071,14 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -2933,6 +3087,14 @@ https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.2, https-proxy-agent@^7.0.3: + version "7.0.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" + integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -2984,7 +3146,7 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3028,6 +3190,19 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" @@ -3557,6 +3732,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3582,6 +3762,15 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -3703,7 +3892,12 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-dir@^3.0.0, make-dir@^3.1.0: +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -3825,6 +4019,11 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -3842,7 +4041,7 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -3906,12 +4105,12 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -mitt@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.0.tgz#69ef9bd5c80ff6f57473e8d89326d01c414be0bd" - integrity sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ== +mitt@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" + integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== -mkdirp-classic@^0.5.2: +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== @@ -3936,6 +4135,11 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -3951,15 +4155,27 @@ negotiator@0.6.3, negotiator@^0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.0: +neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-addon-api@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" - integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== +netmask@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" + integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== + +node-abi@^3.3.0: + version "3.56.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.56.0.tgz#ca807d5ff735ac6bbbd684ae3ff2debc1c2a40a7" + integrity sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q== + dependencies: + semver "^7.3.5" + +node-addon-api@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb" + integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== node-fetch@2.6.7: version "2.6.7" @@ -4050,16 +4266,6 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" - integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== - dependencies: - are-we-there-yet "^2.0.0" - console-control-strings "^1.1.0" - gauge "^3.0.0" - set-blocking "^2.0.0" - npmlog@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -4070,7 +4276,7 @@ npmlog@^6.0.0: gauge "^4.0.3" set-blocking "^2.0.0" -object-assign@^4, object-assign@^4.1.1: +object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -4160,6 +4366,28 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pac-proxy-agent@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz#6b9ddc002ec3ff0ba5fdf4a8a21d363bcc612d75" + integrity sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.0.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.2" + pac-resolver "^7.0.0" + socks-proxy-agent "^8.0.2" + +pac-resolver@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -4167,7 +4395,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^5.0.0, parse-json@^5.2.0: +parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -4254,6 +4482,24 @@ pnglib@0.0.1: resolved "https://registry.yarnpkg.com/pnglib/-/pnglib-0.0.1.tgz#f9ab6f9c688f4a9d579ad8be28878a716e30c096" integrity sha512-95ChzOoYLOPIyVmL+Y6X+abKGXUJlvOVLkB1QQkyXl7Uczc6FElUy/x01NS7r2GX6GRezloO/ecCX9h4U9KadA== +prebuild-install@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.2.tgz#a5fd9986f5a6251fbc47e1e5c65de71e68c0a056" + integrity sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -4280,12 +4526,12 @@ pretty-format@^29.0.0, pretty-format@^29.5.0: ansi-styles "^5.0.0" react-is "^18.0.0" -prisma@^4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.11.0.tgz#9695ba4129a43eab3e76b5f7a033c6c020377725" - integrity sha512-4zZmBXssPUEiX+GeL0MUq/Yyie4ltiKmGu7jCJFnYMamNrrulTBc+D+QwAQSJ01tyzeGHlD13kOnqPwRipnlNw== +prisma@^5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.11.0.tgz#ef3891f79921a2deec6f540eba13a3cc8525f6d2" + integrity sha512-KCLiug2cs0Je7kGkQBN9jDWoZ90ogE/kvZTUTgz2h94FEo8pczCkPH7fPNXkD1sGU7Yh65risGGD1HQ5DF3r3g== dependencies: - "@prisma/engines" "4.11.0" + "@prisma/engines" "5.11.0" progress@2.0.3: version "2.0.3" @@ -4321,7 +4567,21 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@1.1.0: +proxy-agent@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" + integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.3" + lru-cache "^7.14.1" + pac-proxy-agent "^7.0.1" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.2" + +proxy-from-env@1.1.0, proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== @@ -4360,32 +4620,25 @@ puppeteer-core@18.2.1: unbzip2-stream "1.4.3" ws "8.9.0" -puppeteer-core@19.7.3: - version "19.7.3" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-19.7.3.tgz#fc5b7ac3d8e9363265bb96f816cb834991c51beb" - integrity sha512-9Q5HahsstfoTnllcpNkxNu2z9J7V0Si5Mr5q90K6XSXwW1P8iqe8q3HzWViVuBuEYTSMZ2LaXXzTEYeoCzLEWg== +puppeteer-core@22.5.0: + version "22.5.0" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.5.0.tgz#9d7767aaa5961f0e7fa0127ea38e1541e7f8c685" + integrity sha512-bcfmM1nNSysjnES/ZZ1KdwFAFFGL3N76qRpisBb4WL7f4UAD4vPDxlhKZ1HJCDgMSWeYmeder4kftyp6lKqMYg== dependencies: - chromium-bidi "0.4.4" - cross-fetch "3.1.5" + "@puppeteer/browsers" "2.2.0" + chromium-bidi "0.5.13" debug "4.3.4" - devtools-protocol "0.0.1094867" - extract-zip "2.0.1" - https-proxy-agent "5.0.1" - proxy-from-env "1.1.0" - tar-fs "2.1.1" - unbzip2-stream "1.4.3" - ws "8.12.1" + devtools-protocol "0.0.1249869" + ws "8.16.0" puppeteer@*: - version "19.7.3" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-19.7.3.tgz#3cf3af65aaf425d13f18dfb67cbe2c3dae913c4e" - integrity sha512-QEiRHPUAJp8VOK27zE6h2ne4xKVYibKUZpvjCuLYaAe8/2SOLKIgstF8wK3YaLgTkeruMrYfqZo+Qlw4ZkJDAQ== + version "22.5.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.5.0.tgz#b20ac97aebf604f0e15068cfc9f18eeedfadf3cb" + integrity sha512-PNVflixb6w3FMhehYhLcaQHTCcNKVkjxekzyvWr0n0yBnhUYF0ZhiG4J1I14Mzui2oW8dGvUD8kbXj0GiN1pFg== dependencies: - cosmiconfig "8.1.0" - https-proxy-agent "5.0.1" - progress "2.0.3" - proxy-from-env "1.1.0" - puppeteer-core "19.7.3" + "@puppeteer/browsers" "2.2.0" + cosmiconfig "9.0.0" + puppeteer-core "22.5.0" puppeteer@18.2.1: version "18.2.1" @@ -4421,6 +4674,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -4436,12 +4694,31 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.1.1, readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.6.0: version "3.6.1" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== @@ -4542,7 +4819,7 @@ rxjs@^7.8.0: dependencies: tslib "^2.1.0" -safe-buffer@5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -4560,6 +4837,13 @@ section-matter@^1.0.0: extend-shallow "^2.0.1" kind-of "^6.0.0" +semver@7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + semver@7.x, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" @@ -4642,11 +4926,25 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + simple-update-notifier@^1.0.7: version "1.1.0" resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" @@ -4709,6 +5007,15 @@ socks-proxy-agent@^6.0.0: debug "^4.3.3" socks "^2.6.2" +socks-proxy-agent@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz#5acbd7be7baf18c46a3f293a840109a430a640ad" + integrity sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + socks "^2.7.1" + socks@^2.6.2: version "2.7.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" @@ -4717,6 +5024,14 @@ socks@^2.6.2: ip "^2.0.0" smart-buffer "^4.2.0" +socks@^2.7.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.1.tgz#22c7d9dd7882649043cba0eafb49ae144e3457af" + integrity sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -4725,23 +5040,29 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sqlite3@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.1.4.tgz#35f83d368963168b324ad2f0fffce09f3b8723a7" - integrity sha512-i0UlWAzPlzX3B5XP2cYuhWQJsTtlMD6obOa1PgeEQ4DHEXUuyJkgv50I3isqZAP5oFc2T8OFvakmDh2W6I+YpA== +sqlite3@^5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.1.7.tgz#59ca1053c1ab38647396586edad019b1551041b7" + integrity sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog== dependencies: - "@mapbox/node-pre-gyp" "^1.0.0" - node-addon-api "^4.2.0" + bindings "^1.5.0" + node-addon-api "^7.0.0" + prebuild-install "^7.1.1" tar "^6.1.11" optionalDependencies: node-gyp "8.x" @@ -4765,6 +5086,16 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +streamx@^2.13.0, streamx@^2.15.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.16.1.tgz#2b311bd34832f08aa6bb4d6a80297c9caef89614" + integrity sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ== + dependencies: + fast-fifo "^1.1.0" + queue-tick "^1.0.1" + optionalDependencies: + bare-events "^2.2.0" + string-argv@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" @@ -4847,6 +5178,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + superagent@^8.0.5: version "8.0.9" resolved "https://registry.yarnpkg.com/superagent/-/superagent-8.0.9.tgz#2c6fda6fadb40516515f93e9098c0eb1602e0535" @@ -4919,7 +5255,7 @@ swagger-ui-express@^4.6.0: dependencies: swagger-ui-dist ">=4.11.0" -tar-fs@2.1.1: +tar-fs@2.1.1, tar-fs@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== @@ -4929,6 +5265,17 @@ tar-fs@2.1.1: pump "^3.0.0" tar-stream "^2.1.4" +tar-fs@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.5.tgz#f954d77767e4e6edf973384e1eb95f8f81d64ed9" + integrity sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg== + dependencies: + pump "^3.0.0" + tar-stream "^3.1.5" + optionalDependencies: + bare-fs "^2.1.1" + bare-path "^2.1.0" + tar-stream@^2.1.4: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" @@ -4940,6 +5287,15 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^3.1.5: + version "3.1.7" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" + integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + tar@^6.0.2, tar@^6.1.11, tar@^6.1.2: version "6.1.13" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.13.tgz#46e22529000f612180601a6fe0680e7da508847b" @@ -5052,6 +5408,11 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tslib@^2.1.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -5064,6 +5425,13 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -5141,6 +5509,11 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -5161,6 +5534,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urlpattern-polyfill@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" + integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== + util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -5217,7 +5595,7 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@^1.1.2, wide-align@^1.1.5: +wide-align@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -5270,10 +5648,10 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@8.12.1: - version "8.12.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.1.tgz#c51e583d79140b5e42e39be48c934131942d4a8f" - integrity sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew== +ws@8.16.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== ws@8.9.0: version "8.9.0" @@ -5305,6 +5683,19 @@ yargs-parser@^21.0.1, yargs-parser@^21.1.1: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== +yargs@17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yargs@^17.3.1: version "17.7.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" @@ -5335,3 +5726,8 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zod@3.22.4: + version "3.22.4" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" + integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==