Gigantic output on error
See original GitHub issueThis simple script:
const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
prisma.foo.create({
data: {
bar: 1.2345
}
})
cerates this gigantic output because of an error:
C:\Users\Jan\Documents\throwaway\1832\node_modules\@prisma\client\runtime\index.js:1
require('./sourcemap-register.js');module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var r=n[t]={i:t,l:false,exports:{}};e[t].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(728)}t(__webpack_require__);return startup()}({7:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.platforms=["darwin","debian-openssl-1.0.x","debian-openssl-1.1.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","windows"];function mayBeCompatible(e,t){if(e==="native"||t==="native"){return true}if(e==="darwin"||t==="darwin"){return false}if(e==="windows"||t==="windows"){return false}return true}t.mayBeCompatible=mayBeCompatible},33:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(87));const s=r(n(747));const o=n(669);const a=n(129);const u=r(n(426));const l=u.default("getos");const c=o.promisify(s.default.readFile);const f=o.promisify(s.default.exists);async function getos(){const e=i.default.platform();if(e!=="linux"){return{platform:e}}return{platform:"linux",libssl:await getOpenSSLVersion(),distro:await resolveDistro()}}t.getos=getos;function parseDistro(e){const t=/^ID="?([^"\n]*)"?$/im;const n=/^ID_LIKE="?([^"\n]*)"?$/im;const r=e.match(t);const i=r&&r[1]&&r[1].toLowerCase()||"";const s=e.match(n);const o=s&&s[1]&&s[1].toLowerCase()||"";if(o.includes("centos")||o.includes("fedora")||o.includes("rhel")||i==="fedora"){return"rhel"}if(o.includes("debian")||o.includes("ubuntu")||i==="debian"){return"debian"}return}t.parseDistro=parseDistro;async function resolveDistro(){const e="/etc/os-release";if(!await f(e)){return}const t=await c(e,"utf-8");return parseDistro(t)}t.resolveDistro=resolveDistro;function parseOpenSSLVersion(e){const t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){return t[1]+".x"}return}t.parseOpenSSLVersion=parseOpenSSLVersion;async function getOpenSSLVersion(){const[e,t]=await Promise.all([gracefulExec(`openssl version -v`),gracefulExec(`\n ls -l /lib64 | grep ssl;\n ls -l /usr/lib64 | grep ssl;\n `)]);l({version:e});l({ls:t});if(e){const t=parseOpenSSLVersion(e);if(t){return t}}if(t){const e=/libssl\.so\.(\d+\.\d+)\.\d+/.exec(t);if(e){return e[1]+".x"}}return undefined}t.getOpenSSLVersion=getOpenSSLVersion;async function gracefulExec(e){return new Promise(t=>{try{a.exec(e,(e,n,r)=>{t(String(n))})}catch(e){t(undefined);return undefined}})}async function getPlatform(){const{platform:e,libssl:t,distro:n}=await getos();l({platform:e,libssl:t});if(e==="darwin"){return"darwin"}if(e==="win32"){return"windows"}if(e==="linux"&&n&&t){return n+"-openssl-"+t}if(t){return"debian-openssl-"+t}if(n){return n+"-openssl-1.1.x"}return"debian-openssl-1.1.x"}t.getPlatform=getPlatform},46:function(e){var t=1e3;var n=t*60;var r=n*60;var i=r*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=r){return Math.round(e/r)+"h"}if(s>=n){return Math.round(e/n)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=r){return plural(e,s,r,"hour")}if(s>=n){return plural(e,s,n,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+" "+r+(i?"s":"")}},60:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(884));function printGeneratorConfig(e){return String(new GeneratorConfigClass(e))}t.printGeneratorConfig=printGeneratorConfig;class GeneratorConfigClass{constructor(e){this.config=e}toString(){const{config:e}=this;const t=JSON.parse(JSON.stringify({provider:e.provider,binaryTargets:e.binaryTargets||undefined}));return`generator ${e.name} {\n${i.default(printDatamodelObject(t),2)}\n}`}}t.GeneratorConfigClass=GeneratorConfigClass;function printDatamodelObject(e){const t=Object.keys(e).reduce((e,t)=>Math.max(e,t.length),0);return Object.entries(e).map(([e,n])=>`${e.padEnd(t)} = ${niceStringify(n)}`).join("\n")}t.printDatamodelObject=printDatamodelObject;function niceStringify(e){return JSON.parse(JSON.stringify(e,(e,t)=>{if(Array.isArray(t)){return`[${t.map(e=>JSON.stringify(e)).join(", ")}]`}return JSON.stringify(t)}))}},79:function(__unusedmodule,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});const Engine_1=__webpack_require__(550);const debug_1=__importDefault(__webpack_require__(426));const get_platform_1=__webpack_require__(400);const path_1=__importDefault(__webpack_require__(622));const net_1=__importDefault(__webpack_require__(631));const fs_1=__importDefault(__webpack_require__(747));const chalk_1=__importDefault(__webpack_require__(179));const printGeneratorConfig_1=__webpack_require__(60);const util_1=__webpack_require__(818);const util_2=__webpack_require__(669);const events_1=__importDefault(__webpack_require__(614));const log_1=__webpack_require__(906);const child_process_1=__webpack_require__(129);const byline_1=__importDefault(__webpack_require__(156));const bent_1=__importDefault(__webpack_require__(727));const debug=debug_1.default("engine");const exists=util_2.promisify(fs_1.default.exists);const knownPlatforms=["native","darwin","debian-openssl-1.0.x","debian-openssl-1.1.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","windows"];const children=[];process.on("beforeExit",()=>{for(const e of children){if(!e.killed){e.kill()}}});class NodeEngine{constructor({cwd:e,datamodelPath:t,prismaPath:n,generator:r,datasources:i,showColors:s,logLevel:o,logQueries:a,env:u,flags:l,...c}){this.exiting=false;this.managementApiEnabled=false;this.ready=false;this.stderrLogs="";this.stdoutLogs="";this.fail=(async(e,t)=>{debug(e,t);await this.stop()});this.env=u;this.cwd=this.resolveCwd(e);this.debug=c.debug||false;this.datamodelPath=t;this.prismaPath=process.env.PRISMA_QUERY_ENGINE_BINARY||n;this.generator=r;this.datasources=i;this.logEmitter=new events_1.default;this.showColors=s||false;this.logLevel=o;this.logQueries=a||false;this.flags=l||[];this.logEmitter.on("error",e=>{if(this.debug){debug_1.default("engine:log")(e)}this.lastErrorLog=e;if(e.fields.message==="PANIC"){this.handlePanic(e)}});if(this.platform){if(!knownPlatforms.includes(this.platform)&&!fs_1.default.existsSync(this.platform)){throw new Engine_1.PrismaClientInitializationError(`Unknown ${chalk_1.default.red("PRISMA_QUERY_ENGINE_BINARY")} ${chalk_1.default.redBright.bold(this.platform)}. Possible binaryTargets: ${chalk_1.default.greenBright(knownPlatforms.join(", "))} or a path to the query engine binary.\nYou may have to run ${chalk_1.default.greenBright("prisma2 generate")} for your changes to take effect.`)}}else{this.getPlatform()}if(this.debug){debug_1.default.enable("*")}}resolveCwd(e){if(e&&fs_1.default.existsSync(e)&&fs_1.default.lstatSync(e).isDirectory()){return e}return process.cwd()}on(e,t){this.logEmitter.on(e,t)}async getPlatform(){if(this.platformPromise){return this.platformPromise}this.platformPromise=get_platform_1.getPlatform();return this.platformPromise}getQueryEnginePath(e,t=__dirname){let n=path_1.default.join(t,`query-engine-${e}`);if(e==="windows"){n=`${n}.exe`}return n}handlePanic(e){this.child.kill();if(this.currentRequestPromise){this.currentRequestPromise.cancel()}}async resolvePrismaPath(){if(this.prismaPath){return this.prismaPath}const platform=await this.getPlatform();if(this.platform&&this.platform!==platform){this.incorrectlyPinnedPlatform=this.platform}this.platform=this.platform||platform;const fileName=eval(`require('path').basename(__filename)`);if(fileName==="NodeEngine.js"){return this.getQueryEnginePath(this.platform,path_1.default.resolve(__dirname,`..`))}else{return this.getQueryEnginePath(this.platform)}}async getPrismaPath(){const e=await this.resolvePrismaPath();const t=await this.getPlatform();if(!await exists(e)){const n=this.incorrectlyPinnedPlatform?`\nYou incorrectly pinned it to ${chalk_1.default.redBright.bold(`${this.incorrectlyPinnedPlatform}`)}\n`:"";let r=`Query engine binary for current platform "${chalk_1.default.bold(t)}" could not be found.${n}\nThis probably happens, because you built Prisma Client on a different platform.\n(Prisma Client looked in "${chalk_1.default.underline(e)}")`;if(this.generator){if(this.generator.binaryTargets.includes(this.platform)||this.generator.binaryTargets.includes("native")){r+=`\n\nYou already added the platform${this.generator.binaryTargets.length>1?"s":""} ${this.generator.binaryTargets.map(e=>`"${chalk_1.default.bold(e)}"`).join(", ")} to the "${chalk_1.default.underline("generator")}" block\nin the "schema.prisma" file as described in https://pris.ly/d/client-generator,\nbut something went wrong. That's suboptimal.\n\nPlease create an issue at https://github.com/prisma/prisma-client-js/issues/new`}else{r+=`\n\nTo solve this problem, add the platform "${this.platform}" to the "${chalk_1.default.underline("generator")}" block in the "schema.prisma" file:\n${chalk_1.default.greenBright(this.getFixedGenerator())}\n\nThen run "${chalk_1.default.greenBright("prisma2 generate")}" for your changes to take effect.\nRead more about deploying Prisma Client: https://pris.ly/d/client-generator`}}else{r+=`\n\nRead more about deploying Prisma Client: https://pris.ly/d/client-generator\n`}throw new Engine_1.PrismaClientInitializationError(r)}if(this.incorrectlyPinnedPlatform){console.log(`${chalk_1.default.yellow("Warning:")} You pinned the platform ${chalk_1.default.bold(this.incorrectlyPinnedPlatform)}, but Prisma Client detects ${chalk_1.default.bold(await this.getPlatform())}.\nThis means you should very likely pin the platform ${chalk_1.default.greenBright(await this.getPlatform())} instead.\n${chalk_1.default.dim("In case we're mistaken, please report this to us 🙏.")}`)}if(process.platform!=="win32"){util_1.plusX(e)}return e}getFixedGenerator(){const e={...this.generator,binaryTargets:util_1.fixPlatforms(this.generator.binaryTargets,this.platform)};return printGeneratorConfig_1.printGeneratorConfig(e)}printDatasources(){if(this.datasources){return JSON.stringify(this.datasources)}return"[]"}async start(){if(!this.startPromise){this.startPromise=this.internalStart()}return this.startPromise}internalStart(){return new Promise(async(e,t)=>{try{this.port=await this.getFreePort();const n={PRISMA_DML_PATH:this.datamodelPath,PORT:String(this.port),RUST_BACKTRACE:"1",RUST_LOG:"info"};if(this.logQueries||this.logLevel==="info"){n.RUST_LOG="info";if(this.logQueries){n.LOG_QUERIES="true"}}if(this.logLevel==="warn"){n.RUST_LOG="warn"}if(this.datasources){n.OVERWRITE_DATASOURCES=this.printDatasources()}if(!process.env.NO_COLOR&&this.showColors){n.CLICOLOR_FORCE="1"}debug(n);debug({cwd:this.cwd});const r=await this.getPrismaPath();const i=["--enable-raw-queries",...this.flags];debug({flags:i});this.child=child_process_1.spawn(r,i,{env:{...this.env,...process.env,...n},cwd:this.cwd,stdio:["ignore","pipe","pipe"]});children.push(this.child);byline_1.default(this.child.stderr).on("data",e=>{const t=String(e);debug("stderr",t);try{const e=JSON.parse(t);if(typeof e.is_panic!=="undefined"){debug(e);this.lastError=e;if(this.engineStartDeferred){const e=new Engine_1.PrismaClientInitializationError(this.lastError.message);this.engineStartDeferred.reject(e)}}}catch(e){if(!t.includes("Printing to stderr")&&!t.includes("Listening on ")){this.stderrLogs+="\n"+t}}});byline_1.default(this.child.stdout).on("data",e=>{var t;const n=String(e);try{const e=JSON.parse(n);debug("stdout",e);if(this.engineStartDeferred&&e.level==="INFO"&&e.target==="prisma::server"&&((t=e.fields)===null||t===void 0?void 0:t.message.startsWith("Started http server"))){this.engineStartDeferred.resolve();this.engineStartDeferred=undefined}if(typeof e.is_panic==="undefined"){const t=log_1.convertLog(e);this.logEmitter.emit(t.level,t)}else{this.lastError=e}}catch(e){}});this.child.on("exit",(e,t)=>{this.exitCode=e;if(e!==0&&this.engineStartDeferred){const e=new Engine_1.PrismaClientInitializationError(this.stderrLogs);this.engineStartDeferred.reject(e)}if(!this.child){return}if(this.lastError){return}if(this.lastErrorLog){this.lastErrorLog.target="exit";return}if(e===126){this.lastErrorLog={timestamp:new Date,target:"exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system.\nYou very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}}else{this.lastErrorLog={target:"exit",timestamp:new Date,level:"error",fields:{message:(this.stderrLogs||"")+(this.stdoutLogs||"")+`\nExit code: ${e}`}}}});this.child.on("error",e=>{this.lastError={message:e.message,backtrace:"Could not start query engine",is_panic:false};t(e)});this.child.on("close",(e,t)=>{var n;if(e===null&&t==="SIGABRT"&&this.child){console.error(`${chalk_1.default.bold.red(`Error in Prisma Client:`)}${this.stderrLogs}\n\nThis is a non-recoverable error which probably happens when the Prisma Query Engine has a stack overflow.\nPlease create an issue in https://github.com/prisma/prisma-client-js describing the last Prisma Client query you called.`)}else if(e===255&&t===null&&((n=this.lastErrorLog)===null||n===void 0?void 0:n.fields.message)==="PANIC"){console.error(`${chalk_1.default.bold.red(`Error in Prisma Client:`)}\n${this.lastErrorLog.fields.message}: ${this.lastErrorLog.fields.reason} in\n${this.lastErrorLog.fields.file}:${this.lastErrorLog.fields.line}:${this.lastErrorLog.fields.column}\n\nThis is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.\nPlease create an issue in https://github.com/prisma/prisma-client-js describing the last Prisma Client query you called.`)}});if(this.lastError){return t(new Engine_1.PrismaClientInitializationError(Engine_1.getMessage(this.lastError)))}if(this.lastErrorLog){return t(new Engine_1.PrismaClientInitializationError(Engine_1.getMessage(this.lastErrorLog)))}try{await new Promise((e,t)=>{this.engineStartDeferred={resolve:e,reject:t}})}catch(e){await this.child.kill();throw e}const s=`http://localhost:${this.port}`;this.url=s;e()}catch(e){t(e)}})}async stop(){await this.start();if(this.currentRequestPromise){try{await this.currentRequestPromise}catch(e){}}if(this.child){debug(`Stopping Prisma engine`);this.exiting=true;await this.child.kill();delete this.child}}getFreePort(){return new Promise((e,t)=>{const n=net_1.default.createServer(e=>e.end(""));n.unref();n.on("error",t);n.listen(0,()=>{const r=n.address();const i=typeof r==="string"?parseInt(r.split(":").slice(-1)[0],10):r.port;n.close(n=>{if(n){t(n)}e(i)})})})}trimPort(e){return e.split("\n").filter(e=>!e.startsWith("port:")).join("\n")}async request(e){await this.start();if(!this.child){throw new Engine_1.PrismaClientUnknownRequestError(`Can't perform request, as the Engine has already been stopped`)}const t={};const n={query:e,variables:t};const r=bent_1.default(this.url,"POST","json",200);this.currentRequestPromise=r("/",n);return this.currentRequestPromise.then(e=>{if(e.errors){if(e.errors.length===1){throw this.graphQLToJSError(e.errors[0])}throw new Error(JSON.stringify(e.errorrs))}return e}).catch(e=>{debug({error:e});if(this.currentRequestPromise.isCanceled&&this.lastError){if(this.lastError.is_panic){throw new Engine_1.PrismaClientRustPanicError(Engine_1.getMessage(this.lastError))}else{throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastError))}}if(this.currentRequestPromise.isCanceled&&this.lastErrorLog){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastErrorLog))}if(e.code&&e.code==="ECONNRESET"||e.code==="ECONNREFUSED"){if(this.lastError){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastError))}if(this.lastErrorLog){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastErrorLog))}const e=this.stderrLogs||this.stdoutLogs;throw new Engine_1.PrismaClientUnknownRequestError(e)}throw e})}async requestBatch(e){await this.start();if(!this.child){throw new Engine_1.PrismaClientUnknownRequestError(`Can't perform request, as the Engine has already been stopped`)}const t={};const n={batch:e.map(e=>({query:e,variables:t}))};const r=bent_1.default(this.url,"POST","json",200);this.currentRequestPromise=r("/",n);return this.currentRequestPromise.then(e=>{if(Array.isArray(e)){return e.map(e=>{if(e.errors){return this.graphQLToJSError(e.errors[0])}return e})}else{if(e.errors&&e.errors.length===1){throw new Error(e.errors[0].error)}throw new Error(JSON.stringify(e))}}).catch(e=>{debug({error:e});if(this.currentRequestPromise.isCanceled&&this.lastError){if(this.lastError.is_panic){throw new Engine_1.PrismaClientRustPanicError(Engine_1.getMessage(this.lastError))}else{throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastError))}}if(this.currentRequestPromise.isCanceled&&this.lastErrorLog){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastErrorLog))}if(e.code&&e.code==="ECONNRESET"||e.code==="ECONNREFUSED"){if(this.lastError){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastError))}if(this.lastErrorLog){throw new Engine_1.PrismaClientUnknownRequestError(Engine_1.getMessage(this.lastErrorLog))}const e=this.stderrLogs||this.stdoutLogs;throw new Engine_1.PrismaClientUnknownRequestError(e)}throw e})}graphQLToJSError(e){if(e.user_facing_error.error_code){return new Engine_1.PrismaClientKnownRequestError(e.user_facing_error.message,e.user_facing_error.error_code,e.user_facing_error.meta)}return new Engine_1.PrismaClientUnknownRequestError(e.user_facing_error.message)}}exports.NodeEngine=NodeEngine},83:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(994);var i={};var s=0;t.Prism={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Token){const n=e;return new Token(n.type,t.Prism.util.encode(n.content),n.alias)}else if(Array.isArray(e)){return e.map(t.Prism.util.encode)}else{return e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")}},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){if(!e["__id"]){Object.defineProperty(e,"__id",{value:++s})}return e["__id"]},clone:function deepClone(e,n){var r,i,s=t.Prism.util.type(e);n=n||{};switch(s){case"Object":i=t.Prism.util.objId(e);if(n[i]){return n[i]}r={};n[i]=r;for(var o in e){if(e.hasOwnProperty(o)){r[o]=deepClone(e[o],n)}}return r;case"Array":i=t.Prism.util.objId(e);if(n[i]){return n[i]}r=[];n[i]=r;e.forEach(function(e,t){r[t]=deepClone(e,n)});return r;default:return e}}},languages:{extend:function(e,n){var r=t.Prism.util.clone(t.Prism.languages[e]);for(var i in n){r[i]=n[i]}return r},insertBefore:function(e,n,r,i){i=i||t.Prism.languages;var s=i[e];var o={};for(var a in s){if(s.hasOwnProperty(a)){if(a==n){for(var u in r){if(r.hasOwnProperty(u)){o[u]=r[u]}}}if(!r.hasOwnProperty(a)){o[a]=s[a]}}}var l=i[e];i[e]=o;t.Prism.languages.DFS(t.Prism.languages,function(t,n){if(n===l&&t!=e){this[t]=o}});return o},DFS:function DFS(e,n,r,i){i=i||{};var s=t.Prism.util.objId;for(var o in e){if(e.hasOwnProperty(o)){n.call(e,o,e[o],r||o);var a=e[o],u=t.Prism.util.type(a);if(u==="Object"&&!i[s(a)]){i[s(a)]=true;DFS(a,n,null,i)}else if(u==="Array"&&!i[s(a)]){i[s(a)]=true;DFS(a,n,o,i)}}}}},plugins:{},highlight:function(e,n,r){var i={code:e,grammar:n,language:r};t.Prism.hooks.run("before-tokenize",i);i.tokens=t.Prism.tokenize(i.code,i.grammar);t.Prism.hooks.run("after-tokenize",i);return Token.stringify(t.Prism.util.encode(i.tokens),i.language)},matchGrammar:function(e,n,r,i,s,o,a){for(var u in r){if(!r.hasOwnProperty(u)||!r[u]){continue}if(u==a){return}var l=r[u];l=t.Prism.util.type(l)==="Array"?l:[l];for(var c=0;c<l.length;++c){var f=l[c],p=f.inside,d=!!f.lookbehind,h=!!f.greedy,g=0,m=f.alias;if(h&&!f.pattern.global){var y=f.pattern.toString().match(/[imuy]*$/)[0];f.pattern=RegExp(f.pattern.source,y+"g")}f=f.pattern||f;for(var b=i,w=s;b<n.length;w+=n[b].length,++b){var _=n[b];if(n.length>e.length){return}if(_ instanceof Token){continue}if(h&&b!=n.length-1){f.lastIndex=w;var C=f.exec(e);if(!C){break}var v=C.index+(d?C[1].length:0),T=C.index+C[0].length,E=b,P=w;for(var O=n.length;E<O&&(P<T||!n[E].type&&!n[E-1].greedy);++E){P+=n[E].length;if(v>=P){++b;w=P}}if(n[b]instanceof Token){continue}$=E-b;_=e.slice(w,P);C.index-=w}else{f.lastIndex=0;var C=f.exec(_),$=1}if(!C){if(o){break}continue}if(d){g=C[1]?C[1].length:0}var v=C.index+g,C=C[0].slice(g),T=v+C.length,A=_.slice(0,v),F=_.slice(T);var S=[b,$];if(A){++b;w+=A.length;S.push(A)}var j=new Token(u,p?t.Prism.tokenize(C,p):C,m,C,h);S.push(j);if(F){S.push(F)}Array.prototype.splice.apply(n,S);if($!=1)t.Prism.matchGrammar(e,n,r,b,w,true,u);if(o)break}}}},tokenize:function(e,n){var r=[e];var i=n.rest;if(i){for(var s in i){n[s]=i[s]}delete n.rest}t.Prism.matchGrammar(e,r,n,0,0,false);return r},hooks:{all:{},add:function(e,n){var r=t.Prism.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.Prism.hooks.all[e];if(!r||!r.length){return}for(var i=0,s;s=r[i++];){s(n)}}},Token:Token};t.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:true},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:true,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:/[{}[\];(),.:]/};t.Prism.languages.javascript=t.Prism.languages.extend("clike",{"class-name":[t.Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:true}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:true},{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:true}],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}/});t.Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;t.Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:true,greedy:true},"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:true,inside:t.Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:t.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:true,inside:t.Prism.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:true,inside:t.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});t.Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:true,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:t.Prism.languages.javascript}},string:/[\s\S]+/}}});if(t.Prism.languages.markup){t.Prism.languages.markup.tag.addInlined("script","javascript")}t.Prism.languages.js=t.Prism.languages.javascript;t.Prism.languages.typescript=t.Prism.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/});t.Prism.languages.ts=t.Prism.languages.typescript;function Token(e,t,n,r,i){this.type=e;this.content=t;this.alias=n;this.length=(r||"").length|0;this.greedy=!!i}t.Token=Token;Token.stringify=function(e,t){if(typeof e=="string"){return e}if(Array.isArray(e)){return e.map(function(e){return Token.stringify(e,t)}).join("")}return getColorForSyntaxKind(e.type)(e.content)};function getColorForSyntaxKind(e){return r.theme[e]||r.identity}},84:function(e){"use strict";const t=(e,t)=>{if(e.byteLength===t.byteLength)return e.byteLength;else if(e.byteLength>t.byteLength)return e.byteLength;return t.byteLength};const n=(e,t)=>n.from(e,t);n.sorter=((e,r)=>{e=n(e);r=n(r);const i=t(e,r);let s=0;while(s<i-1){if(s>=e.byteLength)return 1;else if(s>=r.byteLength)return-1;if(e.getUint8(s)<r.getUint8(s))return-1;else if(e.getUint8(s)>r.getUint8(s))return 1;s++}return 0});n.compare=((e,t)=>!n.sorter(e,t));n.memcopy=((e,t)=>{const r=n(e,t);return r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)});n.arrayBuffer=((e,t)=>{e=n(e,t);if(e.buffer.byteLength===e.byteLength)return e.buffer;return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)});const r=(e,t=0,r=null)=>{e=n(e);r=(r===null?e.byteLength:r)-t;return[e.buffer,e.byteOffset+t,r]};n.slice=((e,t,n)=>new DataView(...r(e,t,n)));n.memcopySlice=((e,t,n)=>{const[i,s,o]=r(e,t,n);return i.slice(s,o+s)});n.typedArray=((e,t=Uint8Array)=>{e=n(e);return new t(e.buffer,e.byteOffset,e.byteLength/t.BYTES_PER_ELEMENT)});n.concat=(e=>{e=Array.from(e);e=e.map(e=>n(e));const t=e.reduce((e,t)=>e+t.byteLength,0);const r=new Uint8Array(t);let i=0;for(const t of e){const e=n.typedArray(t);r.set(e,i);i+=e.byteLength}return r.buffer});const i=65536;n.random=(e=>{const t=new ArrayBuffer(e);if(e>i){let e=0;while(e<t.byteLength){let r;if(e+i>t.byteLength)r=t.byteLength-e;else r=i;const s=new Uint8Array(t,e,r);e+=i;n._randomFill(s)}}else{const e=new Uint8Array(t);n._randomFill(e)}return t});e.exports=n},87:function(e){e.exports=require("os")},94:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function isSpecificValue(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp?true:false}function cloneSpecificValue(e){if(e instanceof Buffer){const t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);e.copy(t);return t}else if(e instanceof Date){return new Date(e.getTime())}else if(e instanceof RegExp){return new RegExp(e)}else{throw new Error("Unexpected situation")}}function deepCloneArray(e){const n=[];e.forEach(function(e,r){if(typeof e==="object"&&e!==null){if(Array.isArray(e)){n[r]=deepCloneArray(e)}else if(isSpecificValue(e)){n[r]=cloneSpecificValue(e)}else{n[r]=t.deepExtend({},e)}}else{n[r]=e}});return n}function safeGetProperty(e,t){return t==="__proto__"?undefined:e[t]}t.deepExtend=function(e,...n){if(!e||typeof e!=="object"){return false}if(n.length===0){return e}let r,i;for(const s of n){if(typeof s!=="object"||s===null||Array.isArray(s)){continue}for(const n of Object.keys(s)){i=safeGetProperty(e,n);r=safeGetProperty(s,n);if(r===e){continue}else if(typeof r!=="object"||r===null){e[n]=r;continue}else if(Array.isArray(r)){e[n]=deepCloneArray(r);continue}else if(isSpecificValue(r)){e[n]=cloneSpecificValue(r);continue}else if(typeof i!=="object"||i===null||Array.isArray(i)){e[n]=t.deepExtend({},r);continue}else{e[n]=t.deepExtend(i,r);continue}}}return e}},98:function(e,t,n){"use strict";const r=n(84);r.from=((e,t)=>{if(e instanceof DataView)return e;if(e instanceof ArrayBuffer)return new DataView(e);let n;if(typeof e==="string"){if(!t){t="utf-8"}else if(t==="base64"){n=Uint8Array.from(atob(e),e=>e.charCodeAt(0)).buffer;return new DataView(n)}if(t!=="utf-8")throw new Error("Browser support for encodings other than utf-8 not implemented");return new DataView((new TextEncoder).encode(e).buffer)}else if(typeof e==="object"){if(ArrayBuffer.isView(e)){if(e.byteLength===e.buffer.byteLength)return new DataView(e.buffer);else return new DataView(e.buffer,e.byteOffset,e.byteLength)}}throw new Error("Unkown type. Cannot convert to ArrayBuffer")});r.toString=((e,t)=>{e=r(e,t);const n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);const i=String.fromCharCode(...n);if(t==="base64"){return btoa(i)}else{return i}});r.native=((e,t)=>{if(e instanceof Uint8Array)return e;e=r.from(e,t);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)});if(process.browser)r._randomFill=((...e)=>crypto.getRandomValues(...e));e.exports=r},107:function(e,t,n){function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(46);Object.keys(e).forEach(t=>{createDebug[t]=e[t]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n);t|=0}return createDebug.colors[Math.abs(t)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let t;function debug(...e){if(!debug.enabled){return}const n=debug;const r=Number(new Date);const i=r-(t||r);n.diff=i;n.prev=t;n.curr=r;t=r;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if(t==="%%"){return t}s++;const i=createDebug.formatters[r];if(typeof i==="function"){const r=e[s];t=i.call(n,r);e.splice(s,1);s--}return t});createDebug.formatArgs.call(n,e);const o=n.log||createDebug.log;o.apply(n,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,t){const n=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let t;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const r=n.length;for(t=0;t<r;t++){if(!n[t]){continue}e=n[t].replace(/\*/g,".*?");if(e[0]==="-"){createDebug.skips.push(new RegExp("^"+e.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+e+"$"))}}for(t=0;t<createDebug.instances.length;t++){const e=createDebug.instances[t];e.enabled=createDebug.enabled(e.namespace)}}function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(e=>"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let n;for(t=0,n=createDebug.skips.length;t<n;t++){if(createDebug.skips[t].test(e)){return false}}for(t=0,n=createDebug.names.length;t<n;t++){if(createDebug.names[t].test(e)){return true}}return false}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},114:function(e){"use strict";e.exports=(e=>Object.prototype.toString.call(e)==="[object RegExp]")},129:function(e){e.exports=require("child_process")},156:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(413),i=n(669);function byline(t,n){return e.exports.createStream(t,n)}t.default=byline;e.exports.createStream=function(e,t){if(e){return createLineStream(e,t)}else{return new LineStream(t)}};function createLineStream(e,t){if(!e){throw new Error("expected readStream")}if(!e.readable){throw new Error("readStream must be readable")}var n=new LineStream(t);e.pipe(n);return n}t.createLineStream=createLineStream;e.exports.LineStream=LineStream;function LineStream(e){r.Transform.call(this,e);e=e||{};this._readableState.objectMode=true;this._lineBuffer=[];this._keepEmptyLines=e.keepEmptyLines||false;this._lastChunkEndedWithCR=false;this.on("pipe",function(e){if(!this.encoding){if(e instanceof r.Readable){this.encoding=e._readableState.encoding}}})}i.inherits(LineStream,r.Transform);LineStream.prototype._transform=function(e,t,n){t=t||"utf8";if(Buffer.isBuffer(e)){if(t=="buffer"){e=e.toString();t="utf8"}else{e=e.toString(t)}}this._chunkEncoding=t;var r=e.split(/\r\n|\r|\n/g);if(this._lastChunkEndedWithCR&&e[0]=="\n"){r.shift()}if(this._lineBuffer.length>0){this._lineBuffer[this._lineBuffer.length-1]+=r[0];r.shift()}this._lastChunkEndedWithCR=e[e.length-1]=="\r";this._lineBuffer=this._lineBuffer.concat(r);this._pushBuffer(t,1,n)};LineStream.prototype._pushBuffer=function(e,t,n){while(this._lineBuffer.length>t){var r=this._lineBuffer.shift();if(this._keepEmptyLines||r.length>0){if(!this.push(this._reencode(r,e))){var i=this;setImmediate(function(){i._pushBuffer(e,t,n)});return}}}n()};LineStream.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};LineStream.prototype._reencode=function(e,t){if(this.encoding&&this.encoding!=t){return Buffer.from(e,t).toString(this.encoding)}else if(this.encoding){return e}else{return Buffer.from(e,t)}}},168:function(e){"use strict";const t=(e,t,n)=>{let r=e.indexOf(t);if(r===-1){return e}const i=t.length;let s=0;let o="";do{o+=e.substr(s,r-s)+t+n;s=r+i;r=e.indexOf(t,s)}while(r!==-1);o+=e.substr(s);return o};const n=(e,t,n,r)=>{let i=0;let s="";do{const o=e[r-1]==="\r";s+=e.substr(i,(o?r-1:r)-i)+t+(o?"\r\n":"\n")+n;i=r+1;r=e.indexOf("\n",i)}while(r!==-1);s+=e.substr(i);return s};e.exports={stringReplaceAll:t,stringEncaseCRLFWithFirstIndex:n}},179:function(e,t,n){"use strict";const r=n(606);const{stdout:i,stderr:s}=n(543);const{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:a}=n(168);const u=["ansi","ansi","ansi256","ansi16m"];const l=Object.create(null);const c=(e,t={})=>{if(t.level>3||t.level<0){throw new Error("The `level` option should be an integer from 0 to 3")}const n=i?i.level:0;e.level=t.level===undefined?n:t.level};class ChalkClass{constructor(e){return f(e)}}const f=e=>{const t={};c(t,e);t.template=((...e)=>b(t.template,...e));Object.setPrototypeOf(t,Chalk.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=(()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")});t.template.Instance=ChalkClass;return t.template};function Chalk(e){return f(e)}for(const[e,t]of Object.entries(r)){l[e]={get(){const n=g(this,h(t.open,t.close,this._styler),this._isEmpty);Object.defineProperty(this,e,{value:n});return n}}}l.visible={get(){const e=g(this,this._styler,true);Object.defineProperty(this,"visible",{value:e});return e}};const p=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of p){l[e]={get(){const{level:t}=this;return function(...n){const i=h(r.color[u[t]][e](...n),r.color.close,this._styler);return g(this,i,this._isEmpty)}}}}for(const e of p){const t="bg"+e[0].toUpperCase()+e.slice(1);l[t]={get(){const{level:t}=this;return function(...n){const i=h(r.bgColor[u[t]][e](...n),r.bgColor.close,this._styler);return g(this,i,this._isEmpty)}}}}const d=Object.defineProperties(()=>{},{...l,level:{enumerable:true,get(){return this._generator.level},set(e){this._generator.level=e}}});const h=(e,t,n)=>{let r;let i;if(n===undefined){r=e;i=t}else{r=n.openAll+e;i=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:i,parent:n}};const g=(e,t,n)=>{const r=(...e)=>{return m(r,e.length===1?""+e[0]:e.join(" "))};r.__proto__=d;r._generator=e;r._styler=t;r._isEmpty=n;return r};const m=(e,t)=>{if(e.level<=0||!t){return e._isEmpty?"":t}let n=e._styler;if(n===undefined){return t}const{openAll:r,closeAll:i}=n;if(t.indexOf("")!==-1){while(n!==undefined){t=o(t,n.close,n.open);n=n.parent}}const s=t.indexOf("\n");if(s!==-1){t=a(t,i,r,s)}return r+t+i};let y;const b=(e,...t)=>{const[r]=t;if(!Array.isArray(r)){return t.join(" ")}const i=t.slice(1);const s=[r.raw[0]];for(let e=1;e<r.length;e++){s.push(String(i[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]))}if(y===undefined){y=n(941)}return y(e,s.join(""))};Object.defineProperties(Chalk.prototype,l);const w=Chalk();w.supportsColor=i;w.stderr=Chalk({level:s?s.level:0});w.stderr.supportsColor=s;w.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};e.exports=w},202:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(179));const s=r(n(354));const o=n(208);const a=r(n(314));const u="@@__DIM_POINTER__@@";function printJsonWithErrors(e,t,n,r=[]){let s=e;for(const{path:e,type:t}of r){s=o.deepSet(s,e,t)}return a.default(s,{indent:" ",transformLine:({indent:e,key:s,value:o,stringifiedValue:a,eol:l,path:c})=>{const f=c.join(".");const p=t.includes(f);const d=n.includes(f);const h=r.find(e=>e.path===f);let g=a;if(h){if(typeof o==="string"){g=g.slice(1,g.length-1)}const t=h.isRequired?"":"?";const n=h.isRequired?"+":"?";const r=h.isRequired?i.default.greenBright:i.default.green;let a=r(prefixLines(s+t+": "+g+l,e,n));if(!h.isRequired){a=i.default.dim(a)}return a}else{const t=r.some(e=>f.startsWith(e.path));const n=s[s.length-2]==="?";if(n){s=s.slice(1,s.length-1)}if(n&&typeof o==="object"&&o!==null){g=g.split("\n").map((e,t,n)=>t===n.length-1?e+u:e).join("\n")}if(t&&typeof o==="string"){g=g.slice(1,g.length-1);if(!n){g=i.default.bold(g)}}if((typeof o!=="object"||o===null)&&!d&&!t){g=i.default.dim(g)}const c=p?i.default.redBright(s):s;g=d?i.default.redBright(g):g;let h=e+c+": "+g+(t?l:i.default.dim(l));if(p||d){const t=h.split("\n");const n=String(s).length;const r=p?i.default.redBright("~".repeat(n)):" ".repeat(n);const u=d?getValueLength(e,s,o,a):0;const l=Boolean(d&&(typeof o==="object"&&o!==null));const c=d?" "+i.default.redBright("~".repeat(u)):"";if(r&&r.length>0&&!l){t.splice(1,0,e+r+c)}if(r&&r.length>0&&l){t.splice(t.length-1,0,e.slice(0,e.length-2)+c)}h=t.join("\n")}return h}}})}t.printJsonWithErrors=printJsonWithErrors;function getValueLength(e,t,n,r){if(n===null){return 4}if(typeof n==="string"){return n.length+2}if(typeof n==="object"){return getLongestLine(`${t}: ${s.default(r)}`)-e.length}return String(n).length}function getLongestLine(e){return e.split("\n").reduce((e,t)=>t.length>e?t.length:e,0)}function prefixLines(e,t,n){return e.split("\n").map((e,r,i)=>r===0?n+t.slice(1)+e:r<i.length-1?n+e.slice(1):e).map(e=>{return s.default(e).includes(u)?i.default.dim(e.replace(u,"")):e.includes("?")?i.default.dim(e):e}).join("\n")}},208:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=e=>Array.isArray(e)?e:e.split(".");t.deepGet=((e,t)=>n(t).reduce((e,t)=>e&&e[t],e));t.deepSet=((e,r,i)=>n(r).reduceRight((n,r,i,s)=>Object.assign({},t.deepGet(e,s.slice(0,i)),{[r]:n}),i))},211:function(e){e.exports=require("https")},213:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=n(393);const o=n(802);const a=r(n(622));const u=n(728);const l=n(79);const c=n(743);const f=r(n(426));const p=f.default("prisma-client");const d=r(n(747));const h=r(n(179));const g=i(n(442));const m=n(336);const y=n(313);const b=n(239);const w=n(208);const _=n(803);const C=n(913);const v=r(n(354));const T=n(202);function getPrismaClient(e){class NewPrismaClient{constructor(t){var n,r,i;const o=t!==null&&t!==void 0?t:{};const u=(n=o.__internal)!==null&&n!==void 0?n:{};const c=u.debug===true;if(c){f.default.enable("prisma-client")}if(u.hooks){this.hooks=u.hooks}let g=(r=e.sqliteDatasourceOverrides)!==null&&r!==void 0?r:[];g=g.map(t=>({name:t.name,url:"file:"+a.default.resolve(e.dirname,t.url)}));const m=Object.entries(o.datasources||{}).map(([e,t])=>({name:e,url:t}));const w=b.mergeBy(g,m,e=>e.name);const _=u.engine||{};if(o.errorFormat){this.errorFormat=o.errorFormat}else if(process.env.NODE_ENV==="production"){this.errorFormat="minimal"}else if(process.env.NO_COLOR){this.errorFormat="colorless"}else{this.errorFormat="pretty"}this.measurePerformance=u.measurePerformance||false;const C=this.readEnv();this.dmmf=new s.DMMFClass(e.document);let v=a.default.resolve(e.dirname,e.relativePath);if(!d.default.existsSync(v)){v=e.dirname}this.engineConfig={cwd:v,debug:c,datamodelPath:a.default.join(e.dirname,"schema.prisma"),prismaPath:(i=_.binaryPath)!==null&&i!==void 0?i:undefined,datasources:w,generator:e.generator,showColors:this.errorFormat==="pretty",logLevel:o.log&&y.getLogLevel(o.log),logQueries:o.log&&Boolean(typeof o.log==="string"?o.log==="query":o.log.find(e=>typeof e==="string"?e==="query":e.level==="query")),env:C,flags:o.forceTransactions?["--always-force-transactions"]:[]};p({engineConfig:this.engineConfig});this.engine=new l.NodeEngine(this.engineConfig);this.fetcher=new PrismaClientFetcher(this,false,this.hooks);if(o.log){for(const e of o.log){const t=typeof e==="string"?e:e.emit==="stdout"?e.level:null;if(t){this.on(t,e=>{const n={query:"blue",info:"cyan",warn:"yellow"};console.error(h.default[n[t]](`prisma:${t}`.padEnd(13))+(e.message||e.query))})}}}this.bootstrapClient()}readEnv(){const t=a.default.resolve(e.dirname,e.relativePath,".env");if(d.default.existsSync(t)){return m.parse(d.default.readFileSync(t,"utf-8"))}return{}}on(e,t){this.engine.on(e,n=>{const r=n.fields;if(e==="query"){t({timestamp:n.timestamp,query:r.query,params:r.params,duration:r.duration_ms,target:n.target})}else{t({timestamp:n.timestamp,message:r.message,target:n.target})}})}async connect(){if(this.disconnectionPromise){await this.disconnectionPromise}if(this.connectionPromise){return this.connectionPromise}this.connectionPromise=this.engine.start();return this.connectionPromise}async runDisconnect(){await this.engine.stop();delete this.connectionPromise;this.engine=new l.NodeEngine(this.engineConfig);delete this.disconnectionPromise}async disconnect(){if(!this.disconnectionPromise){this.disconnectionPromise=this.runDisconnect()}return this.disconnectionPromise}async raw(e,...t){let n="";let r=undefined;if(Array.isArray(e)){const i=g.sqltag(e,...t);n=i.sql;r=JSON.stringify(i.values)}else{n=e}const i=c.makeDocument({dmmf:this.dmmf,rootField:"executeRaw",rootTypeName:"mutation",select:{query:n,parameters:r}});i.validate({query:n,parameters:r},false,"raw",this.errorFormat);return this.fetcher.request({document:i,rootField:"executeRaw",typeName:"raw",isList:false,dataPath:[],clientMethod:"raw"})}bootstrapClient(){const e=this.dmmf.mappings.reduce((t,n)=>{const r=this.dmmf.modelMap[n.model];if(!r){throw new Error(`Invalid mapping ${n.model}, can't find model`)}const i=({operation:t,actionName:i,rootField:s,args:o,dataPath:a,isList:u})=>{a=a!==null&&a!==void 0?a:[];u=u!==null&&u!==void 0?u:false;const l=(new Error).stack;const d=`${n.model}.${i}`;let h=c.makeDocument({dmmf:this.dmmf,rootField:s,rootTypeName:t,select:o});try{h.validate(o,false,`${n.model}.${i}`,undefined)}catch(e){const{stack:t}=C.printStack({callsite:l,originalMethod:d,onUs:false});throw new c.PrismaClientValidationError(t+e.message)}h=c.transformDocument(h);if(f.default.enabled("prisma-client")){const e=String(h);p(`Prisma Client call:`);p(`prisma.${d}(${T.printJsonWithErrors(o,[],[],[])})`);p(`Generated request:`);p(e+"\n")}let g;const m=new CollectTimestamps("PrismaClient");const y={then:(e,t)=>{if(!g){g=this.fetcher.request({document:h,clientMethod:d,typeName:n.model,dataPath:a,isList:u,rootField:s,collectTimestamps:m,callsite:l})}return g.then(e,t)},catch:e=>{if(!g){g=this.fetcher.request({document:h,clientMethod:d,typeName:n.model,dataPath:a,isList:u,rootField:s,collectTimestamps:m,callsite:l})}return g.catch(e)},finally:e=>{if(!g){g=this.fetcher.request({document:h,clientMethod:d,typeName:n.model,dataPath:a,isList:true,rootField:s,collectTimestamps:m,callsite:l})}return g.finally(e)},_collectTimestamps:m};for(const n of r.fields.filter(e=>e.kind==="object")){y[n.name]=(r=>{const u=a.includes("select")?"select":a.includes("include")?"include":"select";const l=[...a,u,n.name];const c=w.deepSet(o,l,r||true);return e[n.type]({operation:t,actionName:i,rootField:s,args:c,dataPath:l,isList:n.isList})})}return y};t[r.name]=i;return t},{});for(const t of this.dmmf.mappings){const n={model:true,plural:true,aggregate:true};const r=Object.entries(t).reduce((r,[i,s])=>{if(!n[i]){const n=getOperation(i);r[i]=(r=>e[t.model]({operation:n,actionName:i,rootField:s,args:r}))}return r},{});r.count=(()=>e[t.model]({operation:"query",actionName:"count",rootField:t.aggregate,args:{},dataPath:["count"]}));this[t.model]=r}}}return NewPrismaClient}t.getPrismaClient=getPrismaClient;class PrismaClientFetcher{constructor(e,t=false,n){this.prisma=e;this.debug=t;this.hooks=n;this.dataloader=new _.Dataloader(async e=>{await this.prisma.connect();const t=e.map(e=>String(e.document));if(t.length===1){const e=await this.prisma.engine.request(t[0]);return[e]}else{return this.prisma.engine.requestBatch(t)}})}async request({document:e,dataPath:t=[],rootField:n,typeName:r,isList:i,callsite:s,collectTimestamps:o,clientMethod:a}){if(this.hooks&&this.hooks.beforeRequest){const s=String(e);this.hooks.beforeRequest({query:s,path:t,rootField:n,typeName:r,document:e,isList:i})}try{o&&o.record("Pre-engine_request");const r=await this.dataloader.request({document:e});o&&o.record("Post-engine_request");o&&o.record("Pre-unpack");const i=this.unpack(e,r,t,n);o&&o.record("Post-unpack");return i}catch(e){if(s){const{stack:t}=C.printStack({callsite:s,originalMethod:a,onUs:e.isPanic});const n=t+e.message;if(e.code){throw new u.PrismaClientKnownRequestError(this.sanitizeMessage(n),e.code,e.meta)}if(e instanceof u.PrismaClientUnknownRequestError){throw new u.PrismaClientUnknownRequestError(this.sanitizeMessage(n))}else if(e instanceof u.PrismaClientInitializationError){throw new u.PrismaClientInitializationError(this.sanitizeMessage(n))}else if(e instanceof u.PrismaClientRustPanicError){throw new u.PrismaClientRustPanicError(this.sanitizeMessage(n))}throw new u.PrismaClientUnknownRequestError(n)}else{if(e.code){throw new u.PrismaClientKnownRequestError(this.sanitizeMessage(e.message),e.code,e.meta)}if(e.isPanic){throw new u.PrismaClientRustPanicError(e.message)}else{if(e instanceof u.PrismaClientUnknownRequestError){throw new u.PrismaClientUnknownRequestError(this.sanitizeMessage(e.message))}else if(e instanceof u.PrismaClientInitializationError){throw new u.PrismaClientInitializationError(this.sanitizeMessage(e.message))}else if(e instanceof u.PrismaClientRustPanicError){throw new u.PrismaClientRustPanicError(this.sanitizeMessage(e.message))}}}throw e}}sanitizeMessage(e){if(this.prisma.errorFormat&&this.prisma.errorFormat!=="pretty"){return v.default(e)}return e}unpack(e,t,n,r){if(t.data){t=t.data}const i=[];if(r){i.push(r)}i.push(...n.filter(e=>e!=="select"&&e!=="include"));return c.unpack({document:e,data:t,path:i})}}class CollectTimestamps{constructor(e){this.records=[];this.start=undefined;this.additionalResults={};this.start={name:e,value:process.hrtime()}}record(e){this.records.push({name:e,value:process.hrtime()})}elapsed(e,t){const n=[t[0]-e[0],t[1]-e[1]];const r=n[0]*1e9+n[1];const i=r/1e6;return i}addResults(e){Object.assign(this.additionalResults,e)}getResults(){const e=this.records.reduce((e,t)=>{const n=t.name.split("-")[1];if(e[n]){e[n]=this.elapsed(e[n],t.value)}else{e[n]=t.value}return e},{});Object.assign(e,{total:this.elapsed(this.start.value,this.records[this.records.length-1].value),...this.additionalResults});return e}}function getOperation(e){if(e===o.DMMF.ModelAction.findMany||e===o.DMMF.ModelAction.findOne){return"query"}return"mutation"}t.getOperation=getOperation},234:function(e,t,n){const r=n(829);const i=n(888);const s={};const o=Object.keys(r);function wrapRaw(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function wrapRounded(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}const r=e(t);if(typeof r==="object"){for(let e=r.length,t=0;t<e;t++){r[t]=Math.round(r[t])}}return r};if("conversion"in e){t.conversion=e.conversion}return t}o.forEach(e=>{s[e]={};Object.defineProperty(s[e],"channels",{value:r[e].channels});Object.defineProperty(s[e],"labels",{value:r[e].labels});const t=i(e);const n=Object.keys(t);n.forEach(n=>{const r=t[n];s[e][n]=wrapRounded(r);s[e][n].raw=wrapRaw(r)})});e.exports=s},239:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function mergeBy(e,t,r){const i=n(e,r);const s=n(t,r);const o=Object.values(s).map(e=>e[e.length-1]);const a=Object.keys(s);Object.entries(i).forEach(([e,t])=>{if(!a.includes(e)){o.push(t[t.length-1])}});return o}t.mergeBy=mergeBy;const n=(e,t)=>{return e.reduce((e,n)=>{const r=t(n);if(!e[r]){e[r]=[]}e[r].push(n);return e},{})}},243:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(83);function highlightTS(e){return highlight(e,r.Prism.languages.javascript)}t.highlightTS=highlightTS;function highlight(e,t){const n=r.Prism.tokenize(e,t);return n.map(e=>r.Token.stringify(e)).join("")}},277:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function flatten(e){return Array.prototype.concat.apply([],e)}function flatMap(e,t,n){return flatten(e.map(t,n))}t.flatMap=flatMap},290:function(e,t,n){"use strict";const r=n(715);e.exports=(e=>{const t=r(e);if(t===0){return e}const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")})},301:function(e){"use strict";const t=new Set(["json","buffer","string"]);e.exports=(e=>(...n)=>{const r=new Set;let i;let s;let o;let a="";n.forEach(e=>{if(typeof e==="string"){if(e.toUpperCase()===e){if(i){const t=`Can't set method to ${e}, already set to ${i}.`;throw new Error(t)}else{i=e}}else if(e.startsWith("http:")||e.startsWith("https:")){a=e}else{if(t.has(e)){s=e}else{throw new Error(`Unknown encoding, ${e}`)}}}else if(typeof e==="number"){r.add(e)}else if(typeof e==="object"){if(o){throw new Error("Cannot set headers twice.")}o=e}else{throw new Error(`Unknown type: ${typeof e}`)}});if(!i)i="GET";if(r.size===0){r.add(200)}return e(r,i,s,o,a)})},313:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function getLogLevel(e){if(typeof e==="string"){return e}return e.reduce((e,t)=>{const n=typeof t==="string"?t:t.level;if(n==="query"){return e}if(!e){return n}if(t==="info"||e==="info"){return"info"}return n},undefined)}t.getLogLevel=getLogLevel},314:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(114);const i=n(917);const s=n(528).default;const o=(e,t,n)=>{const o=[];return function stringifyObject(e,t={},n="",a=[]){t.indent=t.indent||"\t";let u;if(t.inlineCharacterLimit===undefined){u={newLine:"\n",newLineOrSpace:"\n",pad:n,indent:n+t.indent}}else{u={newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"}}const l=e=>{if(t.inlineCharacterLimit===undefined){return e}const r=e.replace(new RegExp(u.newLine,"g"),"").replace(new RegExp(u.newLineOrSpace,"g")," ").replace(new RegExp(u.pad+"|"+u.indent,"g"),"");if(r.length<=t.inlineCharacterLimit){return r}return e.replace(new RegExp(u.newLine+"|"+u.newLineOrSpace,"g"),"\n").replace(new RegExp(u.pad,"g"),n).replace(new RegExp(u.indent,"g"),n+t.indent)};if(o.indexOf(e)!==-1){return'"[Circular]"'}if(e===null||e===undefined||typeof e==="number"||typeof e==="boolean"||typeof e==="function"||typeof e==="symbol"||r(e)){return String(e)}if(e instanceof Date){return`new Date('${e.toISOString()}')`}if(Array.isArray(e)){if(e.length===0){return"[]"}o.push(e);const r="["+u.newLine+e.map((r,i)=>{const s=e.length-1===i?u.newLine:","+u.newLineOrSpace;let o=stringifyObject(r,t,n+t.indent,[...a,i]);if(t.transformValue){o=t.transformValue(e,i,o)}return u.indent+o+s}).join("")+u.pad+"]";o.pop();return l(r)}if(i(e)){let r=Object.keys(e).concat(s(e));if(t.filter){r=r.filter(n=>t.filter(e,n))}if(r.length===0){return"{}"}o.push(e);const i="{"+u.newLine+r.map((i,s)=>{const o=r.length-1===s?u.newLine:","+u.newLineOrSpace;const l=typeof i==="symbol";const c=!l&&/^[a-z$_][a-z$_0-9]*$/i.test(i);const f=l||c?i:stringifyObject(i,t,undefined,[...a,i]);let p=stringifyObject(e[i],t,n+t.indent,[...a,i]);if(t.transformValue){p=t.transformValue(e,i,p)}let d=u.indent+String(f)+": "+p+o;if(t.transformLine){d=t.transformLine({obj:e,indent:u.indent,key:f,stringifiedValue:p,value:e[i],eol:o,originalLine:d,path:a.concat(f)})}return d}).join("")+u.pad+"}";o.pop();return l(i)}e=String(e).replace(/[\r\n]/g,e=>e==="\n"?"\\n":"\\r");if(t.singleQuotes===false){e=e.replace(/"/g,'\\"');return`"${e}"`}e=e.replace(/\\?'/g,"\\'");return`'${e}'`}(e,t,n)};t.default=o},336:function(e,t,n){const r=n(747);const i=n(622);function log(e){console.log(`[dotenv][DEBUG] ${e}`)}const s="\n";const o=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/;const a=/\\n/g;const u=/\n|\r|\r\n/;function parse(e,t){const n=Boolean(t&&t.debug);const r={};e.toString().split(u).forEach(function(e,t){const i=e.match(o);if(i!=null){const e=i[1];let t=i[2]||"";const n=t.length-1;const o=t[0]==='"'&&t[n]==='"';const u=t[0]==="'"&&t[n]==="'";if(u||o){t=t.substring(1,n);if(o){t=t.replace(a,s)}}else{t=t.trim()}r[e]=t}else if(n){log(`did not match key and value when parsing line ${t+1}: ${e}`)}});return r}function config(e){let t=i.resolve(process.cwd(),".env");let n="utf8";let s=false;if(e){if(e.path!=null){t=e.path}if(e.encoding!=null){n=e.encoding}if(e.debug!=null){s=true}}try{const e=parse(r.readFileSync(t,{encoding:n}),{debug:s});Object.keys(e).forEach(function(t){if(!Object.prototype.hasOwnProperty.call(process.env,t)){process.env[t]=e[t]}else if(s){log(`"${t}" is already defined in \`process.env\` and will not be overwritten`)}});return{parsed:e}}catch(e){return{error:e}}}e.exports.config=config;e.exports.parse=parse},352:function(e){function Caseless(e){this.dict=e||{}}Caseless.prototype.set=function(e,t,n){if(typeof e==="object"){for(var r in e){this.set(r,e[r],t)}}else{if(typeof n==="undefined")n=true;var i=this.has(e);if(!n&&i)this.dict[i]=this.dict[i]+","+t;else this.dict[i||e]=t;return i}};Caseless.prototype.has=function(e){var t=Object.keys(this.dict),e=e.toLowerCase();for(var n=0;n<t.length;n++){if(t[n].toLowerCase()===e)return t[n]}return false};Caseless.prototype.get=function(e){e=e.toLowerCase();var t,n;var r=this.dict;Object.keys(r).forEach(function(i){n=i.toLowerCase();if(e===n)t=r[i]});return t};Caseless.prototype.swap=function(e){var t=this.has(e);if(t===e)return;if(!t)throw new Error('There is no header than matches "'+e+'"');this.dict[e]=this.dict[t];delete this.dict[t]};Caseless.prototype.del=function(e){var t=this.has(e);return delete this.dict[t||e]};e.exports=function(e){return new Caseless(e)};e.exports.httpify=function(e,t){var n=new Caseless(t);e.setHeader=function(e,t,r){if(typeof t==="undefined")return;return n.set(e,t,r)};e.hasHeader=function(e){return n.has(e)};e.getHeader=function(e){return n.get(e)};e.removeHeader=function(e){return n.del(e)};e.headers=n.dict;return n}},354:function(e,t,n){"use strict";const r=n(737);e.exports=(e=>typeof e==="string"?e.replace(r(),""):e)},378:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(179));const s=r(n(884));const o=r(n(379));t.keyBy=((e,t)=>{return e.reduce((e,n)=>{e[t(n)]=n;return e},{})});t.ScalarTypeTable={String:true,Int:true,Float:true,Boolean:true,Long:true,DateTime:true,ID:true,UUID:true,Json:true};function isScalar(e){if(typeof e!=="string"){return false}return t.ScalarTypeTable[e]||false}t.isScalar=isScalar;t.GraphQLScalarToJSTypeTable={String:"string",Int:"number",Float:"number",Boolean:"boolean",Long:"number",DateTime:["Date","string"],ID:"string",UUID:"string",Json:"object"};t.JSTypeToGraphQLType={string:"String",boolean:"Boolean",object:"Json"};function stringifyGraphQLType(e){if(typeof e==="string"){return e}return e.name}t.stringifyGraphQLType=stringifyGraphQLType;function wrapWithList(e,t){if(t){return`List<${e}>`}return e}t.wrapWithList=wrapWithList;function getGraphQLType(e,n){if(e===null){return"null"}if(Array.isArray(e)){let t=e.reduce((e,t)=>{const r=getGraphQLType(t,n);if(!e.includes(r)){e.push(r)}return e},[]);if(t.includes("Float")&&t.includes("Int")){t=["Float"]}return`List<${t.join(" | ")}>`}const r=typeof e;if(r==="number"){if(Math.trunc(e)===e){return"Int"}else{return"Float"}}if(Object.prototype.toString.call(e)==="[object Date]"){return"DateTime"}if(r==="string"){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)){return"UUID"}const t=new Date(e);if(n&&typeof n==="object"&&n.values&&n.values.includes(e)){return n.name}if(t.toString()==="Invalid Date"){return"String"}if(t.toISOString()===e){return"DateTime"}}return t.JSTypeToGraphQLType[r]}t.getGraphQLType=getGraphQLType;function graphQLToJSType(e){return t.GraphQLScalarToJSTypeTable[e]}t.graphQLToJSType=graphQLToJSType;function getSuggestion(e,t){const n=t.reduce((t,n)=>{const r=o.default(e,n);if(r<t.distance){return{distance:r,str:n}}return t},{distance:Math.min(Math.floor(e.length)*1.1,...t.map(e=>e.length*3)),str:null});return n.str}t.getSuggestion=getSuggestion;function stringifyInputType(e,t=false){if(typeof e==="string"){return e}if(e.values){return`enum ${e.name} {\n${s.default(e.values.join(", "),2)}\n}`}else{const n=s.default(e.fields.map(e=>{const n=e.inputType[0];const r=`${e.name}`;const s=`${t?i.default.green(r):r}${n.isRequired?"":"?"}: ${i.default.white(e.inputType.map(e=>argIsInputType(e.type)?e.type.name:wrapWithList(stringifyGraphQLType(e.type),e.isList)).join(" | "))}`;if(!n.isRequired){return i.default.dim(s)}return s}).join("\n"),2);return`${i.default.dim("type")} ${i.default.bold.dim(e.name)} ${i.default.dim("{")}\n${n}\n${i.default.dim("}")}`}}t.stringifyInputType=stringifyInputType;function argIsInputType(e){if(typeof e==="string"){return false}return true}function getInputTypeName(e){if(typeof e==="string"){return e}return e.name}t.getInputTypeName=getInputTypeName;function getOutputTypeName(e){if(typeof e==="string"){return e}return e.name}t.getOutputTypeName=getOutputTypeName;function inputTypeToJson(e,t,n=false){if(typeof e==="string"){return e}if(e.values){return e.values.join(" | ")}const r=e;const i=t&&r.fields.every(e=>e.inputType[0].kind==="object")&&!r.isWhereType&&!r.atLeastOne;if(n){return getInputTypeName(e)}return r.fields.reduce((e,t)=>{const n=t.inputType[0];e[t.name+(n.isRequired?"":"?")]=t.isRelationFilter&&!i&&!n.isRequired?getInputTypeName(n.type):inputTypeToJson(n.type,n.isRequired,true);return e},{})}t.inputTypeToJson=inputTypeToJson;function destroyCircular(e,t=[]){const n=Array.isArray(e)?[]:{};t.push(e);for(const r of Object.keys(e)){const i=e[r];if(typeof i==="function"){continue}if(!i||typeof i!=="object"){n[r]=i;continue}if(t.indexOf(e[r])===-1){n[r]=destroyCircular(e[r],t.slice(0));continue}n[r]="[Circular]"}if(typeof e.name==="string"){n.name=e.name}if(typeof e.message==="string"){n.message=e.message}if(typeof e.stack==="string"){n.stack=e.stack}return n}t.destroyCircular=destroyCircular;function unionBy(e,t,n){const r={};for(const t of e){r[n(t)]=t}for(const e of t){const t=n(e);if(!r[t]){r[t]=e}}return Object.values(r)}t.unionBy=unionBy;function uniqBy(e,t){const n={};for(const r of e){n[t(r)]=r}return Object.values(n)}t.uniqBy=uniqBy;function capitalize(e){return e[0].toUpperCase()+e.slice(1)}t.capitalize=capitalize;function lowerCase(e){return e.substring(0,1).toLowerCase()+e.substring(1)}t.lowerCase=lowerCase},379:function(e){"use strict";e.exports=function(){function _min(e,t,n,r,i){return e<t||n<t?e>n?n+1:e+1:r===i?t:t+1}return function(e,t){if(e===t){return 0}if(e.length>t.length){var n=e;e=t;t=n}var r=e.length;var i=t.length;while(r>0&&e.charCodeAt(r-1)===t.charCodeAt(i-1)){r--;i--}var s=0;while(s<r&&e.charCodeAt(s)===t.charCodeAt(s)){s++}r-=s;i-=s;if(r===0||i<3){return i}var o=0;var a;var u;var l;var c;var f;var p;var d;var h;var g;var m;var y;var b;var w=[];for(a=0;a<r;a++){w.push(a+1);w.push(e.charCodeAt(s+a))}var _=w.length-1;for(;o<i-3;){g=t.charCodeAt(s+(u=o));m=t.charCodeAt(s+(l=o+1));y=t.charCodeAt(s+(c=o+2));b=t.charCodeAt(s+(f=o+3));p=o+=4;for(a=0;a<_;a+=2){d=w[a];h=w[a+1];u=_min(d,u,l,g,h);l=_min(u,l,c,m,h);c=_min(l,c,f,y,h);p=_min(c,f,p,b,h);w[a]=p;f=c;c=l;l=u;u=d}}for(;o<i;){g=t.charCodeAt(s+(u=o));p=++o;for(a=0;a<_;a+=2){d=w[a];w[a]=p=_min(d,u,p,g,w[a+1]);u=d}}return p}}()},393:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(378);function getLogger(){return(...e)=>{}}class DMMFClass{constructor({datamodel:e,schema:t,mappings:n}){this.outputTypeMap={};this.outputTypeToMergedOutputType=(e=>{const t=this.modelMap[e.name];return{...e,isEmbedded:t?t.isEmbedded:false,fields:e.fields}});this.datamodel=e;this.schema=t;this.mappings=n;const r=getLogger();r(`starting`);this.enumMap=this.getEnumMap();r(`enumMap`);this.queryType=this.getQueryType();r(`queryType`);this.mutationType=this.getMutationType();r(`mutationType`);this.modelMap=this.getModelMap();r(`modelMap`);this.outputTypes=this.getOutputTypes();r(`outputTypes`);this.outputTypeMap=this.getMergedOutputTypeMap();r(`outputTypes map`);this.resolveOutputTypes(this.outputTypes);r(`resolve Output Types`);this.inputTypes=this.schema.inputTypes;this.inputTypeMap=this.getInputTypeMap();r(`input type map`);this.resolveInputTypes(this.inputTypes);r(`input types`);this.resolveFieldArgumentTypes(this.outputTypes,this.inputTypeMap);r(`resolve fields `);r(`merge things...`);this.queryType=this.outputTypeMap.Query;this.mutationType=this.outputTypeMap.Mutation;this.outputTypes=this.outputTypes;r(`done`)}getField(e){return this.queryType.fields.find(t=>t.name===e)||this.mutationType.fields.find(t=>t.name===e)}resolveOutputTypes(e){for(const t of e){for(const e of t.fields){if(typeof e.outputType.type==="string"&&!r.ScalarTypeTable[e.outputType.type]){e.outputType.type=this.outputTypeMap[e.outputType.type]||this.enumMap[e.outputType.type]||e.outputType.type}}}}resolveInputTypes(e){for(const t of e){for(const e of t.fields){const t=e.inputType[0].type;if(typeof t==="string"&&!r.ScalarTypeTable[t]&&(this.inputTypeMap[t]||this.enumMap[t])){e.inputType[0].type=this.inputTypeMap[t]||this.enumMap[t]||e.inputType[0].type}const n=e.inputType[1]&&e.inputType[1].type;if(typeof n==="string"&&!r.ScalarTypeTable[n]&&(this.inputTypeMap[n]||this.enumMap[n])){e.inputType[1].type=this.inputTypeMap[n]||this.enumMap[n]||e.inputType[1].type}}}}resolveFieldArgumentTypes(e,t){for(const n of e){for(const e of n.fields){for(const n of e.args){const e=n.inputType[0].type;if(typeof e==="string"&&!r.ScalarTypeTable[e]){n.inputType[0].type=t[e]||this.enumMap[e]||n.inputType[0].type}const i=n.inputType[1]&&n.inputType[1].type;if(i&&typeof i==="string"&&!r.ScalarTypeTable[i]){n.inputType[1].type=t[i]||this.enumMap[i]||n.inputType[1].type}}}}}getQueryType(){return this.schema.outputTypes.find(e=>e.name==="Query")}getMutationType(){return this.schema.outputTypes.find(e=>e.name==="Mutation")}getOutputTypes(){return this.schema.outputTypes.map(this.outputTypeToMergedOutputType)}getEnumMap(){return r.keyBy(this.schema.enums,e=>e.name)}getModelMap(){return r.keyBy(this.datamodel.models,e=>e.name)}getMergedOutputTypeMap(){return r.keyBy(this.outputTypes,e=>e.name)}getInputTypeMap(){return r.keyBy(this.schema.inputTypes,e=>e.name)}}t.DMMFClass=DMMFClass},397:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function cache(e,t,n){var r=n.get;if(!r)throw new TypeError("Getter property descriptor expected");n.get=function(){var e=r.call(this);Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:false,value:e});return e}}t.cache=cache},400:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(33);t.getPlatform=r.getPlatform;var i=n(7);t.mayBeCompatible=i.mayBeCompatible;var s=n(7);t.platforms=s.platforms},413:function(e){e.exports=require("stream")},415:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(290));function dedent(e){return i.default(e)}t.dedent=dedent},417:function(e){e.exports=require("crypto")},426:function(e,t,n){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(851)}else{e.exports=n(819)}},442:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i=arguments.length,s=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s;return i>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:true});const i=n(669);const s=n(397);class Sql{constructor(e,t){this.rawStrings=e;this.rawValues=t;if(e.length===0){throw new TypeError("Expected at least 1 string")}if(e.length-1!==t.length){throw new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`)}}get values(){const e=[];for(const t of this.rawValues){if(t instanceof Sql){e.push(...t.values)}else{e.push(t)}}return e}get strings(){const e=[this.rawStrings[0]];for(let t=1;t<this.rawStrings.length;t++){const n=this.rawValues[t-1];if(n instanceof Sql){e[e.length-1]+=n.strings[0];e.push(...n.strings.slice(1));e[e.length-1]+=this.rawStrings[t]}else{e.push(this.rawStrings[t])}}return e}get text(){return this.strings.reduce((e,t,n)=>`${e}$${n}${t}`)}get sql(){return this.strings.join("?")}[i.inspect.custom](){return{text:this.text,sql:this.sql,values:this.values}}}r([s.cache],Sql.prototype,"values",null);r([s.cache],Sql.prototype,"strings",null);r([s.cache],Sql.prototype,"text",null);r([s.cache],Sql.prototype,"sql",null);t.Sql=Sql;Object.defineProperty(Sql.prototype,"text",{enumerable:true});Object.defineProperty(Sql.prototype,"values",{enumerable:true});Object.defineProperty(Sql.prototype,"sql",{enumerable:true});function join(e,t=","){if(e.length===0){throw new TypeError("Expected `join([])` to be called with an array of multiple elements, but got an empty array")}return new Sql(["",...Array(e.length-1).fill(t),""],e)}t.join=join;function raw(e){return new Sql([e],[])}t.raw=raw;t.empty=raw("");function sqltag(e,...t){return new Sql(e.raw,t)}t.sqltag=sqltag;t.default=sqltag},528:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=(e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t)))},543:function(e,t,n){"use strict";const r=n(87);const i=n(867);const s=n(696);const{env:o}=process;let a;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){a=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){a=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR==="true"){a=1}else if(o.FORCE_COLOR==="false"){a=0}else{a=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(a===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(e&&!t&&a===undefined){return 0}const n=a||0;if(o.TERM==="dumb"){return n}if(process.platform==="win32"){const e=r.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if("GITHUB_ACTIONS"in o){return 1}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return n}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,i.isatty(1))),stderr:translateLevel(supportsColor(true,i.isatty(2)))}},550:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(906);const s=r(n(179));class PrismaQueryEngineError extends Error{constructor(e,t){super(e);this.code=t}}t.PrismaQueryEngineError=PrismaQueryEngineError;function getMessage(e){if(typeof e==="string"){return e}else if(i.isRustError(e)){return e.message}else if(e.fields&&e.fields.message){if(e.fields.reason){return`${e.fields.message}: ${e.fields.reason}`}return e.fields.message}else{return JSON.stringify(e)}}t.getMessage=getMessage;class PrismaClientKnownRequestError extends Error{constructor(e,t,n){super(e);this.code=t;this.meta=n}}t.PrismaClientKnownRequestError=PrismaClientKnownRequestError;class PrismaClientUnknownRequestError extends Error{constructor(e){super(e)}}t.PrismaClientUnknownRequestError=PrismaClientUnknownRequestError;class PrismaClientRustPanicError extends Error{constructor(e){super(e)}}t.PrismaClientRustPanicError=PrismaClientRustPanicError;class PrismaClientInitializationError extends Error{constructor(e){super(e)}}t.PrismaClientInitializationError=PrismaClientInitializationError;function mapKeys(e,t){return Object.entries(e).reduce((e,[n,r])=>{e[t(n)]=r;return e},{})}function serializeError(e){let{target:t,level:n,...r}=e;const i=e.message||e.fields&&e.fields.message;if(t==="datamodel"){return s.default.red.bold("Schema ")+i}if(t==="exit"){return s.default.red.bold("Engine exited "+JSON.stringify(e))}return s.default.red(e.message+" "+serializeObject(r))}function serializePanic(e){const t=e.fields;return`${s.default.red.bold("Reason: ")}${s.default.red(`${t.reason} in ${s.default.underline(`${t.file}:${t.line}:${t.column}`)}`)}\n\nPlease create an issue in the ${s.default.bold("prisma-client-js")} repo with\nyour \`schema.prisma\` and the Prisma Client method you tried to use 🙏:\n${s.default.underline("https://github.com/prisma/prisma-client-js/issues/new")}\n`}function serializeObject(e){return Object.entries(e).map(([e,t])=>`${e}=${JSON.stringify(t)}`).join(" ")}},580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(550);t.PrismaClientKnownRequestError=r.PrismaClientKnownRequestError;t.PrismaClientUnknownRequestError=r.PrismaClientUnknownRequestError;t.PrismaClientInitializationError=r.PrismaClientInitializationError;t.PrismaClientRustPanicError=r.PrismaClientRustPanicError;var i=n(79);t.Engine=i.NodeEngine;var s=n(938);t.getInternalDatamodelJson=s.getInternalDatamodelJson;var o=n(60);t.printGeneratorConfig=o.printGeneratorConfig;var a=n(818);t.fixPlatforms=a.fixPlatforms},605:function(e){e.exports=require("http")},606:function(e,t,n){"use strict";e=n.nmd(e);const r=(e,t)=>(...n)=>{const r=e(...n);return`[${r+t}m`};const i=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`};const s=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`};const o=e=>e;const a=(e,t,n)=>[e,t,n];const u=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true});return r},enumerable:true,configurable:true})};let l;const c=(e,t,r,i)=>{if(l===undefined){l=n(234)}const s=i?10:0;const o={};for(const[n,i]of Object.entries(l)){const a=n==="ansi16"?"ansi":n;if(n===t){o[a]=e(r,s)}else if(typeof i==="object"){o[a]=e(i[t],s)}}return o};function assembleStyles(){const e=new Map;const t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright;t.bgColor.bgGray=t.bgColor.bgBlackBright;t.color.grey=t.color.blackBright;t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[n,r]of Object.entries(t)){for(const[n,i]of Object.entries(r)){t[n]={open:`[${i[0]}m`,close:`[${i[1]}m`};r[n]=t[n];e.set(i[0],i[1])}Object.defineProperty(t,n,{value:r,enumerable:false})}Object.defineProperty(t,"codes",{value:e,enumerable:false});t.color.close="[39m";t.bgColor.close="[49m";u(t.color,"ansi",()=>c(r,"ansi16",o,false));u(t.color,"ansi256",()=>c(i,"ansi256",o,false));u(t.color,"ansi16m",()=>c(s,"rgb",a,false));u(t.bgColor,"ansi",()=>c(r,"ansi16",o,true));u(t.bgColor,"ansi256",()=>c(i,"ansi256",o,true));u(t.bgColor,"ansi16m",()=>c(s,"rgb",a,true));return t}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},628:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function omit(e,t){const n={};const r=Array.isArray(t)?t:[t];for(const t in e){if(e.hasOwnProperty(t)&&!r.includes(t)){n[t]=e[t]}}return n}t.omit=omit},631:function(e){e.exports=require("net")},663:function(e,t,n){"use strict";const r=n(417);const i=n(98).from;const s=n(84);s.from=((e,t)=>{if(e instanceof DataView)return e;if(e instanceof ArrayBuffer)return new DataView(e);if(typeof e==="string"){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)){return new DataView(e.buffer,e.byteOffset,e.byteLength)}return i(e,t)});s.toString=((e,t)=>{e=s(e);return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(t)});s.native=((e,t)=>{if(Buffer.isBuffer(e))return e;e=s(e,t);return Buffer.from(e.buffer,e.byteOffset,e.byteLength)});s._randomFill=r.randomFillSync;e.exports=s},669:function(e){e.exports=require("util")},696:function(e){"use strict";e.exports=((e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const i=t.indexOf("--");return r!==-1&&(i===-1||r<i)})},715:function(e){"use strict";e.exports=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);if(!t){return 0}return Math.min.apply(Math,t.map(e=>e.length))})},727:function(e,t,n){"use strict";const r=n(605);const i=n(211);const{URL:s}=n(835);const o=n(942);const a=n(352);const u=n(663);const l=n(301);const c=n(761);const{PassThrough:f}=n(413);const p={};if(c.createBrotliDecompress)p.br=(()=>c.createBrotliDecompress());if(c.createGunzip)p.gzip=(()=>c.createGunzip());if(c.createInflate)p.deflate=(()=>c.createInflate());const d=Object.keys(p).join(", ");const h=e=>{const t=new f;t.statusCode=e.statusCode;t.statusMessage=e.statusMessage;t.headers=e.headers;t._response=e;if(t.headers["content-encoding"]){const n=t.headers["content-encoding"].split(", ").reverse();while(n.length){const t=n.shift();if(p[t]){e=e.pipe(p[t]())}else{break}}}return e.pipe(t)};class StatusError extends Error{constructor(e,...t){super(...t);Error.captureStackTrace(this,StatusError);this.message=`Incorrect statusCode: ${e.statusCode}`;this.statusCode=e.statusCode;this.responseBody=new Promise(t=>{const n=[];e.on("data",e=>n.push(e));e.on("end",()=>t(Buffer.concat(n)))})}}const g=e=>new Promise((t,n)=>{const r=[];e.on("error",n);e.on("end",()=>t(Buffer.concat(r)));e.on("data",e=>r.push(e))});const m=(e,t,n,l,c)=>(f,p=null,m={})=>{f=c+(f||"");const y=new s(f);let b;if(y.protocol==="https:"){b=i}else if(y.protocol==="http:"){b=r}else{throw new Error(`Unknown protocol, ${y.protocol}`)}const w={path:y.pathname+y.search,port:y.port,method:t,headers:{...l||{},...m},hostname:y.hostname};if(y.username||y.password){w.auth=[y.username,y.password].join(":")}const _=a(w.headers);if(n==="json"){if(!_.get("accept")){_.set("accept","application/json")}}if(!_.has("accept-encoding")){_.set("accept-encoding",d)}return new Promise((t,r)=>{const i=b.request(w,async i=>{i.status=i.statusCode;if(!e.has(i.statusCode)){return r(new StatusError(i))}i=h(i);if(!n)return t(i);else{const e=await g(i);if(n==="buffer"){t(e)}else if(n==="json"){let n;try{n=JSON.parse(e.toString());t(n)}catch(t){t.message+=`str"${e.toString()}"`;r(t)}}else if(n==="string"){t(e.toString())}}});i.on("error",r);if(p){if(p instanceof ArrayBuffer||ArrayBuffer.isView(p)){p=u.native(p)}if(Buffer.isBuffer(p)){}else if(typeof p==="string"){p=Buffer.from(p)}else if(o(p)){p.pipe(i);p=null}else if(typeof p==="object"){i.setHeader("content-type","application/json");p=Buffer.from(JSON.stringify(p))}else{r(new Error("Unknown body type."))}if(p){i.setHeader("content-length",p.length);i.end(p)}}else{i.end()}})};e.exports=l(m)},728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(802);t.DMMF=r.DMMF;var i=n(393);t.DMMFClass=i.DMMFClass;var s=n(743);t.makeDocument=s.makeDocument;t.transformDocument=s.transformDocument;t.unpack=s.unpack;t.PrismaClientValidationError=s.PrismaClientValidationError;var o=n(426);t.debugLib=o.default;var a=n(580);t.Engine=a.Engine;t.PrismaClientKnownRequestError=a.PrismaClientKnownRequestError;t.PrismaClientUnknownRequestError=a.PrismaClientUnknownRequestError;t.PrismaClientInitializationError=a.PrismaClientInitializationError;t.PrismaClientRustPanicError=a.PrismaClientRustPanicError;var u=n(213);t.getPrismaClient=u.getPrismaClient},736:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(743);function visit(e,t){const n=e.children.map(e=>visitField(e,t));if(e.children.length===n.length&&e.children.every((e,t)=>e===n[t])){return e}const i=new r.Document(e.type,n);return i}t.visit=visit;function visitField(e,t){const n=e.args?e.args.args.map(e=>visitArg(e,t)):undefined;const i=n?new r.Args(n):undefined;const s=e.children?e.children.map(e=>visitField(e,t)):undefined;const o=!i&&!e.args||e.args&&i&&(e.args.args.length===i.args.length&&e.args.args.every((e,t)=>e===i.args[t]));const a=!e.children&&!s||e.children&&s&&e.children.length===s.length&&e.children.every((e,t)=>e===s[t]);if(o&&a){return e}return new r.Field({name:e.name,args:i,children:s,error:e.error,schemaField:e.schemaField})}function isArgsArray(e){if(Array.isArray(e)){return e.every(e=>e instanceof r.Args)}return false}function visitArg(e,t){function mapArgs(e){const{args:n}=e;const i=n.map(e=>visitArg(e,t));if(i.length!==n.length||n.find((e,t)=>e!==i[t])){return new r.Args(i)}return e}const n=t.Arg.enter(e)||e;let i=n.value;if(isArgsArray(n.value)){i=n.value.map(mapArgs)}else if(n.value instanceof r.Args){i=mapArgs(n.value)}if(i!==n.value){return new r.Arg({key:n.key,value:i,error:n.error,argType:n.argType,isEnum:n.isEnum})}return n}},737:function(e){"use strict";e.exports=(({onlyFirst:e=false}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[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?undefined:"g")})},743:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(179));const s=r(n(884));const o=n(378);const a=n(94);const u=n(208);const l=n(927);const c=n(628);const f=n(202);const p=n(913);const d=r(n(314));const h=n(736);const g=r(n(354));const m=n(277);const y=2;class Document{constructor(e,t){this.type=e;this.children=t;this.printFieldError=(({error:e,path:t},n)=>{if(e.type==="emptySelect"){const t=n?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`select`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} must not be empty.${t}`}if(e.type==="emptyInclude"){const t=n?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`include`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} must not be empty.${t}`}if(e.type==="noTrueSelect"){const t=n?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;return`The ${i.default.redBright("`select`")} statement for type ${i.default.bold(o.getOutputTypeName(e.field.outputType.type))} needs ${i.default.bold("at least one truthy value")}.`}if(e.type==="includeAndSelect"){return`Please ${i.default.bold("either")} use ${i.default.greenBright("`include`")} or ${i.default.greenBright("`select`")}, but ${i.default.redBright("not both")} at the same time.`}if(e.type==="invalidFieldName"){const t=e.isInclude?"include":"select";const r=e.isIncludeScalar?"Invalid scalar":"Unknown";const s=n?"":` Available options are listed in ${i.default.greenBright.dim("green")}.`;let o=`${r} field ${i.default.redBright(`\`${e.providedName}\``)} for ${i.default.bold(t)} statement on model ${i.default.bold.white(e.modelName)}.${s}`;if(e.didYouMean){o+=` Did you mean ${i.default.greenBright(`\`${e.didYouMean}\``)}?`}if(e.isIncludeScalar){o+=`\nNote, that ${i.default.bold("include")} statements only accept relation fields.`}return o}if(e.type==="invalidFieldType"){const t=`Invalid value ${i.default.redBright(`${d.default(e.providedValue)}`)} of type ${i.default.redBright(o.getGraphQLType(e.providedValue,undefined))} for field ${i.default.bold(`${e.fieldName}`)} on model ${i.default.bold.white(e.modelName)}. Expected either ${i.default.greenBright("true")} or ${i.default.greenBright("false")}.`;return t}});this.printArgError=(({error:e,path:t},n,r)=>{if(e.type==="invalidName"){let s=`Unknown arg ${i.default.redBright(`\`${e.providedName}\``)} in ${i.default.bold(t.join("."))} for type ${i.default.bold(e.outputType?e.outputType.name:o.getInputTypeName(e.originalType))}.`;if(e.didYouMeanField){s+=`\n→ Did you forget to wrap it with \`${i.default.greenBright("select")}\`? ${i.default.dim("e.g. "+i.default.greenBright(`{ select: { ${e.providedName}: ${e.providedValue} } }`))}`}else if(e.didYouMeanArg){s+=` Did you mean \`${i.default.greenBright(e.didYouMeanArg)}\`?`;if(!n&&!r){s+=` ${i.default.dim("Available args:")}\n`+o.stringifyInputType(e.originalType,true)}}else{if(e.originalType.fields.length===0){s+=` The field ${i.default.bold(e.originalType.name)} has no arguments.`}else if(!n&&!r){s+=` Available args:\n\n`+o.stringifyInputType(e.originalType,true)}}return s}if(e.type==="invalidType"){let t=d.default(e.providedValue,{indent:" "});const n=t.split("\n").length>1;if(n){t=`\n${t}\n`}if(e.requiredType.bestFittingType.kind==="enum"){return`Argument ${i.default.bold(e.argName)}: Provided value ${i.default.redBright(t)}${n?"":" "}of type ${i.default.redBright(o.getGraphQLType(e.providedValue))} on ${i.default.bold(`prisma.${this.children[0].name}`)} is not a ${i.default.greenBright(o.wrapWithList(o.stringifyGraphQLType(e.requiredType.bestFittingType.kind),e.requiredType.bestFittingType.isList))}.\n→ Possible values: ${e.requiredType.bestFittingType.type.values.map(t=>i.default.greenBright(`${o.stringifyGraphQLType(e.requiredType.bestFittingType.type)}.${t}`)).join(", ")}`}let r=".";if(isInputArgType(e.requiredType.bestFittingType.type)){r=":\n"+o.stringifyInputType(e.requiredType.bestFittingType.type)}let s=`${e.requiredType.inputType.map(t=>i.default.greenBright(o.wrapWithList(o.stringifyGraphQLType(t.type),e.requiredType.bestFittingType.isList))).join(" or ")}${r}`;const a=e.requiredType.inputType.length===2&&e.requiredType.inputType.find(e=>isInputArgType(e.type))||null;if(a){s+=`\n`+o.stringifyInputType(a.type,true)}return`Argument ${i.default.bold(e.argName)}: Got invalid value ${i.default.redBright(t)}${n?"":" "}on ${i.default.bold(`prisma.${this.children[0].name}`)}. Provided ${i.default.redBright(o.getGraphQLType(e.providedValue))}, expected ${s}`}if(e.type==="missingArg"){const n=t.length===1&&t[0]===e.missingName?"":` for ${i.default.bold(`${t.join(".")}`)}`;return`Argument ${i.default.greenBright(e.missingName)}${n} is missing.`}if(e.type==="atLeastOne"){const n=r?"":` Available args are listed in ${i.default.dim.green("green")}.`;return`Argument ${i.default.bold(t.join("."))} of type ${i.default.bold(e.inputType.name)} needs ${i.default.greenBright("at least one")} argument.${n}`}if(e.type==="atMostOne"){const n=r?"":` Please choose one. ${i.default.dim("Available args:")} \n${o.stringifyInputType(e.inputType,true)}`;return`Argument ${i.default.bold(t.join("."))} of type ${i.default.bold(e.inputType.name)} needs ${i.default.greenBright("exactly one")} argument, but you provided ${e.providedKeys.map(e=>i.default.redBright(e)).join(" and ")}.${n}`}});this.type=e;this.children=t}toString(){return`${this.type} {\n${s.default(this.children.map(String).join("\n"),y)}\n}`}validate(e,t=false,n,r){if(!e){e={}}const a=this.children.filter(e=>e.hasInvalidChild||e.hasInvalidArg);if(a.length===0){return}const u=[];const l=[];const c=e&&e.select?"select":e.include?"include":undefined;for(const e of a){const n=e.collectErrors(c);u.push(...n.fieldErrors.map(e=>({...e,path:t?e.path:e.path.slice(1)})));l.push(...n.argErrors.map(e=>({...e,path:t?e.path:e.path.slice(1)})))}const d=this.children[0].name;const h=t?this.type:d;const m=[];const y=[];const b=[];for(const t of u){const n=this.normalizePath(t.path,e).join(".");if(t.error.type==="invalidFieldName"){m.push(n);const e=t.error.outputType;const{isInclude:r}=t.error;e.fields.filter(e=>r?e.outputType.kind==="object":true).forEach(e=>{const t=n.split(".");b.push({path:`${t.slice(0,t.length-1).join(".")}.${e.name}`,type:"true",isRequired:false})})}else if(t.error.type==="includeAndSelect"){m.push("select");m.push("include")}else{y.push(n)}if(t.error.type==="emptySelect"||t.error.type==="noTrueSelect"||t.error.type==="emptyInclude"){const n=this.normalizePath(t.path,e);const r=n.slice(0,n.length-1).join(".");const i=t.error.field.outputType.type;i.fields.filter(e=>t.error.type==="emptyInclude"?e.outputType.kind==="object":true).forEach(e=>{b.push({path:`${r}.${e.name}`,type:"true",isRequired:false})})}}for(const t of l){const n=this.normalizePath(t.path,e).join(".");if(t.error.type==="invalidName"){m.push(n)}else if(t.error.type!=="missingArg"&&t.error.type!=="atLeastOne"){y.push(n)}else if(t.error.type==="missingArg"){const e=t.error.missingType.length===1?t.error.missingType[0].type:t.error.missingType.map(e=>o.getInputTypeName(e.type)).join(" | ");b.push({path:n,type:o.inputTypeToJson(e,true,n.split("where.").length===2),isRequired:t.error.missingType[0].isRequired})}}const w=o=>{const a=l.some(e=>e.error.type==="missingArg"&&e.error.missingType[0].isRequired);const c=l.some(e=>e.error.type==="missingArg"&&!e.error.missingType[0].isRequired);const w=c||a;let _="";if(a){_+=`\n${i.default.dim("Note: Lines with ")}${i.default.reset.greenBright("+")} ${i.default.dim("are required")}`}if(c){if(_.length===0){_="\n"}if(a){_+=i.default.dim(`, lines with ${i.default.green("?")} are optional`)}else{_+=i.default.dim(`Note: Lines with ${i.default.green("?")} are optional`)}_+=i.default.dim(".")}const C=`${l.filter(e=>e.error.type!=="missingArg"||e.error.missingType[0].isRequired).map(e=>this.printArgError(e,w,r==="minimal")).join("\n")}\n${u.map(e=>this.printFieldError(e,r==="minimal")).join("\n")}`;if(r==="minimal"){return g.default(C)}const{stack:v,indent:T,afterLines:E}=p.printStack({callsite:o,originalMethod:n||h});const P=`${v}${s.default(f.printJsonWithErrors(t?{[d]:e}:e,m,y,b),T).slice(T)}${i.default.dim(E)}\n\n${C}${_}\n`;if(process.env.NO_COLOR||r==="colorless"){return g.default(P)}return P};const _=new PrismaClientValidationError(w());if(process.env.NODE_ENV!=="production"){Object.defineProperty(_,"render",{get:()=>w,enumerable:false})}throw _}normalizePath(e,t){const n=e.slice();const r=[];let i;let s=t;while((i=n.shift())!==undefined){if(!Array.isArray(s)&&i===0){continue}if(i==="select"){if(!s[i]){s=s.include}else{s=s[i]}}else if(s[i]){s=s[i]}r.push(i)}return r}}t.Document=Document;class PrismaClientValidationError extends Error{}t.PrismaClientValidationError=PrismaClientValidationError;class Field{constructor({name:e,args:t,children:n,error:r,schemaField:i}){this.name=e;this.args=t;this.children=n;this.error=r;this.schemaField=i;this.hasInvalidChild=n?n.some(e=>Boolean(e.error||e.hasInvalidArg||e.hasInvalidChild)):false;this.hasInvalidArg=t?t.hasInvalidArg:false}toString(){let e=this.name;if(this.error){return e+" # INVALID_FIELD"}if(this.args&&this.args.args&&this.args.args.length>0){if(this.args.args.length===1){e+=`(${this.args.toString()})`}else{e+=`(\n${s.default(this.args.toString(),y)}\n)`}}if(this.children){e+=` {\n${s.default(this.children.map(String).join("\n"),y)}\n}`}return e}collectErrors(e="select"){const t=[];const n=[];if(this.error){t.push({path:[this.name],error:this.error})}if(this.children){for(const r of this.children){const i=r.collectErrors(e);t.push(...i.fieldErrors.map(t=>({...t,path:[this.name,e,...t.path]})));n.push(...i.argErrors.map(t=>({...t,path:[this.name,e,...t.path]})))}}if(this.args){n.push(...this.args.collectErrors().map(e=>({...e,path:[this.name,...e.path]})))}return{fieldErrors:t,argErrors:n}}}t.Field=Field;class Args{constructor(e=[]){this.args=e;this.hasInvalidArg=e?e.some(e=>Boolean(e.hasError)):false}toString(){if(this.args.length===0){return""}return`${this.args.map(e=>e.toString()).filter(e=>e).join("\n")}`}collectErrors(){if(!this.hasInvalidArg){return[]}return m.flatMap(this.args,e=>e.collectErrors())}}t.Args=Args;function stringify(e,t,n,r){if(e===undefined){return null}if(e===null){return"null"}if(r&&typeof e==="string"){return e}if(r&&Array.isArray(e)){return`[${e.join(", ")}]`}return JSON.stringify(e,t,n)}class Arg{constructor({key:e,value:t,argType:n,isEnum:r=false,error:i,schemaArg:s}){this.key=e;this.value=t;this.argType=n;this.isEnum=r;this.error=i;this.schemaArg=s;this.hasError=Boolean(i)||(t instanceof Args?t.hasInvalidArg:false)||Array.isArray(t)&&t.some(e=>e instanceof Args?e.hasInvalidArg:false)}_toString(e,t){if(typeof e==="undefined"){return undefined}if(e instanceof Args){return`${t}: {\n${s.default(e.toString(),2)}\n}`}if(Array.isArray(e)){const n=!e.some(e=>typeof e==="object");return`${t}: [${n?"":"\n"}${s.default(e.map(e=>{if(e instanceof Args){return`{\n${s.default(e.toString(),y)}\n}`}return stringify(e,null,2,this.isEnum)}).join(`,${n?" ":"\n"}`),n?0:y)}${n?"":"\n"}]`}return`${t}: ${stringify(e,null,2,this.isEnum)}`}toString(){return this._toString(this.value,this.key)}collectErrors(){if(!this.hasError){return[]}const e=[];if(this.error){e.push({error:this.error,path:[this.key]})}if(Array.isArray(this.value)){e.push(...m.flatMap(this.value,(e,t)=>{if(!e.collectErrors){return[]}return e.collectErrors().map(e=>{return{...e,path:[this.key,t,...e.path]}})}))}if(this.value instanceof Args){e.push(...this.value.collectErrors().map(e=>({...e,path:[this.key,...e.path]})))}return e}}t.Arg=Arg;function makeDocument({dmmf:e,rootTypeName:t,rootField:n,select:r}){if(!r){r={}}const i=t==="query"?e.queryType:e.mutationType;const s={args:[],outputType:{isList:false,isRequired:true,type:i,kind:"object"},name:t};const o=selectionToFields(e,{[n]:r},s,[t]);return new Document(t,o)}t.makeDocument=makeDocument;function transformDocument(e){function transformWhereArgs(e){return new Args(m.flatMap(e.args,e=>{if(isArgsArray(e.value)){const t=e.value.map(e=>{return transformWhereArgs(e)});return[new Arg({...e,value:t})]}else if(e.value instanceof Args){if(e.schemaArg&&!e.schemaArg.isRelationFilter){return e.value.args.map(t=>{return new Arg({key:getFilterArgName(e.key,t.key),value:t.value,argType:u.deepGet(e,["value","args","0","argType"]),schemaArg:t.schemaArg})})}}return[e]}))}function transformOrderArg(e){if(e.value instanceof Args){const t=e.value.args[0];if(t&&t.value){return new Arg({...e,isEnum:true,value:`${t.key}_${t.value.toString().toUpperCase()}`})}}return e}return h.visit(e,{Arg:{enter(e){const{argType:t,schemaArg:n}=e;if(!t){return undefined}if(isInputArgType(t)){if(t.isOrderType){return transformOrderArg(e)}if(t.isWhereType&&n){let t=e.value;if(isArgsArray(e.value)){t=e.value.map(e=>transformWhereArgs(e))}else if(e.value instanceof Args){t=transformWhereArgs(e.value)}return new Arg({...e,value:t})}}return undefined}}})}t.transformDocument=transformDocument;function isArgsArray(e){if(Array.isArray(e)){return e.every(e=>e instanceof Args)}return false}function getFilterArgName(e,t){if(t==="equals"){return e}return`${e}_${convertToSnakeCase(t)}`}function convertToSnakeCase(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function selectionToFields(e,t,n,r){const i=n.outputType.type;return Object.entries(t).reduce((t,[n,s])=>{const u=i.fields.find(e=>e.name===n);if(!u){t.push(new Field({name:n,children:[],error:{type:"invalidFieldName",modelName:i.name,providedName:n,didYouMean:o.getSuggestion(n,i.fields.map(e=>e.name)),outputType:i}}));return t}if(typeof s!=="boolean"&&u.outputType.kind==="scalar"&&u.name!=="executeRaw"){t.push(new Field({name:n,children:[],error:{type:"invalidFieldType",modelName:i.name,fieldName:n,providedValue:s}}));return t}if(s===false){return t}const l={name:u.name,fields:u.args};const f=typeof s==="object"?c.omit(s,["include","select"]):undefined;const p=f?objectToArgs(f,l,[],typeof u==="string"?undefined:u.outputType.type):undefined;const d=u.outputType.kind==="object";if(s){if(s.select&&s.include){t.push(new Field({name:n,children:[new Field({name:"include",args:new Args,error:{type:"includeAndSelect",field:u}})]}))}else if(s.include){const e=Object.keys(s.include);if(e.length===0){t.push(new Field({name:n,children:[new Field({name:"include",args:new Args,error:{type:"emptyInclude",field:u}})]}));return t}if(u.outputType.kind==="object"){const n=u.outputType.type;const r=n.fields.filter(e=>e.outputType.kind==="object").map(e=>e.name);const i=e.filter(e=>!r.includes(e));if(i.length>0){t.push(...i.map(e=>new Field({name:e,children:[new Field({name:e,args:new Args,error:{type:"invalidFieldName",modelName:n.name,outputType:n,providedName:e,didYouMean:o.getSuggestion(e,r)||undefined,isInclude:true,isIncludeScalar:n.fields.some(t=>t.name===e)}})]})));return t}}}else if(s.select){const e=Object.values(s.select);if(e.length===0){t.push(new Field({name:n,children:[new Field({name:"select",args:new Args,error:{type:"emptySelect",field:u}})]}));return t}const r=e.filter(e=>e);if(r.length===0){t.push(new Field({name:n,children:[new Field({name:"select",args:new Args,error:{type:"noTrueSelect",field:u}})]}));return t}}}const h=d?getDefaultSelection(u.outputType.type):null;let g=h;if(s){if(s.select){g=s.select}else if(s.include){g=a.deepExtend(h,s.include)}}const m=g!==false&&d?selectionToFields(e,g,u,[...r,n]):undefined;t.push(new Field({name:n,args:p,children:m,schemaField:u}));return t},[])}t.selectionToFields=selectionToFields;function getDefaultSelection(e){return e.fields.reduce((e,t)=>{if(t.outputType.kind==="scalar"||t.outputType.kind==="enum"){e[t.name]=true}else{if(t.outputType.type.isEmbedded){e[t.name]={select:getDefaultSelection(t.outputType.type)}}}return e},{})}function getInvalidTypeArg(e,t,n,r){const i=new Arg({key:e,value:t,isEnum:r.kind==="enum",argType:r.type,error:{type:"invalidType",providedValue:t,argName:e,requiredType:{inputType:n.inputType,bestFittingType:r}}});return i}function hasCorrectScalarType(e,t,n){const{type:r}=n;const i=t.inputType[0].isList;const s=o.wrapWithList(o.stringifyGraphQLType(r),i);const a=o.getGraphQLType(e,r);if(i&&a==="List<>"){return true}if(s==="Json"){return true}if(a==="DateTime"&&s==="String"){return true}if(a==="List<DateTime>"&&s==="List<String>"){return true}if(a==="UUID"&&s==="String"){return true}if(a==="List<UUID>"&&s==="List<String>"){return true}if(a==="String"&&s==="ID"){return true}if(a==="List<String>"&&s==="List<ID>"){return true}if(a==="Int"&&s==="Float"){return true}if(a==="List<Int>"&&s==="List<Float>"){return true}if(a==="Int"&&s==="Long"){return true}if(a==="List<Int>"&&s==="List<Long>"){return true}if(a===s){return true}if(!n.isRequired&&e===null){return true}return false}const b=e=>l.filterObject(e,(e,t)=>t!==undefined);function valueToArg(e,t,n){const r=n.inputType[0];if(typeof t==="undefined"){if(!r.isRequired){return null}return new Arg({key:e,value:t,isEnum:r.kind==="enum",error:{type:"missingArg",missingName:e,missingType:n.inputType,atLeastOne:false,atMostOne:false}})}if(t===null&&n.inputType.length===1){const e=n.inputType[0];if(isInputArgType(e.type)&&e.type.isOrderType){return null}}if(!r.isList){const i=n.inputType.map(i=>{if(isInputArgType(i.type)){if(typeof t!=="object"){return getInvalidTypeArg(e,t,n,i)}else{let s=b(t);if(i.type.isWhereType&&s){for(const e of i.type.fields){if(e.nullEqualsUndefined&&s[e.name]===null){delete s[e.name]}}}if(i.type.isOrderType){s=l.filterObject(s,(e,t)=>t!==null)}let o;const a=Object.keys(s||{});const u=a.length;if(u===0&&i.type.atLeastOne){o={type:"atLeastOne",key:e,inputType:i.type}}if(u>1&&i.type.atMostOne){o={type:"atMostOne",key:e,inputType:i.type,providedKeys:a}}return new Arg({key:e,value:s===null?null:objectToArgs(s,i.type,n.inputType),isEnum:r.kind==="enum",error:o,argType:i.type,schemaArg:n})}}else{return scalarToArg(e,t,n,i)}});if(i.length===1){return i[0]}const s=i.find(e=>!e.hasError);if(s){return s}const o=(e,t)=>{if(t===null&&(e==="null"||!isInputArgType(e))){return true}return isInputArgType(e)?typeof t==="object":typeof t!=="object"};if(i.length>1){const e=i.filter(e=>o(e.argType,t));const n=e.length>0?e:i;const r=n.reduce((e,t)=>{const n=t.collectErrors().length;if(n<e.numErrors){return{arg:t,numErrors:n}}return e},{arg:null,numErrors:Infinity});return r.arg}}if(n.inputType.length>1){throw new Error(`List types with union input types are not supported`)}if(!Array.isArray(t)){t=[t]}if(r.kind==="enum"||r.kind==="scalar"){return scalarToArg(e,t,n,r)}const i=r.type;const s=i.atLeastOne?t.some(e=>!e||Object.keys(b(e)).length===0):false;const o=s?{inputType:i,key:e,type:"atLeastOne"}:undefined;return new Arg({key:e,value:t.map(i=>{if(typeof i!=="object"||!t){return getInvalidTypeArg(e,i,n,r)}return objectToArgs(i,r.type)}),isEnum:false,argType:r.type,schemaArg:n,error:o})}function isInputArgType(e){if(typeof e==="string"){return false}if(e.hasOwnProperty("values")){return false}return true}t.isInputArgType=isInputArgType;function scalarToArg(e,t,n,r){if(hasCorrectScalarType(t,n,r)){return new Arg({key:e,value:t,isEnum:n.inputType[0].kind==="enum",argType:r.type,schemaArg:n})}return getInvalidTypeArg(e,t,n,r)}function objectToArgs(e,t,n,r){const i=b(e);const{fields:s}=t;const a=s.filter(e=>e.inputType.some(e=>e.isRequired)).map(e=>[e.name,undefined]);const u=o.unionBy(Object.entries(i||{}),a,e=>e[0]);const l=u.reduce((e,[i,a])=>{const u=s.find(e=>e.name===i);if(!u){const u=typeof a==="boolean"&&r&&r.fields.some(e=>e.name===i)?i:null;e.push(new Arg({key:i,value:a,error:{type:"invalidName",providedName:i,providedValue:a,didYouMeanField:u,didYouMeanArg:!u&&o.getSuggestion(i,[...s.map(e=>e.name),"select"])||undefined,originalType:t,possibilities:n,outputType:r}}));return e}const l=valueToArg(i,a,u);if(l){e.push(l)}return e},[]);if(u.length===0&&t.atLeastOne||l.find(e=>e.error&&e.error.type==="missingArg")){const e=t.fields.filter(e=>!u.some(([t])=>t===e.name));l.push(...e.map(e=>{const n=e.inputType[0];return new Arg({key:e.name,value:undefined,isEnum:n.kind==="enum",error:{type:"missingArg",missingName:e.name,missingType:e.inputType,atLeastOne:t.atLeastOne||false,atMostOne:t.atMostOne||false}})}))}return new Args(l)}function unpack({document:e,path:t,data:n}){const r=u.deepGet(n,t);if(r==="undefined"){return null}if(typeof r!=="object"){return r}const i=getField(e,t);return mapDates({field:i,data:r})}t.unpack=unpack;function mapDates({field:e,data:t}){if(!t||typeof t!=="object"||!e.children||!e.schemaField){return t}for(const n of e.children){if(n.schemaField&&n.schemaField.outputType.type==="DateTime"){if(Array.isArray(t)){for(const e of t){if(typeof e[n.name]!=="undefined"){e[n.name]=e[n.name]?new Date(e[n.name]):e[n.name]}}}else{if(typeof t[n.name]!=="undefined"){t[n.name]=t[n.name]?new Date(t[n.name]):t[n.name]}}}if(n.schemaField&&n.schemaField.outputType.kind==="object"){if(Array.isArray(t)){t.forEach(e=>mapDates({field:n,data:e[n.name]}))}else{mapDates({field:n,data:t[n.name]})}}}return t}t.mapDates=mapDates;function getField(e,t){const n=t.slice();const r=n.shift();let i=e.children.find(e=>e.name===r);if(!i){throw new Error(`Could not find field ${r} in document ${e}`)}while(n.length>0){const e=n.shift();if(!i.children){throw new Error(`Can't get children for field ${i} with child ${e}`)}const t=i.children.find(t=>t.name===e);if(!t){throw new Error(`Can't find child ${e} of field ${i}`)}i=t}return i}t.getField=getField},747:function(e){e.exports=require("fs")},761:function(e){e.exports=require("zlib")},802:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n;(function(e){let t;(function(e){e["findOne"]="findOne";e["findMany"]="findMany";e["create"]="create";e["update"]="update";e["updateMany"]="updateMany";e["upsert"]="upsert";e["delete"]="delete";e["deleteMany"]="deleteMany"})(t=e.ModelAction||(e.ModelAction={}))})(n=t.DMMF||(t.DMMF={}))},803:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});class Dataloader{constructor(e){this.loader=e}request(e){if(!this.currentBatch){this.currentBatch=[];process.nextTick(()=>{this.dispatchBatch()})}return new Promise((t,n)=>{this.currentBatch.push({request:e,resolve:t,reject:n})})}dispatchBatch(){if(!this.currentBatch){throw new Error(`Can't dispatch without existing batch`)}const e=this.currentBatch;this.currentBatch=undefined;this.loader(e.map(e=>e.request)).then(t=>{if(t instanceof Error){for(let n=0;n<e.length;n++){e[n].reject(t)}}else{for(let n=0;n<e.length;n++){const r=t[n];if(r instanceof Error){e[n].reject(r)}else{e[n].resolve(r)}}}}).catch(t=>{for(let n=0;n<e.length;n++){e[n].reject(t)}})}}t.Dataloader=Dataloader},818:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(747));const s=r(n(426));const o=s.default("plusX");function plusX(e){const t=i.default.statSync(e);const n=t.mode|64|8|1;if(t.mode===n){o(`Execution permissions of ${e} are fine`);return}const r=n.toString(8).slice(-3);o(`Have to call plusX on ${e}`);i.default.chmodSync(e,r)}t.plusX=plusX;function fixPlatforms(e,t){e=e||[];if(!e.includes("native")){return["native",...e]}return[...e,t]}t.fixPlatforms=fixPlatforms},819:function(e,t,n){const r=n(867);const i=n(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.colors=[6,2,3,4,5,1];try{const e=n(543);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>{return t.toUpperCase()});let r=process.env[t];if(/^(yes|on|true|enabled)$/i.test(r)){r=true}else if(/^(no|off|false|disabled)$/i.test(r)){r=false}else if(r==="null"){r=null}else{r=Number(r)}e[n]=r;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:r}=this;if(r){const r=this.color;const i="[3"+(r<8?r:"8;5;"+r);const s=` ${i};1m${n} [0m`;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++){e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}}e.exports=n(107)(t);const{formatters:s}=e.exports;s.o=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},829:function(e,t,n){const r=n(852);const i={};for(const e of Object.keys(r)){i[r[e]]=e}const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e])){throw new Error("missing channels property: "+e)}if(!("labels"in s[e])){throw new Error("missing channel labels property: "+e)}if(s[e].labels.length!==s[e].channels){throw new Error("channel and label counts mismatch: "+e)}const{channels:t,labels:n}=s[e];delete s[e].channels;delete s[e].labels;Object.defineProperty(s[e],"channels",{value:t});Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.min(t,n,r);const s=Math.max(t,n,r);const o=s-i;let a;let u;if(s===i){a=0}else if(t===s){a=(n-r)/o}else if(n===s){a=2+(r-t)/o}else if(r===s){a=4+(t-n)/o}a=Math.min(a*60,360);if(a<0){a+=360}const l=(i+s)/2;if(s===i){u=0}else if(l<=.5){u=o/(s+i)}else{u=o/(2-s-i)}return[a,u*100,l*100]};s.rgb.hsv=function(e){let t;let n;let r;let i;let s;const o=e[0]/255;const a=e[1]/255;const u=e[2]/255;const l=Math.max(o,a,u);const c=l-Math.min(o,a,u);const f=function(e){return(l-e)/6/c+1/2};if(c===0){i=0;s=0}else{s=c/l;t=f(o);n=f(a);r=f(u);if(o===l){i=r-n}else if(a===l){i=1/3+t-r}else if(u===l){i=2/3+n-t}if(i<0){i+=1}else if(i>1){i-=1}}return[i*360,s*100,l*100]};s.rgb.hwb=function(e){const t=e[0];const n=e[1];let r=e[2];const i=s.rgb.hsl(e)[0];const o=1/255*Math.min(t,Math.min(n,r));r=1-1/255*Math.max(t,Math.max(n,r));return[i,o*100,r*100]};s.rgb.cmyk=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.min(1-t,1-n,1-r);const s=(1-t-i)/(1-i)||0;const o=(1-n-i)/(1-i)||0;const a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}s.rgb.keyword=function(e){const t=i[e];if(t){return t}let n=Infinity;let s;for(const t of Object.keys(r)){const i=r[t];const o=comparativeDistance(e,i);if(o<n){n=o;s=t}}return s};s.keyword.rgb=function(e){return r[e]};s.rgb.xyz=function(e){let t=e[0]/255;let n=e[1]/255;let r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805;const s=t*.2126+n*.7152+r*.0722;const o=t*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0];let r=t[1];let i=t[2];n/=95.047;r/=100;i/=108.883;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16;const a=500*(n-r);const u=200*(r-i);return[o,a,u]};s.hsl.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;let i;let s;let o;if(n===0){o=r*255;return[o,o,o]}if(r<.5){i=r*(1+n)}else{i=r+n-r*n}const a=2*r-i;const u=[0,0,0];for(let e=0;e<3;e++){s=t+1/3*-(e-1);if(s<0){s++}if(s>1){s--}if(6*s<1){o=a+(i-a)*6*s}else if(2*s<1){o=i}else if(3*s<2){o=a+(i-a)*(2/3-s)*6}else{o=a}u[e]=o*255}return u};s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100;let r=e[2]/100;let i=n;const s=Math.max(r,.01);r*=2;n*=r<=1?r:2-r;i*=s<=1?s:2-s;const o=(r+n)/2;const a=r===0?2*i/(s+i):2*n/(r+n);return[t,a*100,o*100]};s.hsv.rgb=function(e){const t=e[0]/60;const n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6;const s=t-Math.floor(t);const o=255*r*(1-n);const a=255*r*(1-n*s);const u=255*r*(1-n*(1-s));r*=255;switch(i){case 0:return[r,u,o];case 1:return[a,r,o];case 2:return[o,r,u];case 3:return[o,a,r];case 4:return[u,o,r];case 5:return[r,o,a]}};s.hsv.hsl=function(e){const t=e[0];const n=e[1]/100;const r=e[2]/100;const i=Math.max(r,.01);let s;let o;o=(2-n)*r;const a=(2-n)*i;s=n*i;s/=a<=1?a:2-a;s=s||0;o/=2;return[t,s*100,o*100]};s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100;let r=e[2]/100;const i=n+r;let s;if(i>1){n/=i;r/=i}const o=Math.floor(6*t);const a=1-r;s=6*t-o;if((o&1)!==0){s=1-s}const u=n+s*(a-n);let l;let c;let f;switch(o){default:case 6:case 0:l=a;c=u;f=n;break;case 1:l=u;c=a;f=n;break;case 2:l=n;c=a;f=u;break;case 3:l=n;c=u;f=a;break;case 4:l=u;c=n;f=a;break;case 5:l=a;c=n;f=u;break}return[l*255,c*255,f*255]};s.cmyk.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;const i=e[3]/100;const s=1-Math.min(1,t*(1-i)+i);const o=1-Math.min(1,n*(1-i)+i);const a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};s.xyz.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;let i;let s;let o;i=t*3.2406+n*-1.5372+r*-.4986;s=t*-.9689+n*1.8758+r*.0415;o=t*.0557+n*-.204+r*1.057;i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92;s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92;o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92;i=Math.min(Math.max(0,i),1);s=Math.min(Math.max(0,s),1);o=Math.min(Math.max(0,o),1);return[i*255,s*255,o*255]};s.xyz.lab=function(e){let t=e[0];let n=e[1];let r=e[2];t/=95.047;n/=100;r/=108.883;t=t>.008856?t**(1/3):7.787*t+16/116;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16;const s=500*(t-n);const o=200*(n-r);return[i,s,o]};s.lab.xyz=function(e){const t=e[0];const n=e[1];const r=e[2];let i;let s;let o;s=(t+16)/116;i=n/500+s;o=s-r/200;const a=s**3;const u=i**3;const l=o**3;s=a>.008856?a:(s-16/116)/7.787;i=u>.008856?u:(i-16/116)/7.787;o=l>.008856?l:(o-16/116)/7.787;i*=95.047;s*=100;o*=108.883;return[i,s,o]};s.lab.lch=function(e){const t=e[0];const n=e[1];const r=e[2];let i;const s=Math.atan2(r,n);i=s*360/2/Math.PI;if(i<0){i+=360}const o=Math.sqrt(n*n+r*r);return[t,o,i]};s.lch.lab=function(e){const t=e[0];const n=e[1];const r=e[2];const i=r/360*2*Math.PI;const s=n*Math.cos(i);const o=n*Math.sin(i);return[t,s,o]};s.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?s.rgb.hsv(e)[2]:t;o=Math.round(o/50);if(o===0){return 30}let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));if(o===2){a+=60}return a};s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])};s.rgb.ansi256=function(e){const t=e[0];const n=e[1];const r=e[2];if(t===n&&n===r){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}const i=16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return i};s.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}const n=(~~(e>50)+1)*.5;const r=(t&1)*n*255;const i=(t>>1&1)*n*255;const s=(t>>2&1)*n*255;return[r,i,s]};s.ansi256.rgb=function(e){if(e>=232){const t=(e-232)*10+8;return[t,t,t]}e-=16;let t;const n=Math.floor(e/36)/5*255;const r=Math.floor((t=e%36)/6)/5*255;const i=t%6/5*255;return[n,r,i]};s.rgb.hex=function(e){const t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);const n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}let n=t[0];if(t[0].length===3){n=n.split("").map(e=>{return e+e}).join("")}const r=parseInt(n,16);const i=r>>16&255;const s=r>>8&255;const o=r&255;return[i,s,o]};s.rgb.hcg=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const i=Math.max(Math.max(t,n),r);const s=Math.min(Math.min(t,n),r);const o=i-s;let a;let u;if(o<1){a=s/(1-o)}else{a=0}if(o<=0){u=0}else if(i===t){u=(n-r)/o%6}else if(i===n){u=2+(r-t)/o}else{u=4+(t-n)/o}u/=6;u%=1;return[u*360,o*100,a*100]};s.hsl.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=n<.5?2*t*n:2*t*(1-n);let i=0;if(r<1){i=(n-.5*r)/(1-r)}return[e[0],r*100,i*100]};s.hsv.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=t*n;let i=0;if(r<1){i=(n-r)/(1-r)}return[e[0],r*100,i*100]};s.hcg.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;if(n===0){return[r*255,r*255,r*255]}const i=[0,0,0];const s=t%1*6;const o=s%1;const a=1-o;let u=0;switch(Math.floor(s)){case 0:i[0]=1;i[1]=o;i[2]=0;break;case 1:i[0]=a;i[1]=1;i[2]=0;break;case 2:i[0]=0;i[1]=1;i[2]=o;break;case 3:i[0]=0;i[1]=a;i[2]=1;break;case 4:i[0]=o;i[1]=0;i[2]=1;break;default:i[0]=1;i[1]=0;i[2]=a}u=(1-n)*r;return[(n*i[0]+u)*255,(n*i[1]+u)*255,(n*i[2]+u)*255]};s.hcg.hsv=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);let i=0;if(r>0){i=t/r}return[e[0],i*100,r*100]};s.hcg.hsl=function(e){const t=e[1]/100;const n=e[2]/100;const r=n*(1-t)+.5*t;let i=0;if(r>0&&r<.5){i=t/(2*r)}else if(r>=.5&&r<1){i=t/(2*(1-r))}return[e[0],i*100,r*100]};s.hcg.hwb=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};s.hwb.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=1-n;const i=r-t;let s=0;if(i<1){s=(r-i)/(1-i)}return[e[0],i*100,s*100]};s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};s.gray.hsl=function(e){return[0,0,e[0]]};s.gray.hsv=s.gray.hsl;s.gray.hwb=function(e){return[0,100,e[0]]};s.gray.cmyk=function(e){return[0,0,0,e[0]]};s.gray.lab=function(e){return[e[0],0,0]};s.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255;const n=(t<<16)+(t<<8)+t;const r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};s.rgb.gray=function(e){const t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},835:function(e){e.exports=require("url")},840:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n="<unknown>";function parse(e){var t=e.split("\n");return t.reduce(function(e,t){var n=parseChrome(t)||parseWinjs(t)||parseGecko(t)||parseNode(t)||parseJSC(t);if(n){e.push(n)}return e},[])}var r=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;var i=/\((\S*)(?::(\d+))(?::(\d+))\)/;function parseChrome(e){var t=r.exec(e);if(!t){return null}var s=t[2]&&t[2].indexOf("native")===0;var o=t[2]&&t[2].indexOf("eval")===0;var a=i.exec(t[2]);if(o&&a!=null){t[2]=a[1];t[3]=a[2];t[4]=a[3]}return{file:!s?t[2]:null,methodName:t[1]||n,arguments:s?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseWinjs(e){var t=s.exec(e);if(!t){return null}return{file:t[2],methodName:t[1]||n,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}var o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;var a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function parseGecko(e){var t=o.exec(e);if(!t){return null}var r=t[3]&&t[3].indexOf(" > eval")>-1;var i=a.exec(t[3]);if(r&&i!=null){t[3]=i[1];t[4]=i[2];t[5]=null}return{file:t[3],methodName:t[1]||n,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var u=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function parseJSC(e){var t=u.exec(e);if(!t){return null}return{file:t[3],methodName:t[1]||n,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}var l=/^\s*at (?:((?:\[object object\])?.+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseNode(e){var t=l.exec(e);if(!t){return null}return{file:t[2],methodName:t[1]||n,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}t.parse=parse},851:function(e,t,n){t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}r++;if(e==="%c"){i=r}});t.splice(i,0,n)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(107)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},852:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},867:function(e){e.exports=require("tty")},884:function(e){"use strict";e.exports=((e,t=1,n)=>{n={indent:" ",includeEmptyLines:false,...n};if(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 n.indent!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``)}if(t===0){return e}const r=n.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,n.indent.repeat(t))})},888:function(e,t,n){const r=n(829);function buildGraph(){const e={};const t=Object.keys(r);for(let n=t.length,r=0;r<n;r++){e[t[r]]={distance:-1,parent:null}}return e}function deriveBFS(e){const t=buildGraph();const n=[e];t[e].distance=0;while(n.length){const e=n.pop();const i=Object.keys(r[e]);for(let r=i.length,s=0;s<r;s++){const r=i[s];const o=t[r];if(o.distance===-1){o.distance=t[e].distance+1;o.parent=e;n.unshift(r)}}}return t}function link(e,t){return function(n){return t(e(n))}}function wrapConversion(e,t){const n=[t[e].parent,e];let i=r[t[e].parent][e];let s=t[e].parent;while(t[s].parent){n.unshift(t[s].parent);i=link(r[t[s].parent][s],i);s=t[s].parent}i.conversion=n;return i}e.exports=function(e){const t=deriveBFS(e);const n={};const r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){const e=r[i];const s=t[e];if(s.parent===null){continue}n[e]=wrapConversion(e,t)}return n}},906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function isRustError(e){return typeof e.is_panic!=="undefined"}t.isRustError=isRustError;function convertLog(e){const t=isQueryLog(e.fields);const n=t?"query":e.level.toLowerCase();return{...e,level:n,timestamp:new Date((new Date).getFullYear()+" "+e.timestamp)}}t.convertLog=convertLog;function isQueryLog(e){return Boolean(e.query)}},913:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=r(n(179));const o=i(n(840));const a=n(243);const u=n(415);const l=r(n(426));const c=l.default("printStack");function renderN(e,t){const n=String(t).length;const r=String(e).length;if(r>=n){return String(e)}return String(" ".repeat(n-r)+e)}t.printStack=(({callsite:e,originalMethod:t,onUs:r})=>{const i=20;let l=":";let f="\n";let p="";let d=0;let h=`prisma.${t}()`;c("callsite",e);if(e&&typeof window==="undefined"){const t=o.parse(e);const c=t.find((e,t)=>{if(t<2){if(e.methodName.includes("Object.")){return false}}return e.file&&!e.file.includes("@prisma")&&!e.methodName.includes("new ")&&e.methodName.split(".").length<4});if(process.env.NODE_ENV!=="production"&&c&&c.file&&c.lineNumber&&c.column&&!c.file.startsWith("internal/")){const t=c.file;const o=c.lineNumber;l=e?` in\n${s.default.underline(`${c.file}:${c.lineNumber}:${c.column}`)}`:"";const g=process.stdout.rows||20;const m=Math.max(0,o-5);const y=i+o-m;if(g>y){const e=n(747);if(e.existsSync(t)){const n=e.readFileSync(t,"utf-8");const i=n.split("\n").slice(m,o).join("\n");const c=u.dedent(i).split("\n");const g=c[c.length-1];if(!g||g.trim()===""){l=":"}else{const e=/(=|return)*\s+(await)?\s*(.*\()/;const t=g.match(e);if(t){h=`${t[3]})`}const n=g.indexOf("{");const i=a.highlightTS(c.map((e,t,i)=>!r&&t===i.length-1?e.slice(0,n>-1?n:e.length-1):e).join("\n")).split("\n");f="\n"+i.map((e,t)=>s.default.grey(renderN(t+m+1,o+m+1)+" ")+s.default.reset()+e).map((e,t,n)=>t===n.length-1?`${s.default.red.bold("→")} ${e}`:s.default.dim(" "+e)).join("\n")+"\n\n";p=")";d=String(o+m+1).length+getIndent(g)+1}}}}}function getIndent(e){let t=0;for(let n=0;n<e.length;n++){if(e.charAt(n)!==" "){return t}t++}return t}const g=r?s.default.red(`Oops, an unknown error occured! This is ${s.default.bold("on us")}, you did nothing wrong.\nIt occured in the ${s.default.bold(`\`${h}\``)} invocation${l}`):s.default.red(`Invalid ${s.default.bold(`\`${h}\``)} invocation${l}`);const m=`\n${g}\n${f}${s.default.reset()}`;return{indent:d,stack:m,afterLines:p,lastErrorHeight:i}})},917:function(e){"use strict";e.exports=(e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")})},927:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function filterObject(e,t){if(!e||typeof e!=="object"||typeof e.hasOwnProperty!=="function"){return e}const n={};for(const r in e){const i=e[r];if(e.hasOwnProperty(r)&&t(r,i)){n[r]=i}}return n}t.filterObject=filterObject},938:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(622));const s=n(129);const o=r(n(156));function getInternalDatamodelJson(e,t=i.default.join(__dirname,"../schema-inferrer-bin")){return new Promise((n,r)=>{const i=s.spawn(t,{stdio:["pipe","pipe",process.stderr]});i.on("error",function(e){console.error("[schema-inferrer-bin] error: %s",e);r(e)});i.on("exit",function(e,t){if(e!==0){console.error("[schema-inferrer-bin] exit: code=%s signal=%s",e,t)}r()});const a=o.default(i.stdout);a.on("data",e=>{const t=JSON.parse(e);const r=Buffer.from(JSON.stringify(t)).toString("base64");n(r)});const u=e.replace(/\n/g," ");i.stdin.write(JSON.stringify({dataModel:u})+"\n")})}t.getInternalDatamodelJson=getInternalDatamodelJson},941:function(e){"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const i=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi;const s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(e){const t=e[0]==="u";const n=e[1]==="{";if(t&&!n&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}if(t&&n){return String.fromCodePoint(parseInt(e.slice(2,-1),16))}return s.get(e)||e}function parseArguments(e,t){const n=[];const s=t.trim().split(/\s*,\s*/g);let o;for(const t of s){const s=Number(t);if(!Number.isNaN(s)){n.push(s)}else if(o=t.match(r)){n.push(o[2].replace(i,(e,t,n)=>t?unescape(t):n))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return n}function parseStyle(e){n.lastIndex=0;const t=[];let r;while((r=n.exec(e))!==null){const e=r[1];if(r[2]){const n=parseArguments(e,r[2]);t.push([e].concat(n))}else{t.push([e])}}return t}function buildStyle(e,t){const n={};for(const e of t){for(const t of e.styles){n[t[0]]=e.inverse?null:t.slice(1)}}let r=e;for(const[e,t]of Object.entries(n)){if(!Array.isArray(t)){continue}if(!(e in r)){throw new Error(`Unknown Chalk style: ${e}`)}r=t.length>0?r[e](...t):r[e]}return r}e.exports=((e,n)=>{const r=[];const i=[];let s=[];n.replace(t,(t,n,o,a,u,l)=>{if(n){s.push(unescape(n))}else if(a){const t=s.join("");s=[];i.push(r.length===0?t:buildStyle(e,r)(t));r.push({inverse:o,styles:parseStyle(a)})}else if(u){if(r.length===0){throw new Error("Found extraneous } in Chalk template literal")}i.push(buildStyle(e,r)(s.join("")));s=[];r.pop()}else{s.push(l)}});i.push(s.join(""));if(r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")})},942:function(e){"use strict";const t=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";t.writable=(e=>t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object");t.readable=(e=>t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object");t.duplex=(e=>t.writable(e)&&t.readable(e));t.transform=(e=>t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object");e.exports=t},994:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(n(179));t.orange=i.default.rgb(246,145,95);t.darkBrightBlue=i.default.rgb(107,139,140);t.blue=i.default.cyan;t.brightBlue=i.default.rgb(127,155,155);t.identity=(e=>e);t.theme={keyword:t.blue,entity:t.blue,value:t.brightBlue,punctuation:t.darkBrightBlue,directive:t.blue,function:t.blue,variable:t.brightBlue,string:i.default.greenBright,boolean:t.orange,number:i.default.cyan,comment:i.default.grey}}},function(e){"use strict";!function(){e.nmd=function(e){e.paths=[];if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});return e}}()});
^
Error:
[31mInvalid [1m`prisma.foo.create()`[22m invocation in[39m
[31m[4mC:\Users\Jan\Documents\throwaway\1832\create.js:5:12[24m[39m
[2m [90m1 [39m[36mconst[39m [38;2;107;139;140m{[39m PrismaClient [38;2;107;139;140m}[39m = [36mrequire[39m[38;2;107;139;140m([39m[92m'@prisma/client'[39m[38;2;107;139;140m)[39m
[22m
[2m [90m2 [39m
[22m
[2m [90m3 [39m[36mconst[39m prisma = [36mnew[39m PrismaClient[38;2;107;139;140m([39m[38;2;107;139;140m)[39m
[22m
[2m [90m4 [39m
[22m
[31m[1m→[22m[39m [90m5 [39mprisma[38;2;107;139;140m.[39mfoo[38;2;107;139;140m.[39m[36mcreate[39m[38;2;107;139;140m([39m
[31mInvalid [1m`prisma.foo.create()`[22m invocation:[39m
{
data: {
bar: [2m1.2345[22m[2m,[22m
[2m[22m[92m+ id: Int[39m
[92m[39m }[2m[22m
[2m[22m}
Argument [92mid[39m for [1mdata.id[22m is missing.
[2mNote: Lines with [22m[0m[92m+[39m[0m [2mare required[22m
at Object.i [as foo] (C:\Users\Jan\Documents\throwaway\1832\node_modules\@prisma\client\runtime\index.js:1:46154)
at Object.r.<computed> [as create] (C:\Users\Jan\Documents\throwaway\1832\node_modules\@prisma\client\runtime\index.js:1:47508)
at Object.<anonymous> (C:\Users\Jan\Documents\throwaway\1832\create.js:5:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11
(Output formatting stuff is because I piped stderr to a file.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Stop huge error output from testing-library - Stack Overflow
I would say the best solution would be to use the configure method and pass a custom function for getElementError which does what...
Read more >Error propagation results in unusually massive output error
This results in a measured height of 2±0.4254m, which is a massive error, almost 25%, which seems way to big considering the sensors...
Read more >File size too large" error **IN GENERAL
Resolution: The "File size too large" message indicates that a file being used as input to or being output by an ALEPH program...
Read more >Putting it All Together - The Big Book of PowerShell Error ...
If the command only needs to process a single input object, as in figure 4.4, I use ErrorAction Stop and handle errors with...
Read more >Why LSF generates abnormally large output file? - IBM
The application running in the job generates a huge output file when it runs into an error condition, that's why the job's output...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That is not relevant, why should without configuration output 132.942 characters before the actual error?
(Again, this is NOT about the colored output - that is expected)
This gigantic output is fixed.
@ROiPinheiro we indeed have that option 🙂
You can do: