prisma 5.23.0-dev.16 → 5.23.0-dev.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +4 -4
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/package.json +10 -10
- package/prisma-client/generator-build/index.js +26 -26
- package/prisma-client/package.json +3 -3
- package/prisma-client/runtime/binary.js +6 -6
- package/prisma-client/runtime/edge-esm.js +15 -15
- package/prisma-client/runtime/edge.js +15 -15
- package/prisma-client/runtime/library.d.ts +1 -1
- package/prisma-client/runtime/library.js +6 -6
- package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
- package/prisma-client/runtime/react-native.d.ts +1 -1
- package/prisma-client/runtime/react-native.js +10 -10
- package/prisma-client/scripts/default-index.js +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var DD=Object.create;var Vi=Object.defineProperty;var bD=Object.getOwnPropertyDescriptor;var kD=Object.getOwnPropertyNames;var SD=Object.getPrototypeOf,FD=Object.prototype.hasOwnProperty;var pd=e=>{throw TypeError(e)};var ND=(e,A,t)=>A in e?Vi(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t;var Q=(e,A)=>()=>(A||e((A={exports:{}}).exports,A),A.exports),qi=(e,A)=>{for(var t in A)Vi(e,t,{get:A[t],enumerable:!0})},md=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of kD(A))!FD.call(e,n)&&n!==t&&Vi(e,n,{get:()=>A[n],enumerable:!(r=bD(A,n))||r.enumerable});return e};var Z=(e,A,t)=>(t=e!=null?DD(SD(e)):{},md(A||!e||!e.__esModule?Vi(t,"default",{value:e,enumerable:!0}):t,e)),xD=e=>md(Vi({},"__esModule",{value:!0}),e);var yd=(e,A,t)=>ND(e,typeof A!="symbol"?A+"":A,t),Og=(e,A,t)=>A.has(e)||pd("Cannot "+t);var f=(e,A,t)=>(Og(e,A,"read from private field"),t?t.call(e):A.get(e)),Ne=(e,A,t)=>A.has(e)?pd("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(e):A.set(e,t),Ae=(e,A,t,r)=>(Og(e,A,"write to private field"),r?r.call(e,t):A.set(e,t),t),MA=(e,A,t)=>(Og(e,A,"access private method"),t);var jd=Q((wV,_d)=>{"use strict";_d.exports=Wd;Wd.sync=Ib;var Od=require("fs");function fb(e,A){var t=A.pathExt!==void 0?A.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var r=0;r<t.length;r++){var n=t[r].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function Hd(e,A,t){return!e.isSymbolicLink()&&!e.isFile()?!1:fb(A,t)}function Wd(e,A,t){Od.stat(e,function(r,n){t(r,r?!1:Hd(n,e,A))})}function Ib(e,A){return Hd(Od.statSync(e),e,A)}});var $d=Q((RV,zd)=>{"use strict";zd.exports=Zd;Zd.sync=Bb;var Kd=require("fs");function Zd(e,A,t){Kd.stat(e,function(r,n){t(r,r?!1:Xd(n,A))})}function Bb(e,A){return Xd(Kd.statSync(e),A)}function Xd(e,A){return e.isFile()&&pb(e,A)}function pb(e,A){var t=e.mode,r=e.uid,n=e.gid,i=A.uid!==void 0?A.uid:process.getuid&&process.getuid(),s=A.gid!==void 0?A.gid:process.getgid&&process.getgid(),o=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=o|a,l=t&c||t&a&&n===s||t&o&&r===i||t&g&&i===0;return l}});var AQ=Q((bV,eQ)=>{"use strict";var DV=require("fs"),Ho;process.platform==="win32"||global.TESTING_WINDOWS?Ho=jd():Ho=$d();eQ.exports=Al;Al.sync=mb;function Al(e,A,t){if(typeof A=="function"&&(t=A,A={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){Al(e,A||{},function(i,s){i?n(i):r(s)})})}Ho(e,A||{},function(r,n){r&&(r.code==="EACCES"||A&&A.ignoreErrors)&&(r=null,n=!1),t(r,n)})}function mb(e,A){try{return Ho.sync(e,A||{})}catch(t){if(A&&A.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var aQ=Q((kV,oQ)=>{"use strict";var dn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tQ=require("path"),yb=dn?";":":",rQ=AQ(),nQ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),iQ=(e,A)=>{let t=A.colon||yb,r=e.match(/\//)||dn&&e.match(/\\/)?[""]:[...dn?[process.cwd()]:[],...(A.path||process.env.PATH||"").split(t)],n=dn?A.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=dn?n.split(t):[""];return dn&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:n}},sQ=(e,A,t)=>{typeof A=="function"&&(t=A,A={}),A||(A={});let{pathEnv:r,pathExt:n,pathExtExe:i}=iQ(e,A),s=[],o=c=>new Promise((g,l)=>{if(c===r.length)return A.all&&s.length?g(s):l(nQ(e));let u=r[c],E=/^".*"$/.test(u)?u.slice(1,-1):u,h=tQ.join(E,e),d=!E&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;g(a(d,c,0))}),a=(c,g,l)=>new Promise((u,E)=>{if(l===n.length)return u(o(g+1));let h=n[l];rQ(c+h,{pathExt:i},(d,C)=>{if(!d&&C)if(A.all)s.push(c+h);else return u(c+h);return u(a(c,g,l+1))})});return t?o(0).then(c=>t(null,c),t):o(0)},wb=(e,A)=>{A=A||{};let{pathEnv:t,pathExt:r,pathExtExe:n}=iQ(e,A),i=[];for(let s=0;s<t.length;s++){let o=t[s],a=/^".*"$/.test(o)?o.slice(1,-1):o,c=tQ.join(a,e),g=!a&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let l=0;l<r.length;l++){let u=g+r[l];try{if(rQ.sync(u,{pathExt:n}))if(A.all)i.push(u);else return u}catch{}}}if(A.all&&i.length)return i;if(A.nothrow)return null;throw nQ(e)};oQ.exports=sQ;sQ.sync=wb});var rl=Q((SV,tl)=>{"use strict";var cQ=(e={})=>{let A=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(A).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};tl.exports=cQ;tl.exports.default=cQ});var EQ=Q((FV,uQ)=>{"use strict";var gQ=require("path"),Rb=aQ(),Db=rl();function lQ(e,A){let t=e.options.env||process.env,r=process.cwd(),n=e.options.cwd!=null,i=n&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Rb.sync(e.command,{path:t[Db({env:t})],pathExt:A?gQ.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=gQ.resolve(n?e.options.cwd:"",s)),s}function bb(e){return lQ(e)||lQ(e,!0)}uQ.exports=bb});var hQ=Q((NV,il)=>{"use strict";var nl=/([()\][%!^"`<>&|;, *?])/g;function kb(e){return e=e.replace(nl,"^$1"),e}function Sb(e,A){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(nl,"^$1"),A&&(e=e.replace(nl,"^$1")),e}il.exports.command=kb;il.exports.argument=Sb});var QQ=Q((xV,dQ)=>{"use strict";dQ.exports=/^#!(.*)/});var fQ=Q((LV,CQ)=>{"use strict";var Fb=QQ();CQ.exports=(e="")=>{let A=e.match(Fb);if(!A)return null;let[t,r]=A[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n}});var BQ=Q((UV,IQ)=>{"use strict";var sl=require("fs"),Nb=fQ();function xb(e){let t=Buffer.alloc(150),r;try{r=sl.openSync(e,"r"),sl.readSync(r,t,0,150,0),sl.closeSync(r)}catch{}return Nb(t.toString())}IQ.exports=xb});var wQ=Q((TV,yQ)=>{"use strict";var Lb=require("path"),pQ=EQ(),mQ=hQ(),Ub=BQ(),Tb=process.platform==="win32",Mb=/\.(?:com|exe)$/i,vb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Pb(e){e.file=pQ(e);let A=e.file&&Ub(e.file);return A?(e.args.unshift(e.file),e.command=A,pQ(e)):e.file}function Gb(e){if(!Tb)return e;let A=Pb(e),t=!Mb.test(A);if(e.options.forceShell||t){let r=vb.test(A);e.command=Lb.normalize(e.command),e.command=mQ.command(e.command),e.args=e.args.map(i=>mQ.argument(i,r));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Jb(e,A,t){A&&!Array.isArray(A)&&(t=A,A=null),A=A?A.slice(0):[],t=Object.assign({},t);let r={command:e,args:A,options:t,file:void 0,original:{command:e,args:A}};return t.shell?r:Gb(r)}yQ.exports=Jb});var bQ=Q((MV,DQ)=>{"use strict";var ol=process.platform==="win32";function al(e,A){return Object.assign(new Error(`${A} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${A} ${e.command}`,path:e.command,spawnargs:e.args})}function Yb(e,A){if(!ol)return;let t=e.emit;e.emit=function(r,n){if(r==="exit"){let i=RQ(n,A,"spawn");if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function RQ(e,A){return ol&&e===1&&!A.file?al(A.original,"spawn"):null}function Vb(e,A){return ol&&e===1&&!A.file?al(A.original,"spawnSync"):null}DQ.exports={hookChildProcess:Yb,verifyENOENT:RQ,verifyENOENTSync:Vb,notFoundError:al}});var FQ=Q((vV,Qn)=>{"use strict";var kQ=require("child_process"),cl=wQ(),gl=bQ();function SQ(e,A,t){let r=cl(e,A,t),n=kQ.spawn(r.command,r.args,r.options);return gl.hookChildProcess(n,r),n}function qb(e,A,t){let r=cl(e,A,t),n=kQ.spawnSync(r.command,r.args,r.options);return n.error=n.error||gl.verifyENOENTSync(n.status,r),n}Qn.exports=SQ;Qn.exports.spawn=SQ;Qn.exports.sync=qb;Qn.exports._parse=cl;Qn.exports._enoent=gl});var xQ=Q((PV,NQ)=>{"use strict";NQ.exports=e=>{let A=typeof e=="string"?`
|
|
2
2
|
`:10,t=typeof e=="string"?"\r":13;return e[e.length-1]===A&&(e=e.slice(0,e.length-1)),e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e}});var TQ=Q((GV,Ki)=>{"use strict";var ji=require("path"),LQ=rl(),UQ=e=>{e={cwd:process.cwd(),path:process.env[LQ()],execPath:process.execPath,...e};let A,t=ji.resolve(e.cwd),r=[];for(;A!==t;)r.push(ji.join(t,"node_modules/.bin")),A=t,t=ji.resolve(t,"..");let n=ji.resolve(e.cwd,e.execPath,"..");return r.push(n),r.concat(e.path).join(ji.delimiter)};Ki.exports=UQ;Ki.exports.default=UQ;Ki.exports.env=e=>{e={env:process.env,...e};let A={...e.env},t=LQ({env:A});return e.path=A[t],A[t]=Ki.exports(e),A}});var vQ=Q((JV,ll)=>{"use strict";var MQ=(e,A)=>{for(let t of Reflect.ownKeys(A))Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(A,t));return e};ll.exports=MQ;ll.exports.default=MQ});var GQ=Q((YV,_o)=>{"use strict";var Ob=vQ(),Wo=new WeakMap,PQ=(e,A={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let t,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...s){if(Wo.set(i,++r),r===1)t=e.apply(this,s),e=null;else if(A.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t};return Ob(i,e),Wo.set(i,r),i};_o.exports=PQ;_o.exports.default=PQ;_o.exports.callCount=e=>{if(!Wo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Wo.get(e)}});var JQ=Q(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.SIGNALS=void 0;var Hb=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];jo.SIGNALS=Hb});var ul=Q(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.SIGRTMAX=Cn.getRealtimeSignals=void 0;var Wb=function(){let e=VQ-YQ+1;return Array.from({length:e},_b)};Cn.getRealtimeSignals=Wb;var _b=function(e,A){return{name:`SIGRT${A+1}`,number:YQ+A,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},YQ=34,VQ=64;Cn.SIGRTMAX=VQ});var qQ=Q(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.getSignals=void 0;var jb=require("os"),Kb=JQ(),Zb=ul(),Xb=function(){let e=(0,Zb.getRealtimeSignals)();return[...Kb.SIGNALS,...e].map(zb)};Ko.getSignals=Xb;var zb=function({name:e,number:A,description:t,action:r,forced:n=!1,standard:i}){let{signals:{[e]:s}}=jb.constants,o=s!==void 0;return{name:e,number:o?s:A,description:t,supported:o,action:r,forced:n,standard:i}}});var HQ=Q(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.signalsByNumber=fn.signalsByName=void 0;var $b=require("os"),OQ=qQ(),ek=ul(),Ak=function(){return(0,OQ.getSignals)().reduce(tk,{})},tk=function(e,{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}){return{...e,[A]:{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}}},rk=Ak();fn.signalsByName=rk;var nk=function(){let e=(0,OQ.getSignals)(),A=ek.SIGRTMAX+1,t=Array.from({length:A},(r,n)=>ik(n,e));return Object.assign({},...t)},ik=function(e,A){let t=sk(e,A);if(t===void 0)return{};let{name:r,description:n,supported:i,action:s,forced:o,standard:a}=t;return{[e]:{name:r,number:e,description:n,supported:i,action:s,forced:o,standard:a}}},sk=function(e,A){let t=A.find(({name:r})=>$b.constants.signals[r]===e);return t!==void 0?t:A.find(r=>r.number===e)},ok=nk();fn.signalsByNumber=ok});var _Q=Q((WV,WQ)=>{"use strict";var{signalsByName:ak}=HQ(),ck=({timedOut:e,timeout:A,errorCode:t,signal:r,signalDescription:n,exitCode:i,isCanceled:s})=>e?`timed out after ${A} milliseconds`:s?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:i!==void 0?`failed with exit code ${i}`:"failed",gk=({stdout:e,stderr:A,all:t,error:r,signal:n,exitCode:i,command:s,escapedCommand:o,timedOut:a,isCanceled:c,killed:g,parsed:{options:{timeout:l}}})=>{i=i===null?void 0:i,n=n===null?void 0:n;let u=n===void 0?void 0:ak[n].description,E=r&&r.code,d=`Command ${ck({timedOut:a,timeout:l,errorCode:E,signal:n,signalDescription:u,exitCode:i,isCanceled:c})}: ${s}`,C=Object.prototype.toString.call(r)==="[object Error]",I=C?`${d}
|
|
3
3
|
${r.message}`:d,p=[I,A,e].filter(Boolean).join(`
|
|
4
|
-
`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};WQ.exports=gk});var KQ=Q((_V,El)=>{"use strict";var Zo=["stdin","stdout","stderr"],lk=e=>Zo.some(A=>e[A]!==void 0),jQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return Zo.map(r=>e[r]);if(lk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,Zo.length);return Array.from({length:t},(r,n)=>A[n])};El.exports=jQ;El.exports.node=e=>{let A=jQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var ZQ=Q((jV,Xo)=>{"use strict";Xo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Xo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Xo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AC=Q((KV,pn)=>{"use strict";var we=global.process,Ur=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Ur(we)?(XQ=require("assert"),In=ZQ(),zQ=/^win/i.test(we.platform),Zi=require("events"),typeof Zi!="function"&&(Zi=Zi.EventEmitter),we.__signal_exit_emitter__?Ve=we.__signal_exit_emitter__:(Ve=we.__signal_exit_emitter__=new Zi,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),pn.exports=function(e,A){if(!Ur(global.process))return function(){};XQ.equal(typeof e,"function","a callback must be provided for exit handler"),Bn===!1&&hl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,e),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&zo()};return Ve.on(t,e),r},zo=function(){!Bn||!Ur(global.process)||(Bn=!1,In.forEach(function(A){try{we.removeListener(A,$o[A])}catch{}}),we.emit=ea,we.reallyExit=dl,Ve.count-=1)},pn.exports.unload=zo,Tr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},$o={},In.forEach(function(e){$o[e]=function(){if(Ur(global.process)){var t=we.listeners(e);t.length===Ve.count&&(zo(),Tr("exit",null,e),Tr("afterexit",null,e),zQ&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),pn.exports.signals=function(){return In},Bn=!1,hl=function(){Bn||!Ur(global.process)||(Bn=!0,Ve.count+=1,In=In.filter(function(A){try{return we.on(A,$o[A]),!0}catch{return!1}}),we.emit=eC,we.reallyExit=$Q)},pn.exports.load=hl,dl=we.reallyExit,$Q=function(A){Ur(global.process)&&(we.exitCode=A||0,Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),dl.call(we,we.exitCode))},ea=we.emit,eC=function(A,t){if(A==="exit"&&Ur(global.process)){t!==void 0&&(we.exitCode=t);var r=ea.apply(this,arguments);return Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),r}else return ea.apply(this,arguments)}):pn.exports=function(){return function(){}};var XQ,In,zQ,Zi,Ve,zo,Tr,$o,Bn,hl,dl,$Q,ea,eC});var rC=Q((ZV,tC)=>{"use strict";var uk=require("os"),Ek=AC(),hk=1e3*5,dk=(e,A="SIGTERM",t={})=>{let r=e(A);return Qk(e,A,t,r),r},Qk=(e,A,t,r)=>{if(!Ck(A,t,r))return;let n=Ik(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},Ck=(e,{forceKillAfterTimeout:A},t)=>fk(e)&&A!==!1&&t,fk=e=>e===uk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ik=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return hk;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Bk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},pk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},mk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{pk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},yk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},wk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ek(()=>{e.kill()});return r.finally(()=>{n()})};tC.exports={spawnedKill:dk,spawnedCancel:Bk,setupTimeout:mk,validateTimeout:yk,setExitHandler:wk}});var iC=Q((XV,nC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";nC.exports=gt});var oC=Q((zV,sC)=>{"use strict";var{PassThrough:Rk}=require("stream");sC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Rk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var Cl=Q(($V,Xi)=>{"use strict";var{constants:Dk}=require("buffer"),bk=require("stream"),{promisify:kk}=require("util"),Sk=oC(),Fk=kk(bk.pipeline),Aa=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Ql(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Sk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Dk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Fk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new Aa)})}),r.getBufferedValue()}Xi.exports=Ql;Xi.exports.buffer=(e,A)=>Ql(e,{...A,encoding:"buffer"});Xi.exports.array=(e,A)=>Ql(e,{...A,array:!0});Xi.exports.MaxBufferError=Aa});var cC=Q((eq,aC)=>{"use strict";var{PassThrough:Nk}=require("stream");aC.exports=function(){var e=[],A=new Nk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var EC=Q((Aq,uC)=>{"use strict";var lC=iC(),gC=Cl(),xk=cC(),Lk=(e,A)=>{A===void 0||e.stdin===void 0||(lC(A)?A.pipe(e.stdin):e.stdin.end(A))},Uk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=xk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},fl=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Il=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?gC(e,{encoding:A,maxBuffer:r}):gC.buffer(e,{maxBuffer:r})},Tk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Il(e,{encoding:r,buffer:n,maxBuffer:i}),a=Il(A,{encoding:r,buffer:n,maxBuffer:i}),c=Il(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},fl(e,o),fl(A,a),fl(t,c)])}},Mk=({input:e})=>{if(lC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};uC.exports={handleInput:Lk,makeAllStream:Uk,getSpawnedResult:Tk,validateInputSync:Mk}});var dC=Q((tq,hC)=>{"use strict";var vk=(async()=>{})().constructor.prototype,Pk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(vk,e)]),Gk=(e,A)=>{for(let[t,r]of Pk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Jk=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});hC.exports={mergePromise:Gk,getSpawnedPromise:Jk}});var fC=Q((rq,CC)=>{"use strict";var QC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Yk=/^[\w.-]+$/,Vk=/"/g,qk=e=>typeof e!="string"||Yk.test(e)?e:`"${e.replace(Vk,'\\"')}"`,Ok=(e,A)=>QC(e,A).join(" "),Hk=(e,A)=>QC(e,A).map(t=>qk(t)).join(" "),Wk=/ +/g,_k=e=>{let A=[];for(let t of e.trim().split(Wk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};CC.exports={joinCommand:Ok,getEscapedCommand:Hk,parseCommand:_k}});var RC=Q((nq,mn)=>{"use strict";var jk=require("path"),Bl=require("child_process"),Kk=FQ(),Zk=xQ(),Xk=TQ(),zk=GQ(),ta=_Q(),BC=KQ(),{spawnedKill:$k,spawnedCancel:eS,setupTimeout:AS,validateTimeout:tS,setExitHandler:rS}=rC(),{handleInput:nS,getSpawnedResult:iS,makeAllStream:sS,validateInputSync:oS}=EC(),{mergePromise:IC,getSpawnedPromise:aS}=dC(),{joinCommand:pC,parseCommand:mC,getEscapedCommand:yC}=fC(),cS=1e3*1e3*100,gS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?Xk.env({env:i,cwd:r,execPath:n}):i},wC=(e,A,t={})=>{let r=Kk._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:cS,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=gS(t),t.stdio=BC(t),process.platform==="win32"&&jk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},zi=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?Zk(A):A,ra=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);tS(r.options);let s;try{s=Bl.spawn(r.file,r.args,r.options)}catch(E){let h=new Bl.ChildProcess,d=Promise.reject(ta({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return IC(h,d)}let o=aS(s),a=AS(s,r.options,o),c=rS(s,r.options,a),g={isCanceled:!1};s.kill=$k.bind(null,s.kill.bind(s)),s.cancel=eS.bind(null,s,g);let u=zk(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await iS(s,r.options,c),m=zi(r.options,I),K=zi(r.options,p),H=zi(r.options,w);if(E||h!==0||d!==null){let ne=ta({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return nS(s,r.options.input),s.all=sS(s,r.options),IC(s,u)};mn.exports=ra;mn.exports.sync=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);oS(r.options);let s;try{s=Bl.spawnSync(r.file,r.args,r.options)}catch(c){throw ta({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=zi(r.options,s.stdout,s.error),a=zi(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=ta({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};mn.exports.command=(e,A)=>{let[t,...r]=mC(e);return ra(t,r,A)};mn.exports.commandSync=(e,A)=>{let[t,...r]=mC(e);return ra.sync(t,r,A)};mn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=BC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ra(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var pl=Q((lq,lS)=>{lS.exports={name:"@prisma/engines-version",version:"5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"90c6eb338aab4ebc379a3dfb6d0130b1535db96c"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ml=Q(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.enginesVersion=void 0;na.enginesVersion=pl().prisma.enginesVersion});var bC=Q((Eq,DC)=>{"use strict";function GA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}DC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};GA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],i=n.message,s=(e[i]||0)+1;e[i]=s,s>=t&&(A=n,t=s)}return A}});var kC=Q(Mr=>{"use strict";var uS=bC();Mr.operation=function(e){var A=Mr.timeouts(e);return new uS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Mr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<A.retries;n++)r.push(this.createTimeout(n,A));return e&&e.forever&&!r.length&&r.push(this.createTimeout(n,A)),r.sort(function(i,s){return i-s}),r};Mr.createTimeout=function(e,A){var t=A.randomize?Math.random()+1:1,r=Math.round(t*Math.max(A.minTimeout,1)*Math.pow(A.factor,e));return r=Math.min(r,A.maxTimeout),r};Mr.wrap=function(e,A,t){if(A instanceof Array&&(t=A,A=null),!t){t=[];for(var r in e)typeof e[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var i=t[n],s=e[i];e[i]=function(a){var c=Mr.operation(A),g=Array.prototype.slice.call(arguments,1),l=g.pop();g.push(function(u){c.retry(u)||(u&&(arguments[0]=c.mainError()),l.apply(this,arguments))}),c.attempt(function(){a.apply(e,g)})}.bind(e,s),e[i].options=A}}});var FC=Q((dq,SC)=>{"use strict";SC.exports=kC()});var xC=Q((Qq,sa)=>{"use strict";var ES=FC(),hS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],ia=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},dS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},QS=e=>hS.includes(e),NC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=ES.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof ia)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!QS(s.message))n.stop(),r(s);else{dS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});sa.exports=NC;sa.exports.default=NC;sa.exports.AbortError=ia});var TC=Q((Fq,IS)=>{IS.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var vC=Q((Nq,aa)=>{"use strict";var BS=require("fs"),MC=require("path"),pS=require("os"),mS=TC(),yS=mS.version,wS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function RS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,`
|
|
4
|
+
`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};WQ.exports=gk});var KQ=Q((_V,El)=>{"use strict";var Zo=["stdin","stdout","stderr"],lk=e=>Zo.some(A=>e[A]!==void 0),jQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return Zo.map(r=>e[r]);if(lk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,Zo.length);return Array.from({length:t},(r,n)=>A[n])};El.exports=jQ;El.exports.node=e=>{let A=jQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var ZQ=Q((jV,Xo)=>{"use strict";Xo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Xo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Xo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AC=Q((KV,pn)=>{"use strict";var we=global.process,Ur=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Ur(we)?(XQ=require("assert"),In=ZQ(),zQ=/^win/i.test(we.platform),Zi=require("events"),typeof Zi!="function"&&(Zi=Zi.EventEmitter),we.__signal_exit_emitter__?Ve=we.__signal_exit_emitter__:(Ve=we.__signal_exit_emitter__=new Zi,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),pn.exports=function(e,A){if(!Ur(global.process))return function(){};XQ.equal(typeof e,"function","a callback must be provided for exit handler"),Bn===!1&&hl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,e),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&zo()};return Ve.on(t,e),r},zo=function(){!Bn||!Ur(global.process)||(Bn=!1,In.forEach(function(A){try{we.removeListener(A,$o[A])}catch{}}),we.emit=ea,we.reallyExit=dl,Ve.count-=1)},pn.exports.unload=zo,Tr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},$o={},In.forEach(function(e){$o[e]=function(){if(Ur(global.process)){var t=we.listeners(e);t.length===Ve.count&&(zo(),Tr("exit",null,e),Tr("afterexit",null,e),zQ&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),pn.exports.signals=function(){return In},Bn=!1,hl=function(){Bn||!Ur(global.process)||(Bn=!0,Ve.count+=1,In=In.filter(function(A){try{return we.on(A,$o[A]),!0}catch{return!1}}),we.emit=eC,we.reallyExit=$Q)},pn.exports.load=hl,dl=we.reallyExit,$Q=function(A){Ur(global.process)&&(we.exitCode=A||0,Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),dl.call(we,we.exitCode))},ea=we.emit,eC=function(A,t){if(A==="exit"&&Ur(global.process)){t!==void 0&&(we.exitCode=t);var r=ea.apply(this,arguments);return Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),r}else return ea.apply(this,arguments)}):pn.exports=function(){return function(){}};var XQ,In,zQ,Zi,Ve,zo,Tr,$o,Bn,hl,dl,$Q,ea,eC});var rC=Q((ZV,tC)=>{"use strict";var uk=require("os"),Ek=AC(),hk=1e3*5,dk=(e,A="SIGTERM",t={})=>{let r=e(A);return Qk(e,A,t,r),r},Qk=(e,A,t,r)=>{if(!Ck(A,t,r))return;let n=Ik(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},Ck=(e,{forceKillAfterTimeout:A},t)=>fk(e)&&A!==!1&&t,fk=e=>e===uk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ik=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return hk;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Bk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},pk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},mk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{pk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},yk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},wk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ek(()=>{e.kill()});return r.finally(()=>{n()})};tC.exports={spawnedKill:dk,spawnedCancel:Bk,setupTimeout:mk,validateTimeout:yk,setExitHandler:wk}});var iC=Q((XV,nC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";nC.exports=gt});var oC=Q((zV,sC)=>{"use strict";var{PassThrough:Rk}=require("stream");sC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Rk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var Cl=Q(($V,Xi)=>{"use strict";var{constants:Dk}=require("buffer"),bk=require("stream"),{promisify:kk}=require("util"),Sk=oC(),Fk=kk(bk.pipeline),Aa=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Ql(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Sk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Dk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Fk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new Aa)})}),r.getBufferedValue()}Xi.exports=Ql;Xi.exports.buffer=(e,A)=>Ql(e,{...A,encoding:"buffer"});Xi.exports.array=(e,A)=>Ql(e,{...A,array:!0});Xi.exports.MaxBufferError=Aa});var cC=Q((eq,aC)=>{"use strict";var{PassThrough:Nk}=require("stream");aC.exports=function(){var e=[],A=new Nk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var EC=Q((Aq,uC)=>{"use strict";var lC=iC(),gC=Cl(),xk=cC(),Lk=(e,A)=>{A===void 0||e.stdin===void 0||(lC(A)?A.pipe(e.stdin):e.stdin.end(A))},Uk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=xk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},fl=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Il=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?gC(e,{encoding:A,maxBuffer:r}):gC.buffer(e,{maxBuffer:r})},Tk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Il(e,{encoding:r,buffer:n,maxBuffer:i}),a=Il(A,{encoding:r,buffer:n,maxBuffer:i}),c=Il(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},fl(e,o),fl(A,a),fl(t,c)])}},Mk=({input:e})=>{if(lC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};uC.exports={handleInput:Lk,makeAllStream:Uk,getSpawnedResult:Tk,validateInputSync:Mk}});var dC=Q((tq,hC)=>{"use strict";var vk=(async()=>{})().constructor.prototype,Pk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(vk,e)]),Gk=(e,A)=>{for(let[t,r]of Pk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Jk=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});hC.exports={mergePromise:Gk,getSpawnedPromise:Jk}});var fC=Q((rq,CC)=>{"use strict";var QC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Yk=/^[\w.-]+$/,Vk=/"/g,qk=e=>typeof e!="string"||Yk.test(e)?e:`"${e.replace(Vk,'\\"')}"`,Ok=(e,A)=>QC(e,A).join(" "),Hk=(e,A)=>QC(e,A).map(t=>qk(t)).join(" "),Wk=/ +/g,_k=e=>{let A=[];for(let t of e.trim().split(Wk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};CC.exports={joinCommand:Ok,getEscapedCommand:Hk,parseCommand:_k}});var RC=Q((nq,mn)=>{"use strict";var jk=require("path"),Bl=require("child_process"),Kk=FQ(),Zk=xQ(),Xk=TQ(),zk=GQ(),ta=_Q(),BC=KQ(),{spawnedKill:$k,spawnedCancel:eS,setupTimeout:AS,validateTimeout:tS,setExitHandler:rS}=rC(),{handleInput:nS,getSpawnedResult:iS,makeAllStream:sS,validateInputSync:oS}=EC(),{mergePromise:IC,getSpawnedPromise:aS}=dC(),{joinCommand:pC,parseCommand:mC,getEscapedCommand:yC}=fC(),cS=1e3*1e3*100,gS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?Xk.env({env:i,cwd:r,execPath:n}):i},wC=(e,A,t={})=>{let r=Kk._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:cS,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=gS(t),t.stdio=BC(t),process.platform==="win32"&&jk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},zi=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?Zk(A):A,ra=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);tS(r.options);let s;try{s=Bl.spawn(r.file,r.args,r.options)}catch(E){let h=new Bl.ChildProcess,d=Promise.reject(ta({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return IC(h,d)}let o=aS(s),a=AS(s,r.options,o),c=rS(s,r.options,a),g={isCanceled:!1};s.kill=$k.bind(null,s.kill.bind(s)),s.cancel=eS.bind(null,s,g);let u=zk(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await iS(s,r.options,c),m=zi(r.options,I),K=zi(r.options,p),H=zi(r.options,w);if(E||h!==0||d!==null){let ne=ta({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return nS(s,r.options.input),s.all=sS(s,r.options),IC(s,u)};mn.exports=ra;mn.exports.sync=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);oS(r.options);let s;try{s=Bl.spawnSync(r.file,r.args,r.options)}catch(c){throw ta({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=zi(r.options,s.stdout,s.error),a=zi(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=ta({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};mn.exports.command=(e,A)=>{let[t,...r]=mC(e);return ra(t,r,A)};mn.exports.commandSync=(e,A)=>{let[t,...r]=mC(e);return ra.sync(t,r,A)};mn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=BC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ra(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var pl=Q((lq,lS)=>{lS.exports={name:"@prisma/engines-version",version:"5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ml=Q(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.enginesVersion=void 0;na.enginesVersion=pl().prisma.enginesVersion});var bC=Q((Eq,DC)=>{"use strict";function GA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}DC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};GA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],i=n.message,s=(e[i]||0)+1;e[i]=s,s>=t&&(A=n,t=s)}return A}});var kC=Q(Mr=>{"use strict";var uS=bC();Mr.operation=function(e){var A=Mr.timeouts(e);return new uS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Mr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<A.retries;n++)r.push(this.createTimeout(n,A));return e&&e.forever&&!r.length&&r.push(this.createTimeout(n,A)),r.sort(function(i,s){return i-s}),r};Mr.createTimeout=function(e,A){var t=A.randomize?Math.random()+1:1,r=Math.round(t*Math.max(A.minTimeout,1)*Math.pow(A.factor,e));return r=Math.min(r,A.maxTimeout),r};Mr.wrap=function(e,A,t){if(A instanceof Array&&(t=A,A=null),!t){t=[];for(var r in e)typeof e[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var i=t[n],s=e[i];e[i]=function(a){var c=Mr.operation(A),g=Array.prototype.slice.call(arguments,1),l=g.pop();g.push(function(u){c.retry(u)||(u&&(arguments[0]=c.mainError()),l.apply(this,arguments))}),c.attempt(function(){a.apply(e,g)})}.bind(e,s),e[i].options=A}}});var FC=Q((dq,SC)=>{"use strict";SC.exports=kC()});var xC=Q((Qq,sa)=>{"use strict";var ES=FC(),hS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],ia=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},dS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},QS=e=>hS.includes(e),NC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=ES.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof ia)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!QS(s.message))n.stop(),r(s);else{dS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});sa.exports=NC;sa.exports.default=NC;sa.exports.AbortError=ia});var TC=Q((Fq,IS)=>{IS.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var vC=Q((Nq,aa)=>{"use strict";var BS=require("fs"),MC=require("path"),pS=require("os"),mS=TC(),yS=mS.version,wS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function RS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,`
|
|
5
5
|
`);let r;for(;(r=wS.exec(t))!=null;){let n=r[1],i=r[2]||"";i=i.trim();let s=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(i=i.replace(/\\n/g,`
|
|
6
6
|
`),i=i.replace(/\\r/g,"\r")),A[n]=i}return A}function Rl(e){console.log(`[dotenv@${yS}][DEBUG] ${e}`)}function DS(e){return e[0]==="~"?MC.join(pS.homedir(),e.slice(1)):e}function bS(e){let A=MC.resolve(process.cwd(),".env"),t="utf8",r=!!(e&&e.debug),n=!!(e&&e.override);e&&(e.path!=null&&(A=DS(e.path)),e.encoding!=null&&(t=e.encoding));try{let i=oa.parse(BS.readFileSync(A,{encoding:t}));return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(n===!0&&(process.env[s]=i[s]),r&&Rl(n===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=i[s]}),{parsed:i}}catch(i){return r&&Rl(`Failed to load ${A} ${i.message}`),{error:i}}}var oa={config:bS,parse:RS};aa.exports.config=oa.config;aa.exports.parse=oa.parse;aa.exports=oa});var qC=Q((Pq,VC)=>{"use strict";VC.exports=e=>{let A=e.match(/^[ \t]*(?=\S)/gm);return A?A.reduce((t,r)=>Math.min(t,r.length),1/0):0}});var HC=Q((Gq,OC)=>{"use strict";var NS=qC();OC.exports=e=>{let A=NS(e);if(A===0)return e;let t=new RegExp(`^[ \\t]{${A}}`,"gm");return e.replace(t,"")}});var Sl=Q((Hq,WC)=>{"use strict";WC.exports=(e,A=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof A!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof A}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(A===0)return e;let r=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,t.indent.repeat(A))}});var ZC=Q((jq,KC)=>{"use strict";KC.exports=({onlyFirst:e=!1}={})=>{let A=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(A,e?void 0:"g")}});var Ll=Q((Kq,XC)=>{"use strict";var GS=ZC();XC.exports=e=>typeof e=="string"?e.replace(GS(),""):e});var $C=Q((zq,la)=>{"use strict";la.exports=(e={})=>{let A;if(e.repoUrl)A=e.repoUrl;else if(e.user&&e.repo)A=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${A}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(let n of r){let i=e[n];if(i!==void 0){if(n==="labels"||n==="projects"){if(!Array.isArray(i))throw new TypeError(`The \`${n}\` option should be an array`);i=i.join(",")}t.searchParams.set(n,i)}}return t.toString()};la.exports.default=la.exports});var ql=Q((sH,mf)=>{"use strict";mf.exports=function(){function e(A,t,r,n,i){return A<t||r<t?A>r?r+1:A+1:n===i?t:t+1}return function(A,t){if(A===t)return 0;if(A.length>t.length){var r=A;A=t,t=r}for(var n=A.length,i=t.length;n>0&&A.charCodeAt(n-1)===t.charCodeAt(i-1);)n--,i--;for(var s=0;s<n&&A.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,i-=s,n===0||i<3)return i;var o=0,a,c,g,l,u,E,h,d,C,I,p,w,m=[];for(a=0;a<n;a++)m.push(a+1),m.push(A.charCodeAt(s+a));for(var K=m.length-1;o<i-3;)for(C=t.charCodeAt(s+(c=o)),I=t.charCodeAt(s+(g=o+1)),p=t.charCodeAt(s+(l=o+2)),w=t.charCodeAt(s+(u=o+3)),E=o+=4,a=0;a<K;a+=2)h=m[a],d=m[a+1],c=e(h,c,g,C,d),g=e(c,g,l,I,d),l=e(g,l,u,p,d),E=e(l,u,E,w,d),m[a]=E,u=l,l=g,g=c,c=h;for(;o<i;)for(C=t.charCodeAt(s+(c=o)),E=++o,a=0;a<K;a+=2)h=m[a],m[a]=E=e(h,c,E,C,m[a+1]),c=h;return E}}()});var de=Q((S4,qI)=>{"use strict";qI.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var le=Q((F4,OI)=>{"use strict";var xe=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}},uu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},Eu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},hu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},du=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Qu=class e extends xe{constructor(A,t,r,n){super(A),Error.captureStackTrace(this,e),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=n,this.status=t,this.statusCode=t,this.headers=r}},Cu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},fu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},Iu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}},Bu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}},pu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},mu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},yu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},wu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}},Ru=class e extends xe{constructor(A,t){super(A),Error.captureStackTrace(this,e),this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=t}},Ha=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},Du=class extends xe{constructor(A){super(A),Error.captureStackTrace(this,Ha),this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},bu=class e extends Error{constructor(A,t,r){super(A),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=t?`HPE_${t}`:void 0,this.data=r?r.toString():void 0}},ku=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},Su=class e extends xe{constructor(A,t,{headers:r,data:n}){super(A),Error.captureStackTrace(this,e),this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=t,this.data=n,this.headers=r}};OI.exports={HTTPParserError:bu,UndiciError:xe,HeadersTimeoutError:Eu,HeadersOverflowError:hu,BodyTimeoutError:du,RequestContentLengthMismatchError:pu,ConnectTimeoutError:uu,ResponseStatusCodeError:Qu,InvalidArgumentError:Cu,InvalidReturnValueError:fu,RequestAbortedError:Iu,ClientDestroyedError:yu,ClientClosedError:wu,InformationalError:Bu,SocketError:Ru,NotSupportedError:Ha,ResponseContentLengthMismatchError:mu,BalancedPoolMissingUpstreamError:Du,ResponseExceededMaxSizeError:ku,RequestRetryError:Su}});var WI=Q((N4,HI)=>{"use strict";var Wa={},Fu=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e<Fu.length;++e){let A=Fu[e],t=A.toLowerCase();Wa[A]=Wa[t]=t}Object.setPrototypeOf(Wa,null);HI.exports={wellknownHeaderNames:Fu,headerNameLowerCasedRecord:Wa}});var W=Q((x4,rB)=>{"use strict";var ZI=require("assert"),{kDestroyed:XI,kBodyUsed:_I}=de(),{IncomingMessage:wx}=require("http"),qn=require("stream"),Rx=require("net"),{InvalidArgumentError:_e}=le(),{Blob:jI}=require("buffer"),_a=require("util"),{stringify:Dx}=require("querystring"),{headerNameLowerCasedRecord:bx}=WI(),[Nu,KI]=process.versions.node.split(".").map(e=>Number(e));function kx(){}function xu(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function zI(e){return jI&&e instanceof jI||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Sx(e,A){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let t=Dx(A);return t&&(e+="?"+t),e}function $I(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new _e("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new _e("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new _e("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port)))throw new _e("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new _e("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new _e("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new _e("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new _e("Invalid URL origin: the origin must be a string or null/undefined.");let A=e.port!=null?e.port:e.protocol==="https:"?443:80,t=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${A}`,r=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;t.endsWith("/")&&(t=t.substring(0,t.length-1)),r&&!r.startsWith("/")&&(r=`/${r}`),e=new URL(t+r)}return e}function Fx(e){if(e=$I(e),e.pathname!=="/"||e.search||e.hash)throw new _e("invalid url");return e}function Nx(e){if(e[0]==="["){let t=e.indexOf("]");return ZI(t!==-1),e.substring(1,t)}let A=e.indexOf(":");return A===-1?e:e.substring(0,A)}function xx(e){if(!e)return null;ZI.strictEqual(typeof e,"string");let A=Nx(e);return Rx.isIP(A)?"":A}function Lx(e){return JSON.parse(JSON.stringify(e))}function Ux(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function Tx(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function Mx(e){if(e==null)return 0;if(xu(e)){let A=e._readableState;return A&&A.objectMode===!1&&A.ended===!0&&Number.isFinite(A.length)?A.length:null}else{if(zI(e))return e.size!=null?e.size:null;if(AB(e))return e.byteLength}return null}function Lu(e){return!e||!!(e.destroyed||e[XI])}function eB(e){let A=e&&e._readableState;return Lu(e)&&A&&!A.endEmitted}function vx(e,A){e==null||!xu(e)||Lu(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===wx&&(e.socket=null),e.destroy(A)):A&&process.nextTick((t,r)=>{t.emit("error",r)},e,A),e.destroyed!==!0&&(e[XI]=!0))}var Px=/timeout=(\d+)/;function Gx(e){let A=e.toString().match(Px);return A?parseInt(A[1],10)*1e3:null}function Jx(e){return bx[e]||e.toLowerCase()}function Yx(e,A={}){if(!Array.isArray(e))return e;for(let t=0;t<e.length;t+=2){let r=e[t].toString().toLowerCase(),n=A[r];n?(Array.isArray(n)||(n=[n],A[r]=n),n.push(e[t+1].toString("utf8"))):Array.isArray(e[t+1])?A[r]=e[t+1].map(i=>i.toString("utf8")):A[r]=e[t+1].toString("utf8")}return"content-length"in A&&"content-disposition"in A&&(A["content-disposition"]=Buffer.from(A["content-disposition"]).toString("latin1")),A}function Vx(e){let A=[],t=!1,r=-1;for(let n=0;n<e.length;n+=2){let i=e[n+0].toString(),s=e[n+1].toString("utf8");i.length===14&&(i==="content-length"||i.toLowerCase()==="content-length")?(A.push(i,s),t=!0):i.length===19&&(i==="content-disposition"||i.toLowerCase()==="content-disposition")?r=A.push(i,s)-1:A.push(i,s)}return t&&r!==-1&&(A[r]=Buffer.from(A[r]).toString("latin1")),A}function AB(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function qx(e,A,t){if(!e||typeof e!="object")throw new _e("handler must be an object");if(typeof e.onConnect!="function")throw new _e("invalid onConnect method");if(typeof e.onError!="function")throw new _e("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new _e("invalid onBodySent method");if(t||A==="CONNECT"){if(typeof e.onUpgrade!="function")throw new _e("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new _e("invalid onHeaders method");if(typeof e.onData!="function")throw new _e("invalid onData method");if(typeof e.onComplete!="function")throw new _e("invalid onComplete method")}}function Ox(e){return!!(e&&(qn.isDisturbed?qn.isDisturbed(e)||e[_I]:e[_I]||e.readableDidRead||e._readableState&&e._readableState.dataEmitted||eB(e)))}function Hx(e){return!!(e&&(qn.isErrored?qn.isErrored(e):/state: 'errored'/.test(_a.inspect(e))))}function Wx(e){return!!(e&&(qn.isReadable?qn.isReadable(e):/state: 'readable'/.test(_a.inspect(e))))}function _x(e){return{localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort,remoteFamily:e.remoteFamily,timeout:e.timeout,bytesWritten:e.bytesWritten,bytesRead:e.bytesRead}}async function*jx(e){for await(let A of e)yield Buffer.isBuffer(A)?A:Buffer.from(A)}var Ds;function Kx(e){if(Ds||(Ds=require("stream/web").ReadableStream),Ds.from)return Ds.from(jx(e));let A;return new Ds({async start(){A=e[Symbol.asyncIterator]()},async pull(t){let{done:r,value:n}=await A.next();if(r)queueMicrotask(()=>{t.close()});else{let i=Buffer.isBuffer(n)?n:Buffer.from(n);t.enqueue(new Uint8Array(i))}return t.desiredSize>0},async cancel(t){await A.return()}},0)}function Zx(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function Xx(e){if(e){if(typeof e.throwIfAborted=="function")e.throwIfAborted();else if(e.aborted){let A=new Error("The operation was aborted");throw A.name="AbortError",A}}}function zx(e,A){return"addEventListener"in e?(e.addEventListener("abort",A,{once:!0}),()=>e.removeEventListener("abort",A)):(e.addListener("abort",A),()=>e.removeListener("abort",A))}var $x=!!String.prototype.toWellFormed;function eL(e){return $x?`${e}`.toWellFormed():_a.toUSVString?_a.toUSVString(e):`${e}`}function AL(e){if(e==null||e==="")return{start:0,end:null,size:null};let A=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return A?{start:parseInt(A[1]),end:A[2]?parseInt(A[2]):null,size:A[3]?parseInt(A[3]):null}:null}var tB=Object.create(null);tB.enumerable=!0;rB.exports={kEnumerableProperty:tB,nop:kx,isDisturbed:Ox,isErrored:Hx,isReadable:Wx,toUSVString:eL,isReadableAborted:eB,isBlobLike:zI,parseOrigin:Fx,parseURL:$I,getServerName:xx,isStream:xu,isIterable:Tx,isAsyncIterable:Ux,isDestroyed:Lu,headerNameToString:Jx,parseRawHeaders:Vx,parseHeaders:Yx,parseKeepAliveTimeout:Gx,destroy:vx,bodyLength:Mx,deepClone:Lx,ReadableStreamFrom:Kx,isBuffer:AB,validateHandler:qx,getSocketInfo:_x,isFormDataLike:Zx,buildURL:Sx,throwIfAborted:Xx,addAbortListener:zx,parseRangeHeader:AL,nodeMajor:Nu,nodeMinor:KI,nodeHasAutoSelectFamily:Nu>18||Nu===18&&KI>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var sB=Q((L4,iB)=>{"use strict";var Uu=Date.now(),fr,Ir=[];function tL(){Uu=Date.now();let e=Ir.length,A=0;for(;A<e;){let t=Ir[A];t.state===0?t.state=Uu+t.delay:t.state>0&&Uu>=t.state&&(t.state=-1,t.callback(t.opaque)),t.state===-1?(t.state=-2,A!==e-1?Ir[A]=Ir.pop():Ir.pop(),e-=1):A+=1}Ir.length>0&&nB()}function nB(){fr&&fr.refresh?fr.refresh():(clearTimeout(fr),fr=setTimeout(tL,1e3),fr.unref&&fr.unref())}var ja=class{constructor(A,t,r){this.callback=A,this.delay=t,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(Ir.push(this),(!fr||Ir.length===1)&&nB()),this.state=0}clear(){this.state=-1}};iB.exports={setTimeout(e,A,t){return A<1e3?setTimeout(e,A,t):new ja(e,A,t)},clearTimeout(e){e instanceof ja?e.clear():clearTimeout(e)}}});var Tu=Q((U4,oB)=>{"use strict";var rL=require("events").EventEmitter,nL=require("util").inherits;function Jr(e){if(typeof e=="string"&&(e=Buffer.from(e)),!Buffer.isBuffer(e))throw new TypeError("The needle has to be a String or a Buffer.");let A=e.length;if(A===0)throw new Error("The needle cannot be an empty String/Buffer.");if(A>256)throw new Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=new Array(256).fill(A),this._lookbehind_size=0,this._needle=e,this._bufpos=0,this._lookbehind=Buffer.alloc(A);for(var t=0;t<A-1;++t)this._occ[e[t]]=A-1-t}nL(Jr,rL);Jr.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0};Jr.prototype.push=function(e,A){Buffer.isBuffer(e)||(e=Buffer.from(e,"binary"));let t=e.length;this._bufpos=A||0;let r;for(;r!==t&&this.matches<this.maxMatches;)r=this._sbmh_feed(e);return r};Jr.prototype._sbmh_feed=function(e){let A=e.length,t=this._needle,r=t.length,n=t[r-1],i=-this._lookbehind_size,s;if(i<0){for(;i<0&&i<=A-r;){if(s=this._sbmh_lookup_char(e,i+r-1),s===n&&this._sbmh_memcmp(e,i,r-1))return this._lookbehind_size=0,++this.matches,this.emit("info",!0),this._bufpos=i+r;i+=this._occ[s]}if(i<0)for(;i<0&&!this._sbmh_memcmp(e,i,A-i);)++i;if(i>=0)this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else{let o=this._lookbehind_size+i;return o>0&&this.emit("info",!1,this._lookbehind,0,o),this._lookbehind.copy(this._lookbehind,0,o,this._lookbehind_size-o),this._lookbehind_size-=o,e.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=A,this._bufpos=A,A}}if(i+=(i>=0)*this._bufpos,e.indexOf(t,i)!==-1)return i=e.indexOf(t,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+r;for(i=A-r;i<A&&(e[i]!==t[0]||Buffer.compare(e.subarray(i,i+A-i),t.subarray(0,A-i))!==0);)++i;return i<A&&(e.copy(this._lookbehind,0,i,i+(A-i)),this._lookbehind_size=A-i),i>0&&this.emit("info",!1,e,this._bufpos,i<A?i:A),this._bufpos=A,A};Jr.prototype._sbmh_lookup_char=function(e,A){return A<0?this._lookbehind[this._lookbehind_size+A]:e[A]};Jr.prototype._sbmh_memcmp=function(e,A,t){for(var r=0;r<t;++r)if(this._sbmh_lookup_char(e,A+r)!==this._needle[r])return!1;return!0};oB.exports=Jr});var gB=Q((T4,cB)=>{"use strict";var iL=require("util").inherits,aB=require("stream").Readable;function Mu(e){aB.call(this,e)}iL(Mu,aB);Mu.prototype._read=function(e){};cB.exports=Mu});var Ka=Q((M4,lB)=>{"use strict";lB.exports=function(A,t,r){if(!A||A[t]===void 0||A[t]===null)return r;if(typeof A[t]!="number"||isNaN(A[t]))throw new TypeError("Limit "+t+" is not a valid number");return A[t]}});var dB=Q((v4,hB)=>{"use strict";var EB=require("events").EventEmitter,sL=require("util").inherits,uB=Ka(),oL=Tu(),aL=Buffer.from(`\r
|
|
7
7
|
\r
|
|
@@ -69,7 +69,7 @@ Env vars from ${EA(a)} overwrite the ones from ${EA(o)}
|
|
|
69
69
|
${(0,_C.default)(LS(r),2)}
|
|
70
70
|
}`}};function xS(e){let A;if(e.length>0){let t=e.find(r=>r.fromEnvVar!==null);t?A=`env("${t.fromEnvVar}")`:A=e.map(r=>r.native?"native":r.value)}else A=void 0;return A}function LS(e){let A=Object.keys(e).reduce((t,r)=>Math.max(t,r.length),0);return Object.entries(e).map(([t,r])=>`${t.padEnd(A)} = ${US(r)}`).join(`
|
|
71
71
|
`)}function US(e){return JSON.parse(JSON.stringify(e,(A,t)=>Array.isArray(t)?`[${t.map(r=>JSON.stringify(r)).join(", ")}]`:JSON.stringify(t)))}var ns={};qi(ns,{error:()=>vS,info:()=>MS,log:()=>TS,query:()=>PS,should:()=>jC,tags:()=>rs,warn:()=>xl});var rs={error:vA("prisma:error"),warn:Lt("prisma:warn"),info:Tt("prisma:info"),query:Ut("prisma:query")},jC={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function TS(...e){console.log(...e)}function xl(e,...A){jC.warn()&&console.warn(`${rs.warn} ${e}`,...A)}function MS(e,...A){console.info(`${rs.info} ${e}`,...A)}function vS(e,...A){console.error(`${rs.error} ${e}`,...A)}function PS(e,...A){console.log(`${rs.query} ${e}`,...A)}function vt(e,A){throw new Error(A)}var ga=Z(require("stream")),zC=Z(require("util"));function is(e,A){return JS(e,A)}function JS(e,A){return e?YS(e,A):new vr(A)}function YS(e,A){if(!e)throw new Error("expected readStream");if(!e.readable)throw new Error("readStream must be readable");let t=new vr(A);return e.pipe(t),t}function vr(e){ga.default.Transform.call(this,e),e=e||{},this._readableState.objectMode=!0,this._lineBuffer=[],this._keepEmptyLines=e.keepEmptyLines||!1,this._lastChunkEndedWithCR=!1,this.on("pipe",function(A){this.encoding||A instanceof ga.default.Readable&&(this.encoding=A._readableState.encoding)})}zC.default.inherits(vr,ga.default.Transform);vr.prototype._transform=function(e,A,t){A=A||"utf8",Buffer.isBuffer(e)&&(A=="buffer"?(e=e.toString(),A="utf8"):e=e.toString(A)),this._chunkEncoding=A;let r=e.split(/\r\n|\r|\n/g);this._lastChunkEndedWithCR&&e[0]==`
|
|
72
|
-
`&&r.shift(),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(A,1,t)};vr.prototype._pushBuffer=function(e,A,t){for(;this._lineBuffer.length>A;){let r=this._lineBuffer.shift();if((this._keepEmptyLines||r.length>0)&&!this.push(this._reencode(r,e))){let n=this;setImmediate(function(){n._pushBuffer(e,A,t)});return}}t()};vr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};vr.prototype._reencode=function(e,A){return this.encoding&&this.encoding!=A?Buffer.from(e,A).toString(this.encoding):this.encoding?e:Buffer.from(e,A)};function Ul(e,A){return Object.prototype.hasOwnProperty.call(e,A)}var Tl=(e,A)=>e.reduce((t,r)=>(t[A(r)]=r,t),{});function wn(e,A){let t={};for(let r of Object.keys(e))t[r]=A(e[r],r);return t}function Ml(e,A){if(e.length===0)return;let t=e[0];for(let r=1;r<e.length;r++)A(t,e[r])<0&&(t=e[r]);return t}function U(e,A){Object.defineProperty(e,"name",{value:A,configurable:!0})}var ef=new Set,ss=(e,A,...t)=>{ef.has(e)||(ef.add(e),xl(A,...t))};var z=class e extends Error{constructor(A,t,r){super(A),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=r,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};U(z,"PrismaClientInitializationError");var He=class extends Error{constructor(A,{code:t,clientVersion:r,meta:n,batchRequestIdx:i}){super(A),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=r,this.meta=n,Object.defineProperty(this,"batchRequestIdx",{value:i,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};U(He,"PrismaClientKnownRequestError");var JA=class extends Error{constructor(A,t){super(A),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};U(JA,"PrismaClientRustPanicError");var Me=class extends Error{constructor(A,{clientVersion:t,batchRequestIdx:r}){super(A),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:r,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};U(Me,"PrismaClientUnknownRequestError");var Xe=class extends Error{constructor(t,{clientVersion:r}){super(t);this.name="PrismaClientValidationError";this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};U(Xe,"PrismaClientValidationError");var Rn=9e15,ur=1e9,vl="0123456789abcdef",ha="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",da="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Pl={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Rn,maxE:Rn,crypto:!1},nf,Pt,T=!0,Ca="[DecimalError] ",lr=Ca+"Invalid argument: ",sf=Ca+"Precision limit exceeded",of=Ca+"crypto unavailable",af="[object Decimal]",ze=Math.floor,ve=Math.pow,VS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,qS=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,OS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,cf=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ZA=1e7,x=7,HS=9007199254740991,WS=ha.length-1,Gl=da.length-1,B={toStringTag:af};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),b(e)};B.ceil=function(){return b(new this.constructor(this),this.e+1,2)};B.clampedTo=B.clamp=function(e,A){var t,r=this,n=r.constructor;if(e=new n(e),A=new n(A),!e.s||!A.s)return new n(NaN);if(e.gt(A))throw Error(lr+A);return t=r.cmp(e),t<0?e:r.cmp(A)>0?A:new n(r)};B.comparedTo=B.cmp=function(e){var A,t,r,n,i=this,s=i.d,o=(e=new i.constructor(e)).d,a=i.s,c=e.s;if(!s||!o)return!a||!c?NaN:a!==c?a:s===o?0:!s^a<0?1:-1;if(!s[0]||!o[0])return s[0]?a:o[0]?-c:0;if(a!==c)return a;if(i.e!==e.e)return i.e>e.e^a<0?1:-1;for(r=s.length,n=o.length,A=0,t=r<n?r:n;A<t;++A)if(s[A]!==o[A])return s[A]>o[A]^a<0?1:-1;return r===n?0:r>n^a<0?1:-1};B.cosine=B.cos=function(){var e,A,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=_S(r,hf(r,t)),r.precision=e,r.rounding=A,b(Pt==2||Pt==3?t.neg():t,e,A,!0)):new r(1):new r(NaN)};B.cubeRoot=B.cbrt=function(){var e,A,t,r,n,i,s,o,a,c,g=this,l=g.constructor;if(!g.isFinite()||g.isZero())return new l(g);for(T=!1,i=g.s*ve(g.s*g,1/3),!i||Math.abs(i)==1/0?(t=We(g.d),e=g.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=ve(t,1/3),e=ze((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t),r.s=g.s):r=new l(i.toString()),s=(e=l.precision)+3;;)if(o=r,a=o.times(o).times(o),c=a.plus(g),r=ge(c.plus(g).times(o),c.plus(a),s+2,1),We(o.d).slice(0,s)===(t=We(r.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!n&&t=="4999"){if(!n&&(b(o,e+1,0),o.times(o).times(o).eq(g))){r=o;break}s+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(b(r,e+1,1),A=!r.times(r).times(r).eq(g));break}return T=!0,b(r,e,l.rounding,A)};B.decimalPlaces=B.dp=function(){var e,A=this.d,t=NaN;if(A){if(e=A.length-1,t=(e-ze(this.e/x))*x,e=A[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};B.dividedBy=B.div=function(e){return ge(this,new this.constructor(e))};B.dividedToIntegerBy=B.divToInt=function(e){var A=this,t=A.constructor;return b(ge(A,new t(e),0,1,1),t.precision,t.rounding)};B.equals=B.eq=function(e){return this.cmp(e)===0};B.floor=function(){return b(new this.constructor(this),this.e+1,3)};B.greaterThan=B.gt=function(e){return this.cmp(e)>0};B.greaterThanOrEqualTo=B.gte=function(e){var A=this.cmp(e);return A==1||A===0};B.hyperbolicCosine=B.cosh=function(){var e,A,t,r,n,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;t=s.precision,r=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<32?(e=Math.ceil(n/3),A=(1/Ia(4,e)).toString()):(e=16,A="2.3283064365386962890625e-10"),i=Dn(s,1,i.times(A),new s(1),!0);for(var a,c=e,g=new s(8);c--;)a=i.times(i),i=o.minus(a.times(g.minus(a.times(g))));return b(i,s.precision=t,s.rounding=r,!0)};B.hyperbolicSine=B.sinh=function(){var e,A,t,r,n=this,i=n.constructor;if(!n.isFinite()||n.isZero())return new i(n);if(A=i.precision,t=i.rounding,i.precision=A+Math.max(n.e,n.sd())+4,i.rounding=1,r=n.d.length,r<3)n=Dn(i,2,n,n,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,n=n.times(1/Ia(5,e)),n=Dn(i,2,n,n,!0);for(var s,o=new i(5),a=new i(16),c=new i(20);e--;)s=n.times(n),n=n.times(o.plus(s.times(a.times(s).plus(c))))}return i.precision=A,i.rounding=t,b(n,A,t,!0)};B.hyperbolicTangent=B.tanh=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+7,r.rounding=1,ge(t.sinh(),t.cosh(),r.precision=e,r.rounding=A)):new r(t.s)};B.inverseCosine=B.acos=function(){var e,A=this,t=A.constructor,r=A.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?A.isNeg()?KA(t,n,i):new t(0):new t(NaN):A.isZero()?KA(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,A=A.asin(),e=KA(t,n+4,i).times(.5),t.precision=n,t.rounding=i,e.minus(A))};B.inverseHyperbolicCosine=B.acosh=function(){var e,A,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,A=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,T=!1,t=t.times(t).minus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln()):new r(t)};B.inverseHyperbolicSine=B.asinh=function(){var e,A,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,T=!1,t=t.times(t).plus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln())};B.inverseHyperbolicTangent=B.atanh=function(){var e,A,t,r,n=this,i=n.constructor;return n.isFinite()?n.e>=0?new i(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=i.precision,A=i.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?b(new i(n),e,A,!0):(i.precision=t=r-n.e,n=ge(n.plus(1),new i(1).minus(n),t+e,1),i.precision=e+4,i.rounding=1,n=n.ln(),i.precision=e,i.rounding=A,n.times(.5))):new i(NaN)};B.inverseSine=B.asin=function(){var e,A,t,r,n=this,i=n.constructor;return n.isZero()?new i(n):(A=n.abs().cmp(1),t=i.precision,r=i.rounding,A!==-1?A===0?(e=KA(i,t+4,r).times(.5),e.s=n.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,n=n.div(new i(1).minus(n.times(n)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=r,n.times(2)))};B.inverseTangent=B.atan=function(){var e,A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding;if(c.isFinite()){if(c.isZero())return new g(c);if(c.abs().eq(1)&&l+4<=Gl)return s=KA(g,l+4,u).times(.25),s.s=c.s,s}else{if(!c.s)return new g(NaN);if(l+4<=Gl)return s=KA(g,l+4,u).times(.5),s.s=c.s,s}for(g.precision=o=l+10,g.rounding=1,t=Math.min(28,o/x+2|0),e=t;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(T=!1,A=Math.ceil(o/x),r=1,a=c.times(c),s=new g(c),n=c;e!==-1;)if(n=n.times(a),i=s.minus(n.div(r+=2)),n=n.times(a),s=i.plus(n.div(r+=2)),s.d[A]!==void 0)for(e=A;s.d[e]===i.d[e]&&e--;);return t&&(s=s.times(2<<t-1)),T=!0,b(s,g.precision=l,g.rounding=u,!0)};B.isFinite=function(){return!!this.d};B.isInteger=B.isInt=function(){return!!this.d&&ze(this.e/x)>this.d.length-2};B.isNaN=function(){return!this.s};B.isNegative=B.isNeg=function(){return this.s<0};B.isPositive=B.isPos=function(){return this.s>0};B.isZero=function(){return!!this.d&&this.d[0]===0};B.lessThan=B.lt=function(e){return this.cmp(e)<0};B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1};B.logarithm=B.log=function(e){var A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding,E=5;if(e==null)e=new g(10),A=!0;else{if(e=new g(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new g(NaN);A=e.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new g(t&&!t[0]?-1/0:c.s!=1?NaN:t?0:1/0);if(A)if(t.length>1)i=!0;else{for(n=t[0];n%10===0;)n/=10;i=n!==1}if(T=!1,o=l+E,s=gr(c,o),r=A?Qa(g,o+10):gr(e,o),a=ge(s,r,o,1),os(a.d,n=l,u))do if(o+=10,s=gr(c,o),r=A?Qa(g,o+10):gr(e,o),a=ge(s,r,o,1),!i){+We(a.d).slice(n+1,n+15)+1==1e14&&(a=b(a,l+1,0));break}while(os(a.d,n+=10,u));return T=!0,b(a,l,u)};B.minus=B.sub=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.constructor;if(e=new h(e),!E.d||!e.d)return!E.s||!e.s?e=new h(NaN):E.d?e.s=-e.s:e=new h(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,u=e.d,o=h.precision,a=h.rounding,!c[0]||!u[0]){if(u[0])e.s=-e.s;else if(c[0])e=new h(E);else return new h(a===3?-0:0);return T?b(e,o,a):e}if(t=ze(e.e/x),g=ze(E.e/x),c=c.slice(),i=g-t,i){for(l=i<0,l?(A=c,i=-i,s=u.length):(A=u,t=g,s=c.length),r=Math.max(Math.ceil(o/x),s)+2,i>r&&(i=r,A.length=1),A.reverse(),r=i;r--;)A.push(0);A.reverse()}else{for(r=c.length,s=u.length,l=r<s,l&&(s=r),r=0;r<s;r++)if(c[r]!=u[r]){l=c[r]<u[r];break}i=0}for(l&&(A=c,c=u,u=A,e.s=-e.s),s=c.length,r=u.length-s;r>0;--r)c[s++]=0;for(r=u.length;r>i;){if(c[--r]<u[r]){for(n=r;n&&c[--n]===0;)c[n]=ZA-1;--c[n],c[r]+=ZA}c[r]-=u[r]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--t;return c[0]?(e.d=c,e.e=fa(c,t),T?b(e,o,a):e):new h(a===3?-0:0)};B.modulo=B.mod=function(e){var A,t=this,r=t.constructor;return e=new r(e),!t.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||t.d&&!t.d[0]?b(new r(t),r.precision,r.rounding):(T=!1,r.modulo==9?(A=ge(t,e.abs(),0,3,1),A.s*=e.s):A=ge(t,e,0,r.modulo,1),A=A.times(e),T=!0,t.minus(A))};B.naturalExponential=B.exp=function(){return Jl(this)};B.naturalLogarithm=B.ln=function(){return gr(this)};B.negated=B.neg=function(){var e=new this.constructor(this);return e.s=-e.s,b(e)};B.plus=B.add=function(e){var A,t,r,n,i,s,o,a,c,g,l=this,u=l.constructor;if(e=new u(e),!l.d||!e.d)return!l.s||!e.s?e=new u(NaN):l.d||(e=new u(e.d||l.s===e.s?l:NaN)),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,g=e.d,o=u.precision,a=u.rounding,!c[0]||!g[0])return g[0]||(e=new u(l)),T?b(e,o,a):e;if(i=ze(l.e/x),r=ze(e.e/x),c=c.slice(),n=i-r,n){for(n<0?(t=c,n=-n,s=g.length):(t=g,r=i,s=c.length),i=Math.ceil(o/x),s=i>s?i+1:s+1,n>s&&(n=s,t.length=1),t.reverse();n--;)t.push(0);t.reverse()}for(s=c.length,n=g.length,s-n<0&&(n=s,t=g,g=c,c=t),A=0;n;)A=(c[--n]=c[n]+g[n]+A)/ZA|0,c[n]%=ZA;for(A&&(c.unshift(A),++r),s=c.length;c[--s]==0;)c.pop();return e.d=c,e.e=fa(c,r),T?b(e,o,a):e};B.precision=B.sd=function(e){var A,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(lr+e);return t.d?(A=gf(t.d),e&&t.e+1>A&&(A=t.e+1)):A=NaN,A};B.round=function(){var e=this,A=e.constructor;return b(new A(e),e.e+1,A.rounding)};B.sine=B.sin=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=KS(r,hf(r,t)),r.precision=e,r.rounding=A,b(Pt>2?t.neg():t,e,A,!0)):new r(NaN)};B.squareRoot=B.sqrt=function(){var e,A,t,r,n,i,s=this,o=s.d,a=s.e,c=s.s,g=s.constructor;if(c!==1||!o||!o[0])return new g(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,c=Math.sqrt(+s),c==0||c==1/0?(A=We(o),(A.length+a)%2==0&&(A+="0"),c=Math.sqrt(A),a=ze((a+1)/2)-(a<0||a%2),c==1/0?A="5e"+a:(A=c.toExponential(),A=A.slice(0,A.indexOf("e")+1)+a),r=new g(A)):r=new g(c.toString()),t=(a=g.precision)+3;;)if(i=r,r=i.plus(ge(s,i,t+2,1)).times(.5),We(i.d).slice(0,t)===(A=We(r.d)).slice(0,t))if(A=A.slice(t-3,t+1),A=="9999"||!n&&A=="4999"){if(!n&&(b(i,a+1,0),i.times(i).eq(s))){r=i;break}t+=4,n=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(b(r,a+1,1),e=!r.times(r).eq(s));break}return T=!0,b(r,a,g.rounding,e)};B.tangent=B.tan=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+10,r.rounding=1,t=t.sin(),t.s=1,t=ge(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=A,b(Pt==2||Pt==4?t.neg():t,e,A,!0)):new r(NaN)};B.times=B.mul=function(e){var A,t,r,n,i,s,o,a,c,g=this,l=g.constructor,u=g.d,E=(e=new l(e)).d;if(e.s*=g.s,!u||!u[0]||!E||!E[0])return new l(!e.s||u&&!u[0]&&!E||E&&!E[0]&&!u?NaN:!u||!E?e.s/0:e.s*0);for(t=ze(g.e/x)+ze(e.e/x),a=u.length,c=E.length,a<c&&(i=u,u=E,E=i,s=a,a=c,c=s),i=[],s=a+c,r=s;r--;)i.push(0);for(r=c;--r>=0;){for(A=0,n=a+r;n>r;)o=i[n]+E[r]*u[n-r-1]+A,i[n--]=o%ZA|0,A=o/ZA|0;i[n]=(i[n]+A)%ZA|0}for(;!i[--s];)i.pop();return A?++t:i.shift(),e.d=i,e.e=fa(i,t),T?b(e,l.precision,l.rounding):e};B.toBinary=function(e,A){return Vl(this,2,e,A)};B.toDecimalPlaces=B.toDP=function(e,A){var t=this,r=t.constructor;return t=new r(t),e===void 0?t:(hA(e,0,ur),A===void 0?A=r.rounding:hA(A,0,8),b(t,e+t.e+1,A))};B.toExponential=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,!0):(hA(e,0,ur),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e+1,A),t=lt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toFixed=function(e,A){var t,r,n=this,i=n.constructor;return e===void 0?t=lt(n):(hA(e,0,ur),A===void 0?A=i.rounding:hA(A,0,8),r=b(new i(n),e+n.e+1,A),t=lt(r,!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};B.toFraction=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.d,d=E.constructor;if(!h)return new d(E);if(c=t=new d(1),r=a=new d(0),A=new d(r),i=A.e=gf(h)-E.e-1,s=i%x,A.d[0]=ve(10,s<0?x+s:s),e==null)e=i>0?A:c;else{if(o=new d(e),!o.isInt()||o.lt(c))throw Error(lr+o);e=o.gt(A)?i>0?A:c:o}for(T=!1,o=new d(We(h)),g=d.precision,d.precision=i=h.length*x*2;l=ge(o,A,0,1,1),n=t.plus(l.times(r)),n.cmp(e)!=1;)t=r,r=n,n=c,c=a.plus(l.times(n)),a=n,n=A,A=o.minus(l.times(n)),o=n;return n=ge(e.minus(t),r,0,1,1),a=a.plus(n.times(c)),t=t.plus(n.times(r)),a.s=c.s=E.s,u=ge(c,r,i,1).minus(E).abs().cmp(ge(a,t,i,1).minus(E).abs())<1?[c,r]:[a,t],d.precision=g,T=!0,u};B.toHexadecimal=B.toHex=function(e,A){return Vl(this,16,e,A)};B.toNearest=function(e,A){var t=this,r=t.constructor;if(t=new r(t),e==null){if(!t.d)return t;e=new r(1),A=r.rounding}else{if(e=new r(e),A===void 0?A=r.rounding:hA(A,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(T=!1,t=ge(t,e,0,A,1).times(e),T=!0,b(t)):(e.s=t.s,t=e),t};B.toNumber=function(){return+this};B.toOctal=function(e,A){return Vl(this,8,e,A)};B.toPower=B.pow=function(e){var A,t,r,n,i,s,o=this,a=o.constructor,c=+(e=new a(e));if(!o.d||!e.d||!o.d[0]||!e.d[0])return new a(ve(+o,c));if(o=new a(o),o.eq(1))return o;if(r=a.precision,i=a.rounding,e.eq(1))return b(o,r,i);if(A=ze(e.e/x),A>=e.d.length-1&&(t=c<0?-c:c)<=HS)return n=lf(a,o,t,r),e.s<0?new a(1).div(n):b(n,r,i);if(s=o.s,s<0){if(A<e.d.length-1)return new a(NaN);if(e.d[A]&1||(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return t=ve(+o,c),A=t==0||!isFinite(t)?ze(c*(Math.log("0."+We(o.d))/Math.LN10+o.e+1)):new a(t+"").e,A>a.maxE+1||A<a.minE-1?new a(A>0?s/0:0):(T=!1,a.rounding=o.s=1,t=Math.min(12,(A+"").length),n=Jl(e.times(gr(o,r+t)),r),n.d&&(n=b(n,r+5,1),os(n.d,r,i)&&(A=r+10,n=b(Jl(e.times(gr(o,A+t)),A),A+5,1),+We(n.d).slice(r+1,r+15)+1==1e14&&(n=b(n,r+1,0)))),n.s=s,T=!0,a.rounding=i,b(n,r,i))};B.toPrecision=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(hA(e,1,ur),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e,A),t=lt(r,e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toSignificantDigits=B.toSD=function(e,A){var t=this,r=t.constructor;return e===void 0?(e=r.precision,A=r.rounding):(hA(e,1,ur),A===void 0?A=r.rounding:hA(A,0,8)),b(new r(t),e,A)};B.toString=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};B.truncated=B.trunc=function(){return b(new this.constructor(this),this.e+1,1)};B.valueOf=B.toJSON=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()?"-"+t:t};function We(e){var A,t,r,n=e.length-1,i="",s=e[0];if(n>0){for(i+=s,A=1;A<n;A++)r=e[A]+"",t=x-r.length,t&&(i+=cr(t)),i+=r;s=e[A],r=s+"",t=x-r.length,t&&(i+=cr(t))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}function hA(e,A,t){if(e!==~~e||e<A||e>t)throw Error(lr+e)}function os(e,A,t,r){var n,i,s,o;for(i=e[0];i>=10;i/=10)--A;return--A<0?(A+=x,n=0):(n=Math.ceil((A+1)/x),A%=x),i=ve(10,x-A),o=e[n]%i|0,r==null?A<3?(A==0?o=o/100|0:A==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==i||t>3&&o+1==i/2)&&(e[n+1]/i/100|0)==ve(10,A-2)-1||(o==i/2||o==0)&&(e[n+1]/i/100|0)==0:A<4?(A==0?o=o/1e3|0:A==1?o=o/100|0:A==2&&(o=o/10|0),s=(r||t<4)&&o==9999||!r&&t>3&&o==4999):s=((r||t<4)&&o+1==i||!r&&t>3&&o+1==i/2)&&(e[n+1]/i/1e3|0)==ve(10,A-3)-1,s}function Ea(e,A,t){for(var r,n=[0],i,s=0,o=e.length;s<o;){for(i=n.length;i--;)n[i]*=A;for(n[0]+=vl.indexOf(e.charAt(s++)),r=0;r<n.length;r++)n[r]>t-1&&(n[r+1]===void 0&&(n[r+1]=0),n[r+1]+=n[r]/t|0,n[r]%=t)}return n.reverse()}function _S(e,A){var t,r,n;if(A.isZero())return A;r=A.d.length,r<32?(t=Math.ceil(r/3),n=(1/Ia(4,t)).toString()):(t=16,n="2.3283064365386962890625e-10"),e.precision+=t,A=Dn(e,1,A.times(n),new e(1));for(var i=t;i--;){var s=A.times(A);A=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,A}var ge=function(){function e(r,n,i){var s,o=0,a=r.length;for(r=r.slice();a--;)s=r[a]*n+o,r[a]=s%i|0,o=s/i|0;return o&&r.unshift(o),r}function A(r,n,i,s){var o,a;if(i!=s)a=i>s?1:-1;else for(o=a=0;o<i;o++)if(r[o]!=n[o]){a=r[o]>n[o]?1:-1;break}return a}function t(r,n,i,s){for(var o=0;i--;)r[i]-=o,o=r[i]<n[i]?1:0,r[i]=o*s+r[i]-n[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,n,i,s,o,a){var c,g,l,u,E,h,d,C,I,p,w,m,K,H,ne,q,ae,De,ee,Y,ce=r.constructor,Ge=r.s==n.s?1:-1,fe=r.d,P=n.d;if(!fe||!fe[0]||!P||!P[0])return new ce(!r.s||!n.s||(fe?P&&fe[0]==P[0]:!P)?NaN:fe&&fe[0]==0||!P?Ge*0:Ge/0);for(a?(E=1,g=r.e-n.e):(a=ZA,E=x,g=ze(r.e/E)-ze(n.e/E)),ee=P.length,ae=fe.length,I=new ce(Ge),p=I.d=[],l=0;P[l]==(fe[l]||0);l++);if(P[l]>(fe[l]||0)&&g--,i==null?(H=i=ce.precision,s=ce.rounding):o?H=i+(r.e-n.e)+1:H=i,H<0)p.push(1),h=!0;else{if(H=H/E+2|0,l=0,ee==1){for(u=0,P=P[0],H++;(l<ae||u)&&H--;l++)ne=u*a+(fe[l]||0),p[l]=ne/P|0,u=ne%P|0;h=u||l<ae}else{for(u=a/(P[0]+1)|0,u>1&&(P=e(P,u,a),fe=e(fe,u,a),ee=P.length,ae=fe.length),q=ee,w=fe.slice(0,ee),m=w.length;m<ee;)w[m++]=0;Y=P.slice(),Y.unshift(0),De=P[0],P[1]>=a/2&&++De;do u=0,c=A(P,w,ee,m),c<0?(K=w[0],ee!=m&&(K=K*a+(w[1]||0)),u=K/De|0,u>1?(u>=a&&(u=a-1),d=e(P,u,a),C=d.length,m=w.length,c=A(d,w,C,m),c==1&&(u--,t(d,ee<C?Y:P,C,a))):(u==0&&(c=u=1),d=P.slice()),C=d.length,C<m&&d.unshift(0),t(w,d,m,a),c==-1&&(m=w.length,c=A(P,w,ee,m),c<1&&(u++,t(w,ee<m?Y:P,m,a))),m=w.length):c===0&&(u++,w=[0]),p[l++]=u,c&&w[0]?w[m++]=fe[q]||0:(w=[fe[q]],m=1);while((q++<ae||w[0]!==void 0)&&H--);h=w[0]!==void 0}p[0]||p.shift()}if(E==1)I.e=g,nf=h;else{for(l=1,u=p[0];u>=10;u/=10)l++;I.e=l+g*E-1,b(I,o?i+I.e+1:i,s,h)}return I}}();function b(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor;e:if(A!=null){if(l=e.d,!l)return e;for(n=1,o=l[0];o>=10;o/=10)n++;if(i=A-n,i<0)i+=x,s=A,g=l[u=0],a=g/ve(10,n-s-1)%10|0;else if(u=Math.ceil((i+1)/x),o=l.length,u>=o)if(r){for(;o++<=u;)l.push(0);g=a=0,n=1,i%=x,s=i-x+1}else break e;else{for(g=o=l[u],n=1;o>=10;o/=10)n++;i%=x,s=i-x+n,a=s<0?0:g/ve(10,n-s-1)%10|0}if(r=r||A<0||l[u+1]!==void 0||(s<0?g:g%ve(10,n-s-1)),c=t<4?(a||r)&&(t==0||t==(e.s<0?3:2)):a>5||a==5&&(t==4||r||t==6&&(i>0?s>0?g/ve(10,n-s):0:l[u-1])%10&1||t==(e.s<0?8:7)),A<1||!l[0])return l.length=0,c?(A-=e.e+1,l[0]=ve(10,(x-A%x)%x),e.e=-A||0):l[0]=e.e=0,e;if(i==0?(l.length=u,o=1,u--):(l.length=u+1,o=ve(10,x-i),l[u]=s>0?(g/ve(10,n-s)%ve(10,s)|0)*o:0),c)for(;;)if(u==0){for(i=1,s=l[0];s>=10;s/=10)i++;for(s=l[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(e.e++,l[0]==ZA&&(l[0]=1));break}else{if(l[u]+=o,l[u]!=ZA)break;l[u--]=0,o=1}for(i=l.length;l[--i]===0;)l.pop()}return T&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e<E.minE&&(e.e=0,e.d=[0])),e}function lt(e,A,t){if(!e.isFinite())return Ef(e);var r,n=e.e,i=We(e.d),s=i.length;return A?(t&&(r=t-s)>0?i=i.charAt(0)+"."+i.slice(1)+cr(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):n<0?(i="0."+cr(-n-1)+i,t&&(r=t-s)>0&&(i+=cr(r))):n>=s?(i+=cr(n+1-s),t&&(r=t-n-1)>0&&(i=i+"."+cr(r))):((r=n+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),t&&(r=t-s)>0&&(n+1===s&&(i+="."),i+=cr(r))),i}function fa(e,A){var t=e[0];for(A*=x;t>=10;t/=10)A++;return A}function Qa(e,A,t){if(A>WS)throw T=!0,t&&(e.precision=t),Error(sf);return b(new e(ha),A,1,!0)}function KA(e,A,t){if(A>Gl)throw Error(sf);return b(new e(da),A,t,!0)}function gf(e){var A=e.length-1,t=A*x+1;if(A=e[A],A){for(;A%10==0;A/=10)t--;for(A=e[0];A>=10;A/=10)t++}return t}function cr(e){for(var A="";e--;)A+="0";return A}function lf(e,A,t,r){var n,i=new e(1),s=Math.ceil(r/x+4);for(T=!1;;){if(t%2&&(i=i.times(A),tf(i.d,s)&&(n=!0)),t=ze(t/2),t===0){t=i.d.length-1,n&&i.d[t]===0&&++i.d[t];break}A=A.times(A),tf(A.d,s)}return T=!0,i}function Af(e){return e.d[e.d.length-1]&1}function uf(e,A,t){for(var r,n=new e(A[0]),i=0;++i<A.length;)if(r=new e(A[i]),r.s)n[t](r)&&(n=r);else{n=r;break}return n}function Jl(e,A){var t,r,n,i,s,o,a,c=0,g=0,l=0,u=e.constructor,E=u.rounding,h=u.precision;if(!e.d||!e.d[0]||e.e>17)return new u(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(A==null?(T=!1,a=h):a=A,o=new u(.03125);e.e>-2;)e=e.times(o),l+=5;for(r=Math.log(ve(2,l))/Math.LN10*2+5|0,a+=r,t=i=s=new u(1),u.precision=a;;){if(i=b(i.times(e),a,1),t=t.times(++g),o=s.plus(ge(i,t,a,1)),We(o.d).slice(0,a)===We(s.d).slice(0,a)){for(n=l;n--;)s=b(s.times(s),a,1);if(A==null)if(c<3&&os(s.d,a-r,E,c))u.precision=a+=10,t=i=o=new u(1),g=0,c++;else return b(s,u.precision=h,E,T=!0);else return u.precision=h,s}s=o}}function gr(e,A){var t,r,n,i,s,o,a,c,g,l,u,E=1,h=10,d=e,C=d.d,I=d.constructor,p=I.rounding,w=I.precision;if(d.s<0||!C||!C[0]||!d.e&&C[0]==1&&C.length==1)return new I(C&&!C[0]?-1/0:d.s!=1?NaN:C?0:d);if(A==null?(T=!1,g=w):g=A,I.precision=g+=h,t=We(C),r=t.charAt(0),Math.abs(i=d.e)<15e14){for(;r<7&&r!=1||r==1&&t.charAt(1)>3;)d=d.times(e),t=We(d.d),r=t.charAt(0),E++;i=d.e,r>1?(d=new I("0."+t),i++):d=new I(r+"."+t.slice(1))}else return c=Qa(I,g+2,w).times(i+""),d=gr(new I(r+"."+t.slice(1)),g-h).plus(c),I.precision=w,A==null?b(d,w,p,T=!0):d;for(l=d,a=s=d=ge(d.minus(1),d.plus(1),g,1),u=b(d.times(d),g,1),n=3;;){if(s=b(s.times(u),g,1),c=a.plus(ge(s,new I(n),g,1)),We(c.d).slice(0,g)===We(a.d).slice(0,g))if(a=a.times(2),i!==0&&(a=a.plus(Qa(I,g+2,w).times(i+""))),a=ge(a,new I(E),g,1),A==null)if(os(a.d,g-h,p,o))I.precision=g+=h,c=s=d=ge(l.minus(1),l.plus(1),g,1),u=b(d.times(d),g,1),n=o=1;else return b(a,I.precision=w,p,T=!0);else return I.precision=w,a;a=c,n+=2}}function Ef(e){return String(e.s*e.s/0)}function Yl(e,A){var t,r,n;for((t=A.indexOf("."))>-1&&(A=A.replace(".","")),(r=A.search(/e/i))>0?(t<0&&(t=r),t+=+A.slice(r+1),A=A.substring(0,r)):t<0&&(t=A.length),r=0;A.charCodeAt(r)===48;r++);for(n=A.length;A.charCodeAt(n-1)===48;--n);if(A=A.slice(r,n),A){if(n-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%x,t<0&&(r+=x),r<n){for(r&&e.d.push(+A.slice(0,r)),n-=x;r<n;)e.d.push(+A.slice(r,r+=x));A=A.slice(r),r=x-A.length}else r-=n;for(;r--;)A+="0";e.d.push(+A),T&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function jS(e,A){var t,r,n,i,s,o,a,c,g;if(A.indexOf("_")>-1){if(A=A.replace(/(\d)_(?=\d)/g,"$1"),cf.test(A))return Yl(e,A)}else if(A==="Infinity"||A==="NaN")return+A||(e.s=NaN),e.e=NaN,e.d=null,e;if(qS.test(A))t=16,A=A.toLowerCase();else if(VS.test(A))t=2;else if(OS.test(A))t=8;else throw Error(lr+A);for(i=A.search(/p/i),i>0?(a=+A.slice(i+1),A=A.substring(2,i)):A=A.slice(2),i=A.indexOf("."),s=i>=0,r=e.constructor,s&&(A=A.replace(".",""),o=A.length,i=o-i,n=lf(r,new r(t),i,i*2)),c=Ea(A,t,ZA),g=c.length-1,i=g;c[i]===0;--i)c.pop();return i<0?new r(e.s*0):(e.e=fa(c,g),e.d=c,T=!1,s&&(e=ge(e,n,o*4)),a&&(e=e.times(Math.abs(a)<54?ve(2,a):Pr.pow(2,a))),T=!0,e)}function KS(e,A){var t,r=A.d.length;if(r<3)return A.isZero()?A:Dn(e,2,A,A);t=1.4*Math.sqrt(r),t=t>16?16:t|0,A=A.times(1/Ia(5,t)),A=Dn(e,2,A,A);for(var n,i=new e(5),s=new e(16),o=new e(20);t--;)n=A.times(A),A=A.times(i.plus(n.times(s.times(n).minus(o))));return A}function Dn(e,A,t,r,n){var i,s,o,a,c=1,g=e.precision,l=Math.ceil(g/x);for(T=!1,a=t.times(t),o=new e(r);;){if(s=ge(o.times(a),new e(A++*A++),g,1),o=n?r.plus(s):r.minus(s),r=ge(s.times(a),new e(A++*A++),g,1),s=o.plus(r),s.d[l]!==void 0){for(i=l;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=r,r=s,s=i,c++}return T=!0,s.d.length=l+1,s}function Ia(e,A){for(var t=e;--A;)t*=e;return t}function hf(e,A){var t,r=A.s<0,n=KA(e,e.precision,1),i=n.times(.5);if(A=A.abs(),A.lte(i))return Pt=r?4:1,A;if(t=A.divToInt(n),t.isZero())Pt=r?3:2;else{if(A=A.minus(t.times(n)),A.lte(i))return Pt=Af(t)?r?2:3:r?4:1,A;Pt=Af(t)?r?1:4:r?3:2}return A.minus(n).abs()}function Vl(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor,h=t!==void 0;if(h?(hA(t,1,ur),r===void 0?r=E.rounding:hA(r,0,8)):(t=E.precision,r=E.rounding),!e.isFinite())g=Ef(e);else{for(g=lt(e),s=g.indexOf("."),h?(n=2,A==16?t=t*4-3:A==8&&(t=t*3-2)):n=A,s>=0&&(g=g.replace(".",""),u=new E(1),u.e=g.length-s,u.d=Ea(lt(u),10,n),u.e=u.d.length),l=Ea(g,10,n),i=a=l.length;l[--a]==0;)l.pop();if(!l[0])g=h?"0p+0":"0";else{if(s<0?i--:(e=new E(e),e.d=l,e.e=i,e=ge(e,u,t,r,0,n),l=e.d,i=e.e,c=nf),s=l[t],o=n/2,c=c||l[t+1]!==void 0,c=r<4?(s!==void 0||c)&&(r===0||r===(e.s<0?3:2)):s>o||s===o&&(r===4||c||r===6&&l[t-1]&1||r===(e.s<0?8:7)),l.length=t,c)for(;++l[--t]>n-1;)l[t]=0,t||(++i,l.unshift(1));for(a=l.length;!l[a-1];--a);for(s=0,g="";s<a;s++)g+=vl.charAt(l[s]);if(h){if(a>1)if(A==16||A==8){for(s=A==16?4:3,--a;a%s;a++)g+="0";for(l=Ea(g,n,A),a=l.length;!l[a-1];--a);for(s=1,g="1.";s<a;s++)g+=vl.charAt(l[s])}else g=g.charAt(0)+"."+g.slice(1);g=g+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)g="0"+g;g="0."+g}else if(++i>a)for(i-=a;i--;)g+="0";else i<a&&(g=g.slice(0,i)+"."+g.slice(i))}g=(A==16?"0x":A==2?"0b":A==8?"0o":"")+g}return e.s<0?"-"+g:g}function tf(e,A){if(e.length>A)return e.length=A,!0}function ZS(e){return new this(e).abs()}function XS(e){return new this(e).acos()}function zS(e){return new this(e).acosh()}function $S(e,A){return new this(e).plus(A)}function eF(e){return new this(e).asin()}function AF(e){return new this(e).asinh()}function tF(e){return new this(e).atan()}function rF(e){return new this(e).atanh()}function nF(e,A){e=new this(e),A=new this(A);var t,r=this.precision,n=this.rounding,i=r+4;return!e.s||!A.s?t=new this(NaN):!e.d&&!A.d?(t=KA(this,i,1).times(A.s>0?.25:.75),t.s=e.s):!A.d||e.isZero()?(t=A.s<0?KA(this,r,n):new this(0),t.s=e.s):!e.d||A.isZero()?(t=KA(this,i,1).times(.5),t.s=e.s):A.s<0?(this.precision=i,this.rounding=1,t=this.atan(ge(e,A,i,1)),A=KA(this,i,1),this.precision=r,this.rounding=n,t=e.s<0?t.minus(A):t.plus(A)):t=this.atan(ge(e,A,i,1)),t}function iF(e){return new this(e).cbrt()}function sF(e){return b(e=new this(e),e.e+1,2)}function oF(e,A,t){return new this(e).clamp(A,t)}function aF(e){if(!e||typeof e!="object")throw Error(Ca+"Object expected");var A,t,r,n=e.defaults===!0,i=["precision",1,ur,"rounding",0,8,"toExpNeg",-Rn,0,"toExpPos",0,Rn,"maxE",0,Rn,"minE",-Rn,0,"modulo",0,9];for(A=0;A<i.length;A+=3)if(t=i[A],n&&(this[t]=Pl[t]),(r=e[t])!==void 0)if(ze(r)===r&&r>=i[A+1]&&r<=i[A+2])this[t]=r;else throw Error(lr+t+": "+r);if(t="crypto",n&&(this[t]=Pl[t]),(r=e[t])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(of);else this[t]=!1;else throw Error(lr+t+": "+r);return this}function cF(e){return new this(e).cos()}function gF(e){return new this(e).cosh()}function df(e){var A,t,r;function n(i){var s,o,a,c=this;if(!(c instanceof n))return new n(i);if(c.constructor=n,rf(i)){c.s=i.s,T?!i.d||i.e>n.maxE?(c.e=NaN,c.d=null):i.e<n.minE?(c.e=0,c.d=[0]):(c.e=i.e,c.d=i.d.slice()):(c.e=i.e,c.d=i.d?i.d.slice():i.d);return}if(a=typeof i,a==="number"){if(i===0){c.s=1/i<0?-1:1,c.e=0,c.d=[0];return}if(i<0?(i=-i,c.s=-1):c.s=1,i===~~i&&i<1e7){for(s=0,o=i;o>=10;o/=10)s++;T?s>n.maxE?(c.e=NaN,c.d=null):s<n.minE?(c.e=0,c.d=[0]):(c.e=s,c.d=[i]):(c.e=s,c.d=[i]);return}else if(i*0!==0){i||(c.s=NaN),c.e=NaN,c.d=null;return}return Yl(c,i.toString())}else if(a!=="string")throw Error(lr+i);return(o=i.charCodeAt(0))===45?(i=i.slice(1),c.s=-1):(o===43&&(i=i.slice(1)),c.s=1),cf.test(i)?Yl(c,i):jS(c,i)}if(n.prototype=B,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.EUCLID=9,n.config=n.set=aF,n.clone=df,n.isDecimal=rf,n.abs=ZS,n.acos=XS,n.acosh=zS,n.add=$S,n.asin=eF,n.asinh=AF,n.atan=tF,n.atanh=rF,n.atan2=nF,n.cbrt=iF,n.ceil=sF,n.clamp=oF,n.cos=cF,n.cosh=gF,n.div=lF,n.exp=uF,n.floor=EF,n.hypot=hF,n.ln=dF,n.log=QF,n.log10=fF,n.log2=CF,n.max=IF,n.min=BF,n.mod=pF,n.mul=mF,n.pow=yF,n.random=wF,n.round=RF,n.sign=DF,n.sin=bF,n.sinh=kF,n.sqrt=SF,n.sub=FF,n.sum=NF,n.tan=xF,n.tanh=LF,n.trunc=UF,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],A=0;A<r.length;)e.hasOwnProperty(t=r[A++])||(e[t]=this[t]);return n.config(e),n}function lF(e,A){return new this(e).div(A)}function uF(e){return new this(e).exp()}function EF(e){return b(e=new this(e),e.e+1,3)}function hF(){var e,A,t=new this(0);for(T=!1,e=0;e<arguments.length;)if(A=new this(arguments[e++]),A.d)t.d&&(t=t.plus(A.times(A)));else{if(A.s)return T=!0,new this(1/0);t=A}return T=!0,t.sqrt()}function rf(e){return e instanceof Pr||e&&e.toStringTag===af||!1}function dF(e){return new this(e).ln()}function QF(e,A){return new this(e).log(A)}function CF(e){return new this(e).log(2)}function fF(e){return new this(e).log(10)}function IF(){return uf(this,arguments,"lt")}function BF(){return uf(this,arguments,"gt")}function pF(e,A){return new this(e).mod(A)}function mF(e,A){return new this(e).mul(A)}function yF(e,A){return new this(e).pow(A)}function wF(e){var A,t,r,n,i=0,s=new this(1),o=[];if(e===void 0?e=this.precision:hA(e,1,ur),r=Math.ceil(e/x),this.crypto)if(crypto.getRandomValues)for(A=crypto.getRandomValues(new Uint32Array(r));i<r;)n=A[i],n>=429e7?A[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=n%1e7;else if(crypto.randomBytes){for(A=crypto.randomBytes(r*=4);i<r;)n=A[i]+(A[i+1]<<8)+(A[i+2]<<16)+((A[i+3]&127)<<24),n>=214e7?crypto.randomBytes(4).copy(A,i):(o.push(n%1e7),i+=4);i=r/4}else throw Error(of);else for(;i<r;)o[i++]=Math.random()*1e7|0;for(r=o[--i],e%=x,r&&e&&(n=ve(10,x-e),o[i]=(r/n|0)*n);o[i]===0;i--)o.pop();if(i<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=x)o.shift();for(r=1,n=o[0];n>=10;n/=10)r++;r<x&&(t-=x-r)}return s.e=t,s.d=o,s}function RF(e){return b(e=new this(e),e.e+1,this.rounding)}function DF(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function bF(e){return new this(e).sin()}function kF(e){return new this(e).sinh()}function SF(e){return new this(e).sqrt()}function FF(e,A){return new this(e).sub(A)}function NF(){var e=0,A=arguments,t=new this(A[e]);for(T=!1;t.s&&++e<A.length;)t=t.plus(A[e]);return T=!0,b(t,this.precision,this.rounding)}function xF(e){return new this(e).tan()}function LF(e){return new this(e).tanh()}function UF(e){return b(e=new this(e),e.e+1,1)}B[Symbol.for("nodejs.util.inspect.custom")]=B.toString;B[Symbol.toStringTag]="Decimal";var Pr=B.constructor=df(Pl);ha=new Pr(ha);da=new Pr(da);var ut=Pr;function bn(e){return e===null?e:Array.isArray(e)?e.map(bn):typeof e=="object"?TF(e)?MF(e):wn(e,bn):e}function TF(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function MF({$type:e,value:A}){switch(e){case"BigInt":return BigInt(A);case"Bytes":return Buffer.from(A,"base64");case"DateTime":return new Date(A);case"Decimal":return new ut(A);case"Json":return JSON.parse(A);default:vt(A,"Unknown tagged value")}}function kn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Sn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Ba(e){return e.toString()!=="Invalid Date"}function Fn(e){return Pr.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}var pf=Z(Sl());var Bf=Z(require("fs"));var Qf={keyword:Tt,entity:Tt,value:e=>Ye(Ut(e)),punctuation:Ut,directive:Tt,function:Tt,variable:e=>Ye(Ut(e)),string:e=>Ye(rr(e)),boolean:Lt,number:Tt,comment:Oi};var vF=e=>e,pa={},PF=0,v={manual:pa.Prism&&pa.Prism.manual,disableWorkerMessageHandler:pa.Prism&&pa.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof XA){let A=e;return new XA(A.type,v.util.encode(A.content),A.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++PF}),e.__id},clone:function e(A,t){let r,n,i=v.util.type(A);switch(t=t||{},i){case"Object":if(n=v.util.objId(A),t[n])return t[n];r={},t[n]=r;for(let s in A)A.hasOwnProperty(s)&&(r[s]=e(A[s],t));return r;case"Array":return n=v.util.objId(A),t[n]?t[n]:(r=[],t[n]=r,A.forEach(function(s,o){r[o]=e(s,t)}),r);default:return A}}},languages:{extend:function(e,A){let t=v.util.clone(v.languages[e]);for(let r in A)t[r]=A[r];return t},insertBefore:function(e,A,t,r){r=r||v.languages;let n=r[e],i={};for(let o in n)if(n.hasOwnProperty(o)){if(o==A)for(let a in t)t.hasOwnProperty(a)&&(i[a]=t[a]);t.hasOwnProperty(o)||(i[o]=n[o])}let s=r[e];return r[e]=i,v.languages.DFS(v.languages,function(o,a){a===s&&o!=e&&(this[o]=i)}),i},DFS:function e(A,t,r,n){n=n||{};let i=v.util.objId;for(let s in A)if(A.hasOwnProperty(s)){t.call(A,s,A[s],r||s);let o=A[s],a=v.util.type(o);a==="Object"&&!n[i(o)]?(n[i(o)]=!0,e(o,t,null,n)):a==="Array"&&!n[i(o)]&&(n[i(o)]=!0,e(o,t,s,n))}}},plugins:{},highlight:function(e,A,t){let r={code:e,grammar:A,language:t};return v.hooks.run("before-tokenize",r),r.tokens=v.tokenize(r.code,r.grammar),v.hooks.run("after-tokenize",r),XA.stringify(v.util.encode(r.tokens),r.language)},matchGrammar:function(e,A,t,r,n,i,s){for(let d in t){if(!t.hasOwnProperty(d)||!t[d])continue;if(d==s)return;let C=t[d];C=v.util.type(C)==="Array"?C:[C];for(let I=0;I<C.length;++I){let p=C[I],w=p.inside,m=!!p.lookbehind,K=!!p.greedy,H=0,ne=p.alias;if(K&&!p.pattern.global){let q=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,q+"g")}p=p.pattern||p;for(let q=r,ae=n;q<A.length;ae+=A[q].length,++q){let De=A[q];if(A.length>e.length)return;if(De instanceof XA)continue;if(K&&q!=A.length-1){p.lastIndex=ae;var l=p.exec(e);if(!l)break;var g=l.index+(m?l[1].length:0),u=l.index+l[0].length,o=q,a=ae;for(let P=A.length;o<P&&(a<u||!A[o].type&&!A[o-1].greedy);++o)a+=A[o].length,g>=a&&(++q,ae=a);if(A[q]instanceof XA)continue;c=o-q,De=e.slice(ae,a),l.index-=ae}else{p.lastIndex=0;var l=p.exec(De),c=1}if(!l){if(i)break;continue}m&&(H=l[1]?l[1].length:0);var g=l.index+H,l=l[0].slice(H),u=g+l.length,E=De.slice(0,g),h=De.slice(u);let ee=[q,c];E&&(++q,ae+=E.length,ee.push(E));let Y=new XA(d,w?v.tokenize(l,w):l,ne,l,K);if(ee.push(Y),h&&ee.push(h),Array.prototype.splice.apply(A,ee),c!=1&&v.matchGrammar(e,A,t,q,ae,!0,d),i)break}}}},tokenize:function(e,A){let t=[e],r=A.rest;if(r){for(let n in r)A[n]=r[n];delete A.rest}return v.matchGrammar(e,t,A,0,0,!1),t},hooks:{all:{},add:function(e,A){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(A)},run:function(e,A){let t=v.hooks.all[e];if(!(!t||!t.length))for(var r=0,n;n=t[r++];)n(A)}},Token:XA};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function XA(e,A,t,r,n){this.type=e,this.content=A,this.alias=t,this.length=(r||"").length|0,this.greedy=!!n}XA.stringify=function(e,A){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return XA.stringify(t,A)}).join(""):GF(e.type)(e.content)};function GF(e){return Qf[e]||vF}function Cf(e){return JF(e,v.languages.javascript)}function JF(e,A){return v.tokenize(e,A).map(r=>XA.stringify(r)).join("")}var ff=Z(HC());function If(e){return(0,ff.default)(e)}var ma=class e{static read(A){let t;try{t=Bf.default.readFileSync(A,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(A){let t=A.split(/\r?\n/);return new e(1,t)}constructor(A,t){this.firstLineNumber=A,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(A,t){if(A<this.firstLineNumber||A>this.lines.length+this.firstLineNumber)return this;let r=A-this.firstLineNumber,n=[...this.lines];return n[r]=t(n[r]),new e(this.firstLineNumber,n)}mapLines(A){return new e(this.firstLineNumber,this.lines.map((t,r)=>A(t,this.firstLineNumber+r)))}lineAt(A){return this.lines[A-this.firstLineNumber]}prependSymbolAt(A,t){return this.mapLines((r,n)=>n===A?`${t} ${r}`:` ${r}`)}slice(A,t){let r=this.lines.slice(A-1,t).join(`
|
|
72
|
+
`&&r.shift(),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(A,1,t)};vr.prototype._pushBuffer=function(e,A,t){for(;this._lineBuffer.length>A;){let r=this._lineBuffer.shift();if((this._keepEmptyLines||r.length>0)&&!this.push(this._reencode(r,e))){let n=this;setImmediate(function(){n._pushBuffer(e,A,t)});return}}t()};vr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};vr.prototype._reencode=function(e,A){return this.encoding&&this.encoding!=A?Buffer.from(e,A).toString(this.encoding):this.encoding?e:Buffer.from(e,A)};function Ul(e,A){return Object.prototype.hasOwnProperty.call(e,A)}var Tl=(e,A)=>e.reduce((t,r)=>(t[A(r)]=r,t),{});function wn(e,A){let t={};for(let r of Object.keys(e))t[r]=A(e[r],r);return t}function Ml(e,A){if(e.length===0)return;let t=e[0];for(let r=1;r<e.length;r++)A(t,e[r])<0&&(t=e[r]);return t}function U(e,A){Object.defineProperty(e,"name",{value:A,configurable:!0})}var ef=new Set,ss=(e,A,...t)=>{ef.has(e)||(ef.add(e),xl(A,...t))};var z=class e extends Error{constructor(A,t,r){super(A),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=r,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};U(z,"PrismaClientInitializationError");var He=class extends Error{constructor(A,{code:t,clientVersion:r,meta:n,batchRequestIdx:i}){super(A),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=r,this.meta=n,Object.defineProperty(this,"batchRequestIdx",{value:i,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};U(He,"PrismaClientKnownRequestError");var JA=class extends Error{constructor(A,t){super(A),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};U(JA,"PrismaClientRustPanicError");var Me=class extends Error{constructor(A,{clientVersion:t,batchRequestIdx:r}){super(A),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:r,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};U(Me,"PrismaClientUnknownRequestError");var Xe=class extends Error{constructor(t,{clientVersion:r}){super(t);this.name="PrismaClientValidationError";this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};U(Xe,"PrismaClientValidationError");var Rn=9e15,ur=1e9,vl="0123456789abcdef",ha="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",da="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Pl={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Rn,maxE:Rn,crypto:!1},nf,Pt,T=!0,Ca="[DecimalError] ",lr=Ca+"Invalid argument: ",sf=Ca+"Precision limit exceeded",of=Ca+"crypto unavailable",af="[object Decimal]",ze=Math.floor,ve=Math.pow,VS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,qS=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,OS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,cf=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ZA=1e7,x=7,HS=9007199254740991,WS=ha.length-1,Gl=da.length-1,B={toStringTag:af};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),b(e)};B.ceil=function(){return b(new this.constructor(this),this.e+1,2)};B.clampedTo=B.clamp=function(e,A){var t,r=this,n=r.constructor;if(e=new n(e),A=new n(A),!e.s||!A.s)return new n(NaN);if(e.gt(A))throw Error(lr+A);return t=r.cmp(e),t<0?e:r.cmp(A)>0?A:new n(r)};B.comparedTo=B.cmp=function(e){var A,t,r,n,i=this,s=i.d,o=(e=new i.constructor(e)).d,a=i.s,c=e.s;if(!s||!o)return!a||!c?NaN:a!==c?a:s===o?0:!s^a<0?1:-1;if(!s[0]||!o[0])return s[0]?a:o[0]?-c:0;if(a!==c)return a;if(i.e!==e.e)return i.e>e.e^a<0?1:-1;for(r=s.length,n=o.length,A=0,t=r<n?r:n;A<t;++A)if(s[A]!==o[A])return s[A]>o[A]^a<0?1:-1;return r===n?0:r>n^a<0?1:-1};B.cosine=B.cos=function(){var e,A,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=_S(r,hf(r,t)),r.precision=e,r.rounding=A,b(Pt==2||Pt==3?t.neg():t,e,A,!0)):new r(1):new r(NaN)};B.cubeRoot=B.cbrt=function(){var e,A,t,r,n,i,s,o,a,c,g=this,l=g.constructor;if(!g.isFinite()||g.isZero())return new l(g);for(T=!1,i=g.s*ve(g.s*g,1/3),!i||Math.abs(i)==1/0?(t=We(g.d),e=g.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=ve(t,1/3),e=ze((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t),r.s=g.s):r=new l(i.toString()),s=(e=l.precision)+3;;)if(o=r,a=o.times(o).times(o),c=a.plus(g),r=ge(c.plus(g).times(o),c.plus(a),s+2,1),We(o.d).slice(0,s)===(t=We(r.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!n&&t=="4999"){if(!n&&(b(o,e+1,0),o.times(o).times(o).eq(g))){r=o;break}s+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(b(r,e+1,1),A=!r.times(r).times(r).eq(g));break}return T=!0,b(r,e,l.rounding,A)};B.decimalPlaces=B.dp=function(){var e,A=this.d,t=NaN;if(A){if(e=A.length-1,t=(e-ze(this.e/x))*x,e=A[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};B.dividedBy=B.div=function(e){return ge(this,new this.constructor(e))};B.dividedToIntegerBy=B.divToInt=function(e){var A=this,t=A.constructor;return b(ge(A,new t(e),0,1,1),t.precision,t.rounding)};B.equals=B.eq=function(e){return this.cmp(e)===0};B.floor=function(){return b(new this.constructor(this),this.e+1,3)};B.greaterThan=B.gt=function(e){return this.cmp(e)>0};B.greaterThanOrEqualTo=B.gte=function(e){var A=this.cmp(e);return A==1||A===0};B.hyperbolicCosine=B.cosh=function(){var e,A,t,r,n,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;t=s.precision,r=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<32?(e=Math.ceil(n/3),A=(1/Ia(4,e)).toString()):(e=16,A="2.3283064365386962890625e-10"),i=Dn(s,1,i.times(A),new s(1),!0);for(var a,c=e,g=new s(8);c--;)a=i.times(i),i=o.minus(a.times(g.minus(a.times(g))));return b(i,s.precision=t,s.rounding=r,!0)};B.hyperbolicSine=B.sinh=function(){var e,A,t,r,n=this,i=n.constructor;if(!n.isFinite()||n.isZero())return new i(n);if(A=i.precision,t=i.rounding,i.precision=A+Math.max(n.e,n.sd())+4,i.rounding=1,r=n.d.length,r<3)n=Dn(i,2,n,n,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,n=n.times(1/Ia(5,e)),n=Dn(i,2,n,n,!0);for(var s,o=new i(5),a=new i(16),c=new i(20);e--;)s=n.times(n),n=n.times(o.plus(s.times(a.times(s).plus(c))))}return i.precision=A,i.rounding=t,b(n,A,t,!0)};B.hyperbolicTangent=B.tanh=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+7,r.rounding=1,ge(t.sinh(),t.cosh(),r.precision=e,r.rounding=A)):new r(t.s)};B.inverseCosine=B.acos=function(){var e,A=this,t=A.constructor,r=A.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?A.isNeg()?KA(t,n,i):new t(0):new t(NaN):A.isZero()?KA(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,A=A.asin(),e=KA(t,n+4,i).times(.5),t.precision=n,t.rounding=i,e.minus(A))};B.inverseHyperbolicCosine=B.acosh=function(){var e,A,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,A=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,T=!1,t=t.times(t).minus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln()):new r(t)};B.inverseHyperbolicSine=B.asinh=function(){var e,A,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,T=!1,t=t.times(t).plus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln())};B.inverseHyperbolicTangent=B.atanh=function(){var e,A,t,r,n=this,i=n.constructor;return n.isFinite()?n.e>=0?new i(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=i.precision,A=i.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?b(new i(n),e,A,!0):(i.precision=t=r-n.e,n=ge(n.plus(1),new i(1).minus(n),t+e,1),i.precision=e+4,i.rounding=1,n=n.ln(),i.precision=e,i.rounding=A,n.times(.5))):new i(NaN)};B.inverseSine=B.asin=function(){var e,A,t,r,n=this,i=n.constructor;return n.isZero()?new i(n):(A=n.abs().cmp(1),t=i.precision,r=i.rounding,A!==-1?A===0?(e=KA(i,t+4,r).times(.5),e.s=n.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,n=n.div(new i(1).minus(n.times(n)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=r,n.times(2)))};B.inverseTangent=B.atan=function(){var e,A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding;if(c.isFinite()){if(c.isZero())return new g(c);if(c.abs().eq(1)&&l+4<=Gl)return s=KA(g,l+4,u).times(.25),s.s=c.s,s}else{if(!c.s)return new g(NaN);if(l+4<=Gl)return s=KA(g,l+4,u).times(.5),s.s=c.s,s}for(g.precision=o=l+10,g.rounding=1,t=Math.min(28,o/x+2|0),e=t;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(T=!1,A=Math.ceil(o/x),r=1,a=c.times(c),s=new g(c),n=c;e!==-1;)if(n=n.times(a),i=s.minus(n.div(r+=2)),n=n.times(a),s=i.plus(n.div(r+=2)),s.d[A]!==void 0)for(e=A;s.d[e]===i.d[e]&&e--;);return t&&(s=s.times(2<<t-1)),T=!0,b(s,g.precision=l,g.rounding=u,!0)};B.isFinite=function(){return!!this.d};B.isInteger=B.isInt=function(){return!!this.d&&ze(this.e/x)>this.d.length-2};B.isNaN=function(){return!this.s};B.isNegative=B.isNeg=function(){return this.s<0};B.isPositive=B.isPos=function(){return this.s>0};B.isZero=function(){return!!this.d&&this.d[0]===0};B.lessThan=B.lt=function(e){return this.cmp(e)<0};B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1};B.logarithm=B.log=function(e){var A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding,E=5;if(e==null)e=new g(10),A=!0;else{if(e=new g(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new g(NaN);A=e.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new g(t&&!t[0]?-1/0:c.s!=1?NaN:t?0:1/0);if(A)if(t.length>1)i=!0;else{for(n=t[0];n%10===0;)n/=10;i=n!==1}if(T=!1,o=l+E,s=gr(c,o),r=A?Qa(g,o+10):gr(e,o),a=ge(s,r,o,1),os(a.d,n=l,u))do if(o+=10,s=gr(c,o),r=A?Qa(g,o+10):gr(e,o),a=ge(s,r,o,1),!i){+We(a.d).slice(n+1,n+15)+1==1e14&&(a=b(a,l+1,0));break}while(os(a.d,n+=10,u));return T=!0,b(a,l,u)};B.minus=B.sub=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.constructor;if(e=new h(e),!E.d||!e.d)return!E.s||!e.s?e=new h(NaN):E.d?e.s=-e.s:e=new h(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,u=e.d,o=h.precision,a=h.rounding,!c[0]||!u[0]){if(u[0])e.s=-e.s;else if(c[0])e=new h(E);else return new h(a===3?-0:0);return T?b(e,o,a):e}if(t=ze(e.e/x),g=ze(E.e/x),c=c.slice(),i=g-t,i){for(l=i<0,l?(A=c,i=-i,s=u.length):(A=u,t=g,s=c.length),r=Math.max(Math.ceil(o/x),s)+2,i>r&&(i=r,A.length=1),A.reverse(),r=i;r--;)A.push(0);A.reverse()}else{for(r=c.length,s=u.length,l=r<s,l&&(s=r),r=0;r<s;r++)if(c[r]!=u[r]){l=c[r]<u[r];break}i=0}for(l&&(A=c,c=u,u=A,e.s=-e.s),s=c.length,r=u.length-s;r>0;--r)c[s++]=0;for(r=u.length;r>i;){if(c[--r]<u[r]){for(n=r;n&&c[--n]===0;)c[n]=ZA-1;--c[n],c[r]+=ZA}c[r]-=u[r]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--t;return c[0]?(e.d=c,e.e=fa(c,t),T?b(e,o,a):e):new h(a===3?-0:0)};B.modulo=B.mod=function(e){var A,t=this,r=t.constructor;return e=new r(e),!t.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||t.d&&!t.d[0]?b(new r(t),r.precision,r.rounding):(T=!1,r.modulo==9?(A=ge(t,e.abs(),0,3,1),A.s*=e.s):A=ge(t,e,0,r.modulo,1),A=A.times(e),T=!0,t.minus(A))};B.naturalExponential=B.exp=function(){return Jl(this)};B.naturalLogarithm=B.ln=function(){return gr(this)};B.negated=B.neg=function(){var e=new this.constructor(this);return e.s=-e.s,b(e)};B.plus=B.add=function(e){var A,t,r,n,i,s,o,a,c,g,l=this,u=l.constructor;if(e=new u(e),!l.d||!e.d)return!l.s||!e.s?e=new u(NaN):l.d||(e=new u(e.d||l.s===e.s?l:NaN)),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,g=e.d,o=u.precision,a=u.rounding,!c[0]||!g[0])return g[0]||(e=new u(l)),T?b(e,o,a):e;if(i=ze(l.e/x),r=ze(e.e/x),c=c.slice(),n=i-r,n){for(n<0?(t=c,n=-n,s=g.length):(t=g,r=i,s=c.length),i=Math.ceil(o/x),s=i>s?i+1:s+1,n>s&&(n=s,t.length=1),t.reverse();n--;)t.push(0);t.reverse()}for(s=c.length,n=g.length,s-n<0&&(n=s,t=g,g=c,c=t),A=0;n;)A=(c[--n]=c[n]+g[n]+A)/ZA|0,c[n]%=ZA;for(A&&(c.unshift(A),++r),s=c.length;c[--s]==0;)c.pop();return e.d=c,e.e=fa(c,r),T?b(e,o,a):e};B.precision=B.sd=function(e){var A,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(lr+e);return t.d?(A=gf(t.d),e&&t.e+1>A&&(A=t.e+1)):A=NaN,A};B.round=function(){var e=this,A=e.constructor;return b(new A(e),e.e+1,A.rounding)};B.sine=B.sin=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=KS(r,hf(r,t)),r.precision=e,r.rounding=A,b(Pt>2?t.neg():t,e,A,!0)):new r(NaN)};B.squareRoot=B.sqrt=function(){var e,A,t,r,n,i,s=this,o=s.d,a=s.e,c=s.s,g=s.constructor;if(c!==1||!o||!o[0])return new g(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,c=Math.sqrt(+s),c==0||c==1/0?(A=We(o),(A.length+a)%2==0&&(A+="0"),c=Math.sqrt(A),a=ze((a+1)/2)-(a<0||a%2),c==1/0?A="5e"+a:(A=c.toExponential(),A=A.slice(0,A.indexOf("e")+1)+a),r=new g(A)):r=new g(c.toString()),t=(a=g.precision)+3;;)if(i=r,r=i.plus(ge(s,i,t+2,1)).times(.5),We(i.d).slice(0,t)===(A=We(r.d)).slice(0,t))if(A=A.slice(t-3,t+1),A=="9999"||!n&&A=="4999"){if(!n&&(b(i,a+1,0),i.times(i).eq(s))){r=i;break}t+=4,n=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(b(r,a+1,1),e=!r.times(r).eq(s));break}return T=!0,b(r,a,g.rounding,e)};B.tangent=B.tan=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+10,r.rounding=1,t=t.sin(),t.s=1,t=ge(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=A,b(Pt==2||Pt==4?t.neg():t,e,A,!0)):new r(NaN)};B.times=B.mul=function(e){var A,t,r,n,i,s,o,a,c,g=this,l=g.constructor,u=g.d,E=(e=new l(e)).d;if(e.s*=g.s,!u||!u[0]||!E||!E[0])return new l(!e.s||u&&!u[0]&&!E||E&&!E[0]&&!u?NaN:!u||!E?e.s/0:e.s*0);for(t=ze(g.e/x)+ze(e.e/x),a=u.length,c=E.length,a<c&&(i=u,u=E,E=i,s=a,a=c,c=s),i=[],s=a+c,r=s;r--;)i.push(0);for(r=c;--r>=0;){for(A=0,n=a+r;n>r;)o=i[n]+E[r]*u[n-r-1]+A,i[n--]=o%ZA|0,A=o/ZA|0;i[n]=(i[n]+A)%ZA|0}for(;!i[--s];)i.pop();return A?++t:i.shift(),e.d=i,e.e=fa(i,t),T?b(e,l.precision,l.rounding):e};B.toBinary=function(e,A){return Vl(this,2,e,A)};B.toDecimalPlaces=B.toDP=function(e,A){var t=this,r=t.constructor;return t=new r(t),e===void 0?t:(hA(e,0,ur),A===void 0?A=r.rounding:hA(A,0,8),b(t,e+t.e+1,A))};B.toExponential=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,!0):(hA(e,0,ur),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e+1,A),t=lt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toFixed=function(e,A){var t,r,n=this,i=n.constructor;return e===void 0?t=lt(n):(hA(e,0,ur),A===void 0?A=i.rounding:hA(A,0,8),r=b(new i(n),e+n.e+1,A),t=lt(r,!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};B.toFraction=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.d,d=E.constructor;if(!h)return new d(E);if(c=t=new d(1),r=a=new d(0),A=new d(r),i=A.e=gf(h)-E.e-1,s=i%x,A.d[0]=ve(10,s<0?x+s:s),e==null)e=i>0?A:c;else{if(o=new d(e),!o.isInt()||o.lt(c))throw Error(lr+o);e=o.gt(A)?i>0?A:c:o}for(T=!1,o=new d(We(h)),g=d.precision,d.precision=i=h.length*x*2;l=ge(o,A,0,1,1),n=t.plus(l.times(r)),n.cmp(e)!=1;)t=r,r=n,n=c,c=a.plus(l.times(n)),a=n,n=A,A=o.minus(l.times(n)),o=n;return n=ge(e.minus(t),r,0,1,1),a=a.plus(n.times(c)),t=t.plus(n.times(r)),a.s=c.s=E.s,u=ge(c,r,i,1).minus(E).abs().cmp(ge(a,t,i,1).minus(E).abs())<1?[c,r]:[a,t],d.precision=g,T=!0,u};B.toHexadecimal=B.toHex=function(e,A){return Vl(this,16,e,A)};B.toNearest=function(e,A){var t=this,r=t.constructor;if(t=new r(t),e==null){if(!t.d)return t;e=new r(1),A=r.rounding}else{if(e=new r(e),A===void 0?A=r.rounding:hA(A,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(T=!1,t=ge(t,e,0,A,1).times(e),T=!0,b(t)):(e.s=t.s,t=e),t};B.toNumber=function(){return+this};B.toOctal=function(e,A){return Vl(this,8,e,A)};B.toPower=B.pow=function(e){var A,t,r,n,i,s,o=this,a=o.constructor,c=+(e=new a(e));if(!o.d||!e.d||!o.d[0]||!e.d[0])return new a(ve(+o,c));if(o=new a(o),o.eq(1))return o;if(r=a.precision,i=a.rounding,e.eq(1))return b(o,r,i);if(A=ze(e.e/x),A>=e.d.length-1&&(t=c<0?-c:c)<=HS)return n=lf(a,o,t,r),e.s<0?new a(1).div(n):b(n,r,i);if(s=o.s,s<0){if(A<e.d.length-1)return new a(NaN);if(e.d[A]&1||(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return t=ve(+o,c),A=t==0||!isFinite(t)?ze(c*(Math.log("0."+We(o.d))/Math.LN10+o.e+1)):new a(t+"").e,A>a.maxE+1||A<a.minE-1?new a(A>0?s/0:0):(T=!1,a.rounding=o.s=1,t=Math.min(12,(A+"").length),n=Jl(e.times(gr(o,r+t)),r),n.d&&(n=b(n,r+5,1),os(n.d,r,i)&&(A=r+10,n=b(Jl(e.times(gr(o,A+t)),A),A+5,1),+We(n.d).slice(r+1,r+15)+1==1e14&&(n=b(n,r+1,0)))),n.s=s,T=!0,a.rounding=i,b(n,r,i))};B.toPrecision=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(hA(e,1,ur),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e,A),t=lt(r,e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toSignificantDigits=B.toSD=function(e,A){var t=this,r=t.constructor;return e===void 0?(e=r.precision,A=r.rounding):(hA(e,1,ur),A===void 0?A=r.rounding:hA(A,0,8)),b(new r(t),e,A)};B.toString=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};B.truncated=B.trunc=function(){return b(new this.constructor(this),this.e+1,1)};B.valueOf=B.toJSON=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()?"-"+t:t};function We(e){var A,t,r,n=e.length-1,i="",s=e[0];if(n>0){for(i+=s,A=1;A<n;A++)r=e[A]+"",t=x-r.length,t&&(i+=cr(t)),i+=r;s=e[A],r=s+"",t=x-r.length,t&&(i+=cr(t))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}function hA(e,A,t){if(e!==~~e||e<A||e>t)throw Error(lr+e)}function os(e,A,t,r){var n,i,s,o;for(i=e[0];i>=10;i/=10)--A;return--A<0?(A+=x,n=0):(n=Math.ceil((A+1)/x),A%=x),i=ve(10,x-A),o=e[n]%i|0,r==null?A<3?(A==0?o=o/100|0:A==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==i||t>3&&o+1==i/2)&&(e[n+1]/i/100|0)==ve(10,A-2)-1||(o==i/2||o==0)&&(e[n+1]/i/100|0)==0:A<4?(A==0?o=o/1e3|0:A==1?o=o/100|0:A==2&&(o=o/10|0),s=(r||t<4)&&o==9999||!r&&t>3&&o==4999):s=((r||t<4)&&o+1==i||!r&&t>3&&o+1==i/2)&&(e[n+1]/i/1e3|0)==ve(10,A-3)-1,s}function Ea(e,A,t){for(var r,n=[0],i,s=0,o=e.length;s<o;){for(i=n.length;i--;)n[i]*=A;for(n[0]+=vl.indexOf(e.charAt(s++)),r=0;r<n.length;r++)n[r]>t-1&&(n[r+1]===void 0&&(n[r+1]=0),n[r+1]+=n[r]/t|0,n[r]%=t)}return n.reverse()}function _S(e,A){var t,r,n;if(A.isZero())return A;r=A.d.length,r<32?(t=Math.ceil(r/3),n=(1/Ia(4,t)).toString()):(t=16,n="2.3283064365386962890625e-10"),e.precision+=t,A=Dn(e,1,A.times(n),new e(1));for(var i=t;i--;){var s=A.times(A);A=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,A}var ge=function(){function e(r,n,i){var s,o=0,a=r.length;for(r=r.slice();a--;)s=r[a]*n+o,r[a]=s%i|0,o=s/i|0;return o&&r.unshift(o),r}function A(r,n,i,s){var o,a;if(i!=s)a=i>s?1:-1;else for(o=a=0;o<i;o++)if(r[o]!=n[o]){a=r[o]>n[o]?1:-1;break}return a}function t(r,n,i,s){for(var o=0;i--;)r[i]-=o,o=r[i]<n[i]?1:0,r[i]=o*s+r[i]-n[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,n,i,s,o,a){var c,g,l,u,E,h,d,C,I,p,w,m,K,H,ne,q,ae,De,ee,Y,ce=r.constructor,Ge=r.s==n.s?1:-1,fe=r.d,P=n.d;if(!fe||!fe[0]||!P||!P[0])return new ce(!r.s||!n.s||(fe?P&&fe[0]==P[0]:!P)?NaN:fe&&fe[0]==0||!P?Ge*0:Ge/0);for(a?(E=1,g=r.e-n.e):(a=ZA,E=x,g=ze(r.e/E)-ze(n.e/E)),ee=P.length,ae=fe.length,I=new ce(Ge),p=I.d=[],l=0;P[l]==(fe[l]||0);l++);if(P[l]>(fe[l]||0)&&g--,i==null?(H=i=ce.precision,s=ce.rounding):o?H=i+(r.e-n.e)+1:H=i,H<0)p.push(1),h=!0;else{if(H=H/E+2|0,l=0,ee==1){for(u=0,P=P[0],H++;(l<ae||u)&&H--;l++)ne=u*a+(fe[l]||0),p[l]=ne/P|0,u=ne%P|0;h=u||l<ae}else{for(u=a/(P[0]+1)|0,u>1&&(P=e(P,u,a),fe=e(fe,u,a),ee=P.length,ae=fe.length),q=ee,w=fe.slice(0,ee),m=w.length;m<ee;)w[m++]=0;Y=P.slice(),Y.unshift(0),De=P[0],P[1]>=a/2&&++De;do u=0,c=A(P,w,ee,m),c<0?(K=w[0],ee!=m&&(K=K*a+(w[1]||0)),u=K/De|0,u>1?(u>=a&&(u=a-1),d=e(P,u,a),C=d.length,m=w.length,c=A(d,w,C,m),c==1&&(u--,t(d,ee<C?Y:P,C,a))):(u==0&&(c=u=1),d=P.slice()),C=d.length,C<m&&d.unshift(0),t(w,d,m,a),c==-1&&(m=w.length,c=A(P,w,ee,m),c<1&&(u++,t(w,ee<m?Y:P,m,a))),m=w.length):c===0&&(u++,w=[0]),p[l++]=u,c&&w[0]?w[m++]=fe[q]||0:(w=[fe[q]],m=1);while((q++<ae||w[0]!==void 0)&&H--);h=w[0]!==void 0}p[0]||p.shift()}if(E==1)I.e=g,nf=h;else{for(l=1,u=p[0];u>=10;u/=10)l++;I.e=l+g*E-1,b(I,o?i+I.e+1:i,s,h)}return I}}();function b(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor;e:if(A!=null){if(l=e.d,!l)return e;for(n=1,o=l[0];o>=10;o/=10)n++;if(i=A-n,i<0)i+=x,s=A,g=l[u=0],a=g/ve(10,n-s-1)%10|0;else if(u=Math.ceil((i+1)/x),o=l.length,u>=o)if(r){for(;o++<=u;)l.push(0);g=a=0,n=1,i%=x,s=i-x+1}else break e;else{for(g=o=l[u],n=1;o>=10;o/=10)n++;i%=x,s=i-x+n,a=s<0?0:g/ve(10,n-s-1)%10|0}if(r=r||A<0||l[u+1]!==void 0||(s<0?g:g%ve(10,n-s-1)),c=t<4?(a||r)&&(t==0||t==(e.s<0?3:2)):a>5||a==5&&(t==4||r||t==6&&(i>0?s>0?g/ve(10,n-s):0:l[u-1])%10&1||t==(e.s<0?8:7)),A<1||!l[0])return l.length=0,c?(A-=e.e+1,l[0]=ve(10,(x-A%x)%x),e.e=-A||0):l[0]=e.e=0,e;if(i==0?(l.length=u,o=1,u--):(l.length=u+1,o=ve(10,x-i),l[u]=s>0?(g/ve(10,n-s)%ve(10,s)|0)*o:0),c)for(;;)if(u==0){for(i=1,s=l[0];s>=10;s/=10)i++;for(s=l[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(e.e++,l[0]==ZA&&(l[0]=1));break}else{if(l[u]+=o,l[u]!=ZA)break;l[u--]=0,o=1}for(i=l.length;l[--i]===0;)l.pop()}return T&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e<E.minE&&(e.e=0,e.d=[0])),e}function lt(e,A,t){if(!e.isFinite())return Ef(e);var r,n=e.e,i=We(e.d),s=i.length;return A?(t&&(r=t-s)>0?i=i.charAt(0)+"."+i.slice(1)+cr(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):n<0?(i="0."+cr(-n-1)+i,t&&(r=t-s)>0&&(i+=cr(r))):n>=s?(i+=cr(n+1-s),t&&(r=t-n-1)>0&&(i=i+"."+cr(r))):((r=n+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),t&&(r=t-s)>0&&(n+1===s&&(i+="."),i+=cr(r))),i}function fa(e,A){var t=e[0];for(A*=x;t>=10;t/=10)A++;return A}function Qa(e,A,t){if(A>WS)throw T=!0,t&&(e.precision=t),Error(sf);return b(new e(ha),A,1,!0)}function KA(e,A,t){if(A>Gl)throw Error(sf);return b(new e(da),A,t,!0)}function gf(e){var A=e.length-1,t=A*x+1;if(A=e[A],A){for(;A%10==0;A/=10)t--;for(A=e[0];A>=10;A/=10)t++}return t}function cr(e){for(var A="";e--;)A+="0";return A}function lf(e,A,t,r){var n,i=new e(1),s=Math.ceil(r/x+4);for(T=!1;;){if(t%2&&(i=i.times(A),tf(i.d,s)&&(n=!0)),t=ze(t/2),t===0){t=i.d.length-1,n&&i.d[t]===0&&++i.d[t];break}A=A.times(A),tf(A.d,s)}return T=!0,i}function Af(e){return e.d[e.d.length-1]&1}function uf(e,A,t){for(var r,n=new e(A[0]),i=0;++i<A.length;)if(r=new e(A[i]),r.s)n[t](r)&&(n=r);else{n=r;break}return n}function Jl(e,A){var t,r,n,i,s,o,a,c=0,g=0,l=0,u=e.constructor,E=u.rounding,h=u.precision;if(!e.d||!e.d[0]||e.e>17)return new u(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(A==null?(T=!1,a=h):a=A,o=new u(.03125);e.e>-2;)e=e.times(o),l+=5;for(r=Math.log(ve(2,l))/Math.LN10*2+5|0,a+=r,t=i=s=new u(1),u.precision=a;;){if(i=b(i.times(e),a,1),t=t.times(++g),o=s.plus(ge(i,t,a,1)),We(o.d).slice(0,a)===We(s.d).slice(0,a)){for(n=l;n--;)s=b(s.times(s),a,1);if(A==null)if(c<3&&os(s.d,a-r,E,c))u.precision=a+=10,t=i=o=new u(1),g=0,c++;else return b(s,u.precision=h,E,T=!0);else return u.precision=h,s}s=o}}function gr(e,A){var t,r,n,i,s,o,a,c,g,l,u,E=1,h=10,d=e,C=d.d,I=d.constructor,p=I.rounding,w=I.precision;if(d.s<0||!C||!C[0]||!d.e&&C[0]==1&&C.length==1)return new I(C&&!C[0]?-1/0:d.s!=1?NaN:C?0:d);if(A==null?(T=!1,g=w):g=A,I.precision=g+=h,t=We(C),r=t.charAt(0),Math.abs(i=d.e)<15e14){for(;r<7&&r!=1||r==1&&t.charAt(1)>3;)d=d.times(e),t=We(d.d),r=t.charAt(0),E++;i=d.e,r>1?(d=new I("0."+t),i++):d=new I(r+"."+t.slice(1))}else return c=Qa(I,g+2,w).times(i+""),d=gr(new I(r+"."+t.slice(1)),g-h).plus(c),I.precision=w,A==null?b(d,w,p,T=!0):d;for(l=d,a=s=d=ge(d.minus(1),d.plus(1),g,1),u=b(d.times(d),g,1),n=3;;){if(s=b(s.times(u),g,1),c=a.plus(ge(s,new I(n),g,1)),We(c.d).slice(0,g)===We(a.d).slice(0,g))if(a=a.times(2),i!==0&&(a=a.plus(Qa(I,g+2,w).times(i+""))),a=ge(a,new I(E),g,1),A==null)if(os(a.d,g-h,p,o))I.precision=g+=h,c=s=d=ge(l.minus(1),l.plus(1),g,1),u=b(d.times(d),g,1),n=o=1;else return b(a,I.precision=w,p,T=!0);else return I.precision=w,a;a=c,n+=2}}function Ef(e){return String(e.s*e.s/0)}function Yl(e,A){var t,r,n;for((t=A.indexOf("."))>-1&&(A=A.replace(".","")),(r=A.search(/e/i))>0?(t<0&&(t=r),t+=+A.slice(r+1),A=A.substring(0,r)):t<0&&(t=A.length),r=0;A.charCodeAt(r)===48;r++);for(n=A.length;A.charCodeAt(n-1)===48;--n);if(A=A.slice(r,n),A){if(n-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%x,t<0&&(r+=x),r<n){for(r&&e.d.push(+A.slice(0,r)),n-=x;r<n;)e.d.push(+A.slice(r,r+=x));A=A.slice(r),r=x-A.length}else r-=n;for(;r--;)A+="0";e.d.push(+A),T&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function jS(e,A){var t,r,n,i,s,o,a,c,g;if(A.indexOf("_")>-1){if(A=A.replace(/(\d)_(?=\d)/g,"$1"),cf.test(A))return Yl(e,A)}else if(A==="Infinity"||A==="NaN")return+A||(e.s=NaN),e.e=NaN,e.d=null,e;if(qS.test(A))t=16,A=A.toLowerCase();else if(VS.test(A))t=2;else if(OS.test(A))t=8;else throw Error(lr+A);for(i=A.search(/p/i),i>0?(a=+A.slice(i+1),A=A.substring(2,i)):A=A.slice(2),i=A.indexOf("."),s=i>=0,r=e.constructor,s&&(A=A.replace(".",""),o=A.length,i=o-i,n=lf(r,new r(t),i,i*2)),c=Ea(A,t,ZA),g=c.length-1,i=g;c[i]===0;--i)c.pop();return i<0?new r(e.s*0):(e.e=fa(c,g),e.d=c,T=!1,s&&(e=ge(e,n,o*4)),a&&(e=e.times(Math.abs(a)<54?ve(2,a):Pr.pow(2,a))),T=!0,e)}function KS(e,A){var t,r=A.d.length;if(r<3)return A.isZero()?A:Dn(e,2,A,A);t=1.4*Math.sqrt(r),t=t>16?16:t|0,A=A.times(1/Ia(5,t)),A=Dn(e,2,A,A);for(var n,i=new e(5),s=new e(16),o=new e(20);t--;)n=A.times(A),A=A.times(i.plus(n.times(s.times(n).minus(o))));return A}function Dn(e,A,t,r,n){var i,s,o,a,c=1,g=e.precision,l=Math.ceil(g/x);for(T=!1,a=t.times(t),o=new e(r);;){if(s=ge(o.times(a),new e(A++*A++),g,1),o=n?r.plus(s):r.minus(s),r=ge(s.times(a),new e(A++*A++),g,1),s=o.plus(r),s.d[l]!==void 0){for(i=l;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=r,r=s,s=i,c++}return T=!0,s.d.length=l+1,s}function Ia(e,A){for(var t=e;--A;)t*=e;return t}function hf(e,A){var t,r=A.s<0,n=KA(e,e.precision,1),i=n.times(.5);if(A=A.abs(),A.lte(i))return Pt=r?4:1,A;if(t=A.divToInt(n),t.isZero())Pt=r?3:2;else{if(A=A.minus(t.times(n)),A.lte(i))return Pt=Af(t)?r?2:3:r?4:1,A;Pt=Af(t)?r?1:4:r?3:2}return A.minus(n).abs()}function Vl(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor,h=t!==void 0;if(h?(hA(t,1,ur),r===void 0?r=E.rounding:hA(r,0,8)):(t=E.precision,r=E.rounding),!e.isFinite())g=Ef(e);else{for(g=lt(e),s=g.indexOf("."),h?(n=2,A==16?t=t*4-3:A==8&&(t=t*3-2)):n=A,s>=0&&(g=g.replace(".",""),u=new E(1),u.e=g.length-s,u.d=Ea(lt(u),10,n),u.e=u.d.length),l=Ea(g,10,n),i=a=l.length;l[--a]==0;)l.pop();if(!l[0])g=h?"0p+0":"0";else{if(s<0?i--:(e=new E(e),e.d=l,e.e=i,e=ge(e,u,t,r,0,n),l=e.d,i=e.e,c=nf),s=l[t],o=n/2,c=c||l[t+1]!==void 0,c=r<4?(s!==void 0||c)&&(r===0||r===(e.s<0?3:2)):s>o||s===o&&(r===4||c||r===6&&l[t-1]&1||r===(e.s<0?8:7)),l.length=t,c)for(;++l[--t]>n-1;)l[t]=0,t||(++i,l.unshift(1));for(a=l.length;!l[a-1];--a);for(s=0,g="";s<a;s++)g+=vl.charAt(l[s]);if(h){if(a>1)if(A==16||A==8){for(s=A==16?4:3,--a;a%s;a++)g+="0";for(l=Ea(g,n,A),a=l.length;!l[a-1];--a);for(s=1,g="1.";s<a;s++)g+=vl.charAt(l[s])}else g=g.charAt(0)+"."+g.slice(1);g=g+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)g="0"+g;g="0."+g}else if(++i>a)for(i-=a;i--;)g+="0";else i<a&&(g=g.slice(0,i)+"."+g.slice(i))}g=(A==16?"0x":A==2?"0b":A==8?"0o":"")+g}return e.s<0?"-"+g:g}function tf(e,A){if(e.length>A)return e.length=A,!0}function ZS(e){return new this(e).abs()}function XS(e){return new this(e).acos()}function zS(e){return new this(e).acosh()}function $S(e,A){return new this(e).plus(A)}function eF(e){return new this(e).asin()}function AF(e){return new this(e).asinh()}function tF(e){return new this(e).atan()}function rF(e){return new this(e).atanh()}function nF(e,A){e=new this(e),A=new this(A);var t,r=this.precision,n=this.rounding,i=r+4;return!e.s||!A.s?t=new this(NaN):!e.d&&!A.d?(t=KA(this,i,1).times(A.s>0?.25:.75),t.s=e.s):!A.d||e.isZero()?(t=A.s<0?KA(this,r,n):new this(0),t.s=e.s):!e.d||A.isZero()?(t=KA(this,i,1).times(.5),t.s=e.s):A.s<0?(this.precision=i,this.rounding=1,t=this.atan(ge(e,A,i,1)),A=KA(this,i,1),this.precision=r,this.rounding=n,t=e.s<0?t.minus(A):t.plus(A)):t=this.atan(ge(e,A,i,1)),t}function iF(e){return new this(e).cbrt()}function sF(e){return b(e=new this(e),e.e+1,2)}function oF(e,A,t){return new this(e).clamp(A,t)}function aF(e){if(!e||typeof e!="object")throw Error(Ca+"Object expected");var A,t,r,n=e.defaults===!0,i=["precision",1,ur,"rounding",0,8,"toExpNeg",-Rn,0,"toExpPos",0,Rn,"maxE",0,Rn,"minE",-Rn,0,"modulo",0,9];for(A=0;A<i.length;A+=3)if(t=i[A],n&&(this[t]=Pl[t]),(r=e[t])!==void 0)if(ze(r)===r&&r>=i[A+1]&&r<=i[A+2])this[t]=r;else throw Error(lr+t+": "+r);if(t="crypto",n&&(this[t]=Pl[t]),(r=e[t])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(of);else this[t]=!1;else throw Error(lr+t+": "+r);return this}function cF(e){return new this(e).cos()}function gF(e){return new this(e).cosh()}function df(e){var A,t,r;function n(i){var s,o,a,c=this;if(!(c instanceof n))return new n(i);if(c.constructor=n,rf(i)){c.s=i.s,T?!i.d||i.e>n.maxE?(c.e=NaN,c.d=null):i.e<n.minE?(c.e=0,c.d=[0]):(c.e=i.e,c.d=i.d.slice()):(c.e=i.e,c.d=i.d?i.d.slice():i.d);return}if(a=typeof i,a==="number"){if(i===0){c.s=1/i<0?-1:1,c.e=0,c.d=[0];return}if(i<0?(i=-i,c.s=-1):c.s=1,i===~~i&&i<1e7){for(s=0,o=i;o>=10;o/=10)s++;T?s>n.maxE?(c.e=NaN,c.d=null):s<n.minE?(c.e=0,c.d=[0]):(c.e=s,c.d=[i]):(c.e=s,c.d=[i]);return}else if(i*0!==0){i||(c.s=NaN),c.e=NaN,c.d=null;return}return Yl(c,i.toString())}else if(a!=="string")throw Error(lr+i);return(o=i.charCodeAt(0))===45?(i=i.slice(1),c.s=-1):(o===43&&(i=i.slice(1)),c.s=1),cf.test(i)?Yl(c,i):jS(c,i)}if(n.prototype=B,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.EUCLID=9,n.config=n.set=aF,n.clone=df,n.isDecimal=rf,n.abs=ZS,n.acos=XS,n.acosh=zS,n.add=$S,n.asin=eF,n.asinh=AF,n.atan=tF,n.atanh=rF,n.atan2=nF,n.cbrt=iF,n.ceil=sF,n.clamp=oF,n.cos=cF,n.cosh=gF,n.div=lF,n.exp=uF,n.floor=EF,n.hypot=hF,n.ln=dF,n.log=QF,n.log10=fF,n.log2=CF,n.max=IF,n.min=BF,n.mod=pF,n.mul=mF,n.pow=yF,n.random=wF,n.round=RF,n.sign=DF,n.sin=bF,n.sinh=kF,n.sqrt=SF,n.sub=FF,n.sum=NF,n.tan=xF,n.tanh=LF,n.trunc=UF,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],A=0;A<r.length;)e.hasOwnProperty(t=r[A++])||(e[t]=this[t]);return n.config(e),n}function lF(e,A){return new this(e).div(A)}function uF(e){return new this(e).exp()}function EF(e){return b(e=new this(e),e.e+1,3)}function hF(){var e,A,t=new this(0);for(T=!1,e=0;e<arguments.length;)if(A=new this(arguments[e++]),A.d)t.d&&(t=t.plus(A.times(A)));else{if(A.s)return T=!0,new this(1/0);t=A}return T=!0,t.sqrt()}function rf(e){return e instanceof Pr||e&&e.toStringTag===af||!1}function dF(e){return new this(e).ln()}function QF(e,A){return new this(e).log(A)}function CF(e){return new this(e).log(2)}function fF(e){return new this(e).log(10)}function IF(){return uf(this,arguments,"lt")}function BF(){return uf(this,arguments,"gt")}function pF(e,A){return new this(e).mod(A)}function mF(e,A){return new this(e).mul(A)}function yF(e,A){return new this(e).pow(A)}function wF(e){var A,t,r,n,i=0,s=new this(1),o=[];if(e===void 0?e=this.precision:hA(e,1,ur),r=Math.ceil(e/x),this.crypto)if(crypto.getRandomValues)for(A=crypto.getRandomValues(new Uint32Array(r));i<r;)n=A[i],n>=429e7?A[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=n%1e7;else if(crypto.randomBytes){for(A=crypto.randomBytes(r*=4);i<r;)n=A[i]+(A[i+1]<<8)+(A[i+2]<<16)+((A[i+3]&127)<<24),n>=214e7?crypto.randomBytes(4).copy(A,i):(o.push(n%1e7),i+=4);i=r/4}else throw Error(of);else for(;i<r;)o[i++]=Math.random()*1e7|0;for(r=o[--i],e%=x,r&&e&&(n=ve(10,x-e),o[i]=(r/n|0)*n);o[i]===0;i--)o.pop();if(i<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=x)o.shift();for(r=1,n=o[0];n>=10;n/=10)r++;r<x&&(t-=x-r)}return s.e=t,s.d=o,s}function RF(e){return b(e=new this(e),e.e+1,this.rounding)}function DF(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function bF(e){return new this(e).sin()}function kF(e){return new this(e).sinh()}function SF(e){return new this(e).sqrt()}function FF(e,A){return new this(e).sub(A)}function NF(){var e=0,A=arguments,t=new this(A[e]);for(T=!1;t.s&&++e<A.length;)t=t.plus(A[e]);return T=!0,b(t,this.precision,this.rounding)}function xF(e){return new this(e).tan()}function LF(e){return new this(e).tanh()}function UF(e){return b(e=new this(e),e.e+1,1)}B[Symbol.for("nodejs.util.inspect.custom")]=B.toString;B[Symbol.toStringTag]="Decimal";var Pr=B.constructor=df(Pl);ha=new Pr(ha);da=new Pr(da);var ut=Pr;function bn(e){return e===null?e:Array.isArray(e)?e.map(bn):typeof e=="object"?TF(e)?MF(e):wn(e,bn):e}function TF(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function MF({$type:e,value:A}){switch(e){case"BigInt":return BigInt(A);case"Bytes":{let{buffer:t,byteOffset:r,byteLength:n}=Buffer.from(A,"base64");return new Uint8Array(t,r,n)}case"DateTime":return new Date(A);case"Decimal":return new ut(A);case"Json":return JSON.parse(A);default:vt(A,"Unknown tagged value")}}function kn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Sn(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Ba(e){return e.toString()!=="Invalid Date"}function Fn(e){return Pr.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}var pf=Z(Sl());var Bf=Z(require("fs"));var Qf={keyword:Tt,entity:Tt,value:e=>Ye(Ut(e)),punctuation:Ut,directive:Tt,function:Tt,variable:e=>Ye(Ut(e)),string:e=>Ye(rr(e)),boolean:Lt,number:Tt,comment:Oi};var vF=e=>e,pa={},PF=0,v={manual:pa.Prism&&pa.Prism.manual,disableWorkerMessageHandler:pa.Prism&&pa.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof XA){let A=e;return new XA(A.type,v.util.encode(A.content),A.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++PF}),e.__id},clone:function e(A,t){let r,n,i=v.util.type(A);switch(t=t||{},i){case"Object":if(n=v.util.objId(A),t[n])return t[n];r={},t[n]=r;for(let s in A)A.hasOwnProperty(s)&&(r[s]=e(A[s],t));return r;case"Array":return n=v.util.objId(A),t[n]?t[n]:(r=[],t[n]=r,A.forEach(function(s,o){r[o]=e(s,t)}),r);default:return A}}},languages:{extend:function(e,A){let t=v.util.clone(v.languages[e]);for(let r in A)t[r]=A[r];return t},insertBefore:function(e,A,t,r){r=r||v.languages;let n=r[e],i={};for(let o in n)if(n.hasOwnProperty(o)){if(o==A)for(let a in t)t.hasOwnProperty(a)&&(i[a]=t[a]);t.hasOwnProperty(o)||(i[o]=n[o])}let s=r[e];return r[e]=i,v.languages.DFS(v.languages,function(o,a){a===s&&o!=e&&(this[o]=i)}),i},DFS:function e(A,t,r,n){n=n||{};let i=v.util.objId;for(let s in A)if(A.hasOwnProperty(s)){t.call(A,s,A[s],r||s);let o=A[s],a=v.util.type(o);a==="Object"&&!n[i(o)]?(n[i(o)]=!0,e(o,t,null,n)):a==="Array"&&!n[i(o)]&&(n[i(o)]=!0,e(o,t,s,n))}}},plugins:{},highlight:function(e,A,t){let r={code:e,grammar:A,language:t};return v.hooks.run("before-tokenize",r),r.tokens=v.tokenize(r.code,r.grammar),v.hooks.run("after-tokenize",r),XA.stringify(v.util.encode(r.tokens),r.language)},matchGrammar:function(e,A,t,r,n,i,s){for(let d in t){if(!t.hasOwnProperty(d)||!t[d])continue;if(d==s)return;let C=t[d];C=v.util.type(C)==="Array"?C:[C];for(let I=0;I<C.length;++I){let p=C[I],w=p.inside,m=!!p.lookbehind,K=!!p.greedy,H=0,ne=p.alias;if(K&&!p.pattern.global){let q=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,q+"g")}p=p.pattern||p;for(let q=r,ae=n;q<A.length;ae+=A[q].length,++q){let De=A[q];if(A.length>e.length)return;if(De instanceof XA)continue;if(K&&q!=A.length-1){p.lastIndex=ae;var l=p.exec(e);if(!l)break;var g=l.index+(m?l[1].length:0),u=l.index+l[0].length,o=q,a=ae;for(let P=A.length;o<P&&(a<u||!A[o].type&&!A[o-1].greedy);++o)a+=A[o].length,g>=a&&(++q,ae=a);if(A[q]instanceof XA)continue;c=o-q,De=e.slice(ae,a),l.index-=ae}else{p.lastIndex=0;var l=p.exec(De),c=1}if(!l){if(i)break;continue}m&&(H=l[1]?l[1].length:0);var g=l.index+H,l=l[0].slice(H),u=g+l.length,E=De.slice(0,g),h=De.slice(u);let ee=[q,c];E&&(++q,ae+=E.length,ee.push(E));let Y=new XA(d,w?v.tokenize(l,w):l,ne,l,K);if(ee.push(Y),h&&ee.push(h),Array.prototype.splice.apply(A,ee),c!=1&&v.matchGrammar(e,A,t,q,ae,!0,d),i)break}}}},tokenize:function(e,A){let t=[e],r=A.rest;if(r){for(let n in r)A[n]=r[n];delete A.rest}return v.matchGrammar(e,t,A,0,0,!1),t},hooks:{all:{},add:function(e,A){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(A)},run:function(e,A){let t=v.hooks.all[e];if(!(!t||!t.length))for(var r=0,n;n=t[r++];)n(A)}},Token:XA};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function XA(e,A,t,r,n){this.type=e,this.content=A,this.alias=t,this.length=(r||"").length|0,this.greedy=!!n}XA.stringify=function(e,A){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return XA.stringify(t,A)}).join(""):GF(e.type)(e.content)};function GF(e){return Qf[e]||vF}function Cf(e){return JF(e,v.languages.javascript)}function JF(e,A){return v.tokenize(e,A).map(r=>XA.stringify(r)).join("")}var ff=Z(HC());function If(e){return(0,ff.default)(e)}var ma=class e{static read(A){let t;try{t=Bf.default.readFileSync(A,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(A){let t=A.split(/\r?\n/);return new e(1,t)}constructor(A,t){this.firstLineNumber=A,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(A,t){if(A<this.firstLineNumber||A>this.lines.length+this.firstLineNumber)return this;let r=A-this.firstLineNumber,n=[...this.lines];return n[r]=t(n[r]),new e(this.firstLineNumber,n)}mapLines(A){return new e(this.firstLineNumber,this.lines.map((t,r)=>A(t,this.firstLineNumber+r)))}lineAt(A){return this.lines[A-this.firstLineNumber]}prependSymbolAt(A,t){return this.mapLines((r,n)=>n===A?`${t} ${r}`:` ${r}`)}slice(A,t){let r=this.lines.slice(A-1,t).join(`
|
|
73
73
|
`);return new e(A,If(r).split(`
|
|
74
74
|
`))}highlight(){let A=Cf(this.toString());return new e(this.firstLineNumber,A.split(`
|
|
75
75
|
`))}toString(){return this.lines.join(`
|
|
@@ -77,7 +77,7 @@ ${(0,_C.default)(LS(r),2)}
|
|
|
77
77
|
`)}function jF(e){let A=[e.fileName];return e.lineNumber&&A.push(String(e.lineNumber)),e.columnNumber&&A.push(String(e.columnNumber)),A.join(":")}function ya(e){let A=e.showColors?YF:VF,t;return t=OF(e,A),_F(t,A)}var kf=Z(ql());function Rf(e,A,t){let r=Df(e),n=KF(r),i=XF(n);i?wa(i,A,t):A.addErrorMessage(()=>"Unknown error")}function Df(e){return e.errors.flatMap(A=>A.kind==="Union"?Df(A):[A])}function KF(e){let A=new Map,t=[];for(let r of e){if(r.kind!=="InvalidArgumentType"){t.push(r);continue}let n=`${r.selectionPath.join(".")}:${r.argumentPath.join(".")}`,i=A.get(n);i?A.set(n,{...r,argument:{...r.argument,typeNames:ZF(i.argument.typeNames,r.argument.typeNames)}}):A.set(n,r)}return t.push(...A.values()),t}function ZF(e,A){return[...new Set(e.concat(A))]}function XF(e){return Ml(e,(A,t)=>{let r=yf(A),n=yf(t);return r!==n?r-n:wf(A)-wf(t)})}function yf(e){let A=0;return Array.isArray(e.selectionPath)&&(A+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(A+=e.argumentPath.length),A}function wf(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var RA=class{constructor(A,t){this.name=A;this.value=t;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(A){let{colors:{green:t}}=A.context;A.addMarginSymbol(t(this.isRequired?"+":"?")),A.write(t(this.name)),this.isRequired||A.write(t("?")),A.write(t(": ")),typeof this.value=="string"?A.write(t(this.value)):A.write(this.value)}};var Nn=class{constructor(A=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=A}write(A){return typeof A=="string"?this.currentLine+=A:A.write(this),this}writeJoined(A,t,r=(n,i)=>i.write(n)){let n=t.length-1;for(let i=0;i<t.length;i++)r(t[i],this),i!==n&&this.write(A);return this}writeLine(A){return this.write(A).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let A=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,A?.(),this}withIndent(A){return this.indent(),A(this),this.unindent(),this}afterNextNewline(A){return this.afterNextNewLineCallback=A,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(A){return this.marginSymbol=A,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
|
|
78
78
|
`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let A=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+A.slice(1):A}};var Ra=class{constructor(A){this.value=A}write(A){A.write(this.value)}markAsError(){this.value.markAsError()}};var Da=e=>e,ba={bold:Da,red:Da,green:Da,dim:Da,enabled:!1},bf={bold:Ye,red:vA,green:rr,dim:xr,enabled:!0},xn={write(e){e.writeLine(",")}};var Et=class{constructor(A){this.contents=A;this.isUnderlined=!1;this.color=A=>A}underline(){return this.isUnderlined=!0,this}setColor(A){return this.color=A,this}write(A){let t=A.getCurrentLineLength();A.write(this.color(this.contents)),this.isUnderlined&&A.afterNextNewline(()=>{A.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Er=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Ln=class extends Er{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new Ra(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Et("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xn,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Un=class e extends Er{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let s=i;for(let o of n){let a;if(s.value instanceof e?a=s.value.getField(o):s.value instanceof Ln&&(a=s.value.getField(Number(o))),!a)return;s=a}return s}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let s=n.value.getFieldValue(i);if(!s||!(s instanceof e))return;let o=s.getSelectionParent();if(!o)return;n=o}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Et("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xn,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var qe=class extends Er{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let r=new Et(this.text);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r)}asObject(){}};var as=class{constructor(){this.fields=[]}addField(A,t){return this.fields.push({write(r){let{green:n,dim:i}=r.context.colors;r.write(n(i(`${A}: ${t}`))).addMarginSymbol(n(i("+")))}}),this}write(A){let{colors:{green:t}}=A.context;A.writeLine(t("{")).withIndent(()=>{A.writeJoined(xn,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function wa(e,A,t){switch(e.kind){case"MutuallyExclusiveFields":$F(e,A);break;case"IncludeOnScalar":eN(e,A);break;case"EmptySelection":AN(e,A,t);break;case"UnknownSelectionField":iN(e,A);break;case"InvalidSelectionValue":sN(e,A);break;case"UnknownArgument":oN(e,A);break;case"UnknownInputField":aN(e,A);break;case"RequiredArgumentMissing":cN(e,A);break;case"InvalidArgumentType":gN(e,A);break;case"InvalidArgumentValue":lN(e,A);break;case"ValueTooLarge":uN(e,A);break;case"SomeFieldsMissing":EN(e,A);break;case"TooManyFieldsGiven":hN(e,A);break;case"Union":Rf(e,A,t);break;default:throw new Error("not implemented: "+e.kind)}}function $F(e,A){let t=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),A.addErrorMessage(r=>`Please ${r.bold("either")} use ${r.green(`\`${e.firstField}\``)} or ${r.green(`\`${e.secondField}\``)}, but ${r.red("not both")} at the same time.`)}function eN(e,A){let[t,r]=cs(e.selectionPath),n=e.outputType,i=A.arguments.getDeepSelectionParent(t)?.value;if(i&&(i.getField(r)?.markAsError(),n))for(let s of n.fields)s.isRelation&&i.addSuggestion(new RA(s.name,"true"));A.addErrorMessage(s=>{let o=`Invalid scalar field ${s.red(`\`${r}\``)} for ${s.bold("include")} statement`;return n?o+=` on model ${s.bold(n.name)}. ${gs(s)}`:o+=".",o+=`
|
|
79
79
|
Note that ${s.bold("include")} statements only accept relation fields.`,o})}function AN(e,A,t){let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){tN(e,A,n);return}if(r.hasField("select")){rN(e,A);return}}if(t?.[kn(e.outputType.name)]){nN(e,A);return}A.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function tN(e,A,t){t.removeAllFields();for(let r of e.outputType.fields)t.addSuggestion(new RA(r.name,"false"));A.addErrorMessage(r=>`The ${r.red("omit")} statement includes every field of the model ${r.bold(e.outputType.name)}. At least one field must be included in the result`)}function rN(e,A){let t=e.outputType,r=A.arguments.getDeepSelectionParent(e.selectionPath)?.value,n=r?.isEmpty()??!1;r&&(r.removeAllFields(),Nf(r,t)),A.addErrorMessage(i=>n?`The ${i.red("`select`")} statement for type ${i.bold(t.name)} must not be empty. ${gs(i)}`:`The ${i.red("`select`")} statement for type ${i.bold(t.name)} needs ${i.bold("at least one truthy value")}.`)}function nN(e,A){let t=new as;for(let n of e.outputType.fields)n.isRelation||t.addField(n.name,"false");let r=new RA("omit",t).makeRequired();if(e.selectionPath.length===0)A.arguments.addSuggestion(r);else{let[n,i]=cs(e.selectionPath),o=A.arguments.getDeepSelectionParent(n)?.value.asObject()?.getField(i);if(o){let a=o?.value.asObject()??new Un;a.addSuggestion(r),o.value=a}}A.addErrorMessage(n=>`The global ${n.red("omit")} configuration excludes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function iN(e,A){let t=xf(e.selectionPath,A);if(t.parentKind!=="unknown"){t.field.markAsError();let r=t.parent;switch(t.parentKind){case"select":Nf(r,e.outputType);break;case"include":dN(r,e.outputType);break;case"omit":QN(r,e.outputType);break}}A.addErrorMessage(r=>{let n=[`Unknown field ${r.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&n.push(`for ${r.bold(t.parentKind)} statement`),n.push(`on model ${r.bold(`\`${e.outputType.name}\``)}.`),n.push(gs(r)),n.join(" ")})}function sN(e,A){let t=xf(e.selectionPath,A);t.parentKind!=="unknown"&&t.field.value.markAsError(),A.addErrorMessage(r=>`Invalid value for selection field \`${r.red(t.fieldName)}\`: ${e.underlyingError}`)}function oN(e,A){let t=e.argumentPath[0],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(t)?.markAsError(),CN(r,e.arguments)),A.addErrorMessage(n=>Sf(n,t,e.arguments.map(i=>i.name)))}function aN(e,A){let[t,r]=cs(e.argumentPath),n=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){n.getDeepField(e.argumentPath)?.markAsError();let i=n.getDeepFieldValue(t)?.asObject();i&&Lf(i,e.inputType)}A.addErrorMessage(i=>Sf(i,r,e.inputType.fields.map(s=>s.name)))}function Sf(e,A,t){let r=[`Unknown argument \`${e.red(A)}\`.`],n=IN(A,t);return n&&r.push(`Did you mean \`${e.green(n)}\`?`),t.length>0&&r.push(gs(e)),r.join(" ")}function cN(e,A){let t;A.addErrorMessage(a=>t?.value instanceof qe&&t.value.text==="null"?`Argument \`${a.green(i)}\` must not be ${a.red("null")}.`:`Argument \`${a.green(i)}\` is missing.`);let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!r)return;let[n,i]=cs(e.argumentPath),s=new as,o=r.getDeepFieldValue(n)?.asObject();if(o)if(t=o.getField(i),t&&o.removeField(i),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let a of e.inputTypes[0].fields)s.addField(a.name,a.typeNames.join(" | "));o.addSuggestion(new RA(i,s).makeRequired())}else{let a=e.inputTypes.map(Ff).join(" | ");o.addSuggestion(new RA(i,a).makeRequired())}}function Ff(e){return e.kind==="list"?`${Ff(e.elementType)}[]`:e.name}function gN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=ka("or",e.argument.typeNames.map(s=>n.green(s)));return`Argument \`${n.bold(t)}\`: Invalid value provided. Expected ${i}, provided ${n.red(e.inferredType)}.`})}function lN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=[`Invalid value for argument \`${n.bold(t)}\``];if(e.underlyingError&&i.push(`: ${e.underlyingError}`),i.push("."),e.argument.typeNames.length>0){let s=ka("or",e.argument.typeNames.map(o=>n.green(o)));i.push(` Expected ${s}.`)}return i.join("")})}function uN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n;if(r){let s=r.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof qe&&(n=s.text)}A.addErrorMessage(i=>{let s=["Unable to fit value"];return n&&s.push(i.red(n)),s.push(`into a 64-bit signed integer for field \`${i.bold(t)}\``),s.join(" ")})}function EN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getDeepFieldValue(e.argumentPath)?.asObject();n&&Lf(n,e.inputType)}A.addErrorMessage(n=>{let i=[`Argument \`${n.bold(t)}\` of type ${n.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${n.green("at least one of")} ${ka("or",e.constraints.requiredFields.map(s=>`\`${n.bold(s)}\``))} arguments.`):i.push(`${n.green("at least one")} argument.`):i.push(`${n.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(gs(n)),i.join(" ")})}function hN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n=[];if(r){let i=r.getDeepFieldValue(e.argumentPath)?.asObject();i&&(i.markAsError(),n=Object.keys(i.getFields()))}A.addErrorMessage(i=>{let s=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${i.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${i.green("at most one")} argument,`):s.push(`${i.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${ka("and",n.map(o=>i.red(o)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Nf(e,A){for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,"true"))}function dN(e,A){for(let t of A.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new RA(t.name,"true"))}function QN(e,A){for(let t of A.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new RA(t.name,"true"))}function CN(e,A){for(let t of A)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function xf(e,A){let[t,r]=cs(e),n=A.arguments.getDeepSubSelectionValue(t)?.asObject();if(!n)return{parentKind:"unknown",fieldName:r};let i=n.getFieldValue("select")?.asObject(),s=n.getFieldValue("include")?.asObject(),o=n.getFieldValue("omit")?.asObject(),a=i?.getField(r);return i&&a?{parentKind:"select",parent:i,field:a,fieldName:r}:(a=s?.getField(r),s&&a?{parentKind:"include",field:a,parent:s,fieldName:r}:(a=o?.getField(r),o&&a?{parentKind:"omit",field:a,parent:o,fieldName:r}:{parentKind:"unknown",fieldName:r}))}function Lf(e,A){if(A.kind==="object")for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function cs(e){let A=[...e],t=A.pop();if(!t)throw new Error("unexpected empty path");return[A,t]}function gs({green:e,enabled:A}){return"Available options are "+(A?`listed in ${e("green")}`:"marked with ?")+"."}function ka(e,A){if(A.length===1)return A[0];let t=[...A],r=t.pop();return`${t.join(", ")} ${e} ${r}`}var fN=3;function IN(e,A){let t=1/0,r;for(let n of A){let i=(0,kf.default)(e,n);i>fN||i<t&&(t=i,r=n)}return r}function Uf(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var ls=class{constructor(A,t,r,n,i){this.modelName=A,this.name=t,this.typeName=r,this.isList=n,this.isEnum=i}_toGraphQLInputType(){let A=this.isList?"List":"",t=this.isEnum?"Enum":"";return`${A}${t}${this.typeName}FieldRefInput<${this.modelName}>`}};function Tn(e){return e instanceof ls}var Sa=Symbol(),Ol=new WeakMap,Gt=class{constructor(A){A===Sa?Ol.set(this,`Prisma.${this._getName()}`):Ol.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ol.get(this)}},us=class extends Gt{_getNamespace(){return"NullTypes"}},Es=class extends us{};Hl(Es,"DbNull");var hs=class extends us{};Hl(hs,"JsonNull");var ds=class extends us{};Hl(ds,"AnyNull");var Fa={classes:{DbNull:Es,JsonNull:hs,AnyNull:ds},instances:{DbNull:new Es(Sa),JsonNull:new hs(Sa),AnyNull:new ds(Sa)}};function Hl(e,A){Object.defineProperty(e,"name",{value:A,configurable:!0})}var Tf=": ",Na=class{constructor(A,t){this.name=A;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Tf.length}write(A){let t=new Et(this.name);this.hasError&&t.underline().setColor(A.context.colors.red),A.write(t).write(Tf).write(this.value)}};var Wl=class{constructor(A){this.errorMessages=[];this.arguments=A}write(A){A.write(this.arguments)}addErrorMessage(A){this.errorMessages.push(A)}renderAllMessages(A){return this.errorMessages.map(t=>t(A)).join(`
|
|
80
|
-
`)}};function Mn(e){return new Wl(Mf(e))}function Mf(e){let A=new Un;for(let[t,r]of Object.entries(e)){let n=new Na(t,vf(r));A.addField(n)}return A}function vf(e){if(typeof e=="string")return new qe(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new qe(String(e));if(typeof e=="bigint")return new qe(`${e}n`);if(e===null)return new qe("null");if(e===void 0)return new qe("undefined");if(Fn(e))return new qe(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new qe(`Buffer.alloc(${e.byteLength})`):new qe(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let A=Ba(e)?e.toISOString():"Invalid Date";return new qe(`new Date("${A}")`)}return e instanceof Gt?new qe(`Prisma.${e._getName()}`):Tn(e)?new qe(`prisma.${Uf(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?BN(e):typeof e=="object"?Mf(e):new qe(Object.prototype.toString.call(e))}function BN(e){let A=new Ln;for(let t of e)A.addItem(vf(t));return A}function xa(e,A){let t=A==="pretty"?bf:ba,r=e.renderAllMessages(t),n=new Nn(0,{colors:t}).write(e).toString();return{message:r,args:n}}function La({args:e,errors:A,errorFormat:t,callsite:r,originalMethod:n,clientVersion:i,globalOmit:s}){let o=Mn(e);for(let l of A)wa(l,o,s);let{message:a,args:c}=xa(o,t),g=ya({message:a,callsite:r,originalMethod:n,showColors:t==="pretty",callArguments:c});throw new Xe(g,{clientVersion:i})}var ht=class{constructor(){this._map=new Map}get(A){return this._map.get(A)?.value}set(A,t){this._map.set(A,{value:t})}getOrCreate(A,t){let r=this._map.get(A);if(r)return r.value;let n=t();return this.set(A,n),n}};function Qs(e){let A;return{get(){return A||(A={value:e()}),A.value}}}function dt(e){return e.replace(/^./,A=>A.toLowerCase())}function Gf(e,A,t){let r=dt(t);return!A.result||!(A.result.$allModels||A.result[r])?e:pN({...e,...Pf(A.name,e,A.result.$allModels),...Pf(A.name,e,A.result[r])})}function pN(e){let A=new ht,t=(r,n)=>A.getOrCreate(r,()=>n.has(r)?[r]:(n.add(r),e[r]?e[r].needs.flatMap(i=>t(i,n)):[r]));return wn(e,r=>({...r,needs:t(r.name,new Set)}))}function Pf(e,A,t){return t?wn(t,({needs:r,compute:n},i)=>({name:i,needs:r?Object.keys(r).filter(s=>r[s]):[],compute:mN(A,i,n)})):{}}function mN(e,A,t){let r=e?.[A]?.compute;return r?n=>t({...n,[A]:r(n)}):t}function Jf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(e[r.name])for(let n of r.needs)t[n]=!0;return t}function Yf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(!e[r.name])for(let n of r.needs)delete t[n];return t}var Ua=class{constructor(A,t){this.extension=A;this.previous=t;this.computedFieldsCache=new ht;this.modelExtensionsCache=new ht;this.queryCallbacksCache=new ht;this.clientExtensions=Qs(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Qs(()=>{let A=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?A.concat(t):A})}getAllComputedFields(A){return this.computedFieldsCache.getOrCreate(A,()=>Gf(this.previous?.getAllComputedFields(A),this.extension,A))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(A){return this.modelExtensionsCache.getOrCreate(A,()=>{let t=dt(A);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(A):{...this.previous?.getAllModelExtensions(A),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(A,t){return this.queryCallbacksCache.getOrCreate(`${A}:${t}`,()=>{let r=this.previous?.getAllQueryCallbacks(A,t)??[],n=[],i=this.extension.query;return!i||!(i[A]||i.$allModels||i[t]||i.$allOperations)?r:(i[A]!==void 0&&(i[A][t]!==void 0&&n.push(i[A][t]),i[A].$allOperations!==void 0&&n.push(i[A].$allOperations)),A!=="$none"&&i.$allModels!==void 0&&(i.$allModels[t]!==void 0&&n.push(i.$allModels[t]),i.$allModels.$allOperations!==void 0&&n.push(i.$allModels.$allOperations)),i[t]!==void 0&&n.push(i[t]),i.$allOperations!==void 0&&n.push(i.$allOperations),r.concat(n))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},vn=class e{constructor(A){this.head=A}static empty(){return new e}static single(A){return new e(new Ua(A))}isEmpty(){return this.head===void 0}append(A){return new e(new Ua(A,this.head))}getAllComputedFields(A){return this.head?.getAllComputedFields(A)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(A){return this.head?.getAllModelExtensions(A)}getAllQueryCallbacks(A,t){return this.head?.getAllQueryCallbacks(A,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Vf=Symbol(),Cs=class{constructor(A){if(A!==Vf)throw new Error("Skip instance can not be constructed directly")}ifUndefined(A){return A===void 0?Ta:A}},Ta=new Cs(Vf);function Qt(e){return e instanceof Cs}var yN={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},qf="explicitly `undefined` values are not allowed";function Ma({modelName:e,action:A,args:t,runtimeDataModel:r,extensions:n=vn.empty(),callsite:i,clientMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g}){let l=new _l({runtimeDataModel:r,modelName:e,action:A,rootArgs:t,callsite:i,extensions:n,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g});return{modelName:e,action:yN[A],query:fs(t,l)}}function fs({select:e,include:A,...t}={},r){let n;return r.isPreviewFeatureOn("omitApi")&&(n=t.omit,delete t.omit),{arguments:Hf(t,r),selection:wN(e,A,n,r)}}function wN(e,A,t,r){return e?(A?r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:r.getSelectionPath()}):t&&r.isPreviewFeatureOn("omitApi")&&r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:r.getSelectionPath()}),kN(e,r)):RN(r,A,t)}function RN(e,A,t){let r={};return e.modelOrType&&!e.isRawAction()&&(r.$composites=!0,r.$scalars=!0),A&&DN(r,A,e),e.isPreviewFeatureOn("omitApi")&&bN(r,t,e),r}function DN(e,A,t){for(let[r,n]of Object.entries(A)){if(Qt(n))continue;let i=t.nestSelection(r);if(jl(n,i),n===!1||n===void 0){e[r]=!1;continue}let s=t.findField(r);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(r),outputType:t.getOutputTypeDescription()}),s){e[r]=fs(n===!0?{}:n,i);continue}if(n===!0){e[r]=!0;continue}e[r]=fs(n,i)}}function bN(e,A,t){let r=t.getComputedFields(),n={...t.getGlobalOmit(),...A},i=Yf(n,r);for(let[s,o]of Object.entries(i)){if(Qt(o))continue;jl(o,t.nestSelection(s));let a=t.findField(s);r?.[s]&&!a||(e[s]=!o)}}function kN(e,A){let t={},r=A.getComputedFields(),n=Jf(e,r);for(let[i,s]of Object.entries(n)){if(Qt(s))continue;let o=A.nestSelection(i);jl(s,o);let a=A.findField(i);if(!(r?.[i]&&!a)){if(s===!1||s===void 0||Qt(s)){t[i]=!1;continue}if(s===!0){a?.kind==="object"?t[i]=fs({},o):t[i]=!0;continue}t[i]=fs(s,o)}}return t}function Of(e,A){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Sn(e)){if(Ba(e))return{$type:"DateTime",value:e.toISOString()};A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Tn(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return SN(e,A);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(FN(e))return e.values;if(Fn(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Gt){if(e!==Fa.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(NN(e))return e.toJSON();if(typeof e=="object")return Hf(e,A);A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Hf(e,A){if(e.$type)return{$type:"Raw",value:e};let t={};for(let r in e){let n=e[r],i=A.nestArgument(r);Qt(n)||(n!==void 0?t[r]=Of(n,i):A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidArgumentValue",argumentPath:i.getArgumentPath(),selectionPath:A.getSelectionPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:qf}))}return t}function SN(e,A){let t=[];for(let r=0;r<e.length;r++){let n=A.nestArgument(String(r)),i=e[r];if(i===void 0||Qt(i)){let s=i===void 0?"undefined":"Prisma.skip";A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:n.getSelectionPath(),argumentPath:n.getArgumentPath(),argument:{name:`${A.getArgumentName()}[${r}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}t.push(Of(i,n))}return t}function FN(e){return typeof e=="object"&&e!==null&&e.__prismaRawParameters__===!0}function NN(e){return typeof e=="object"&&e!==null&&typeof e.toJSON=="function"}function jl(e,A){e===void 0&&A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidSelectionValue",selectionPath:A.getSelectionPath(),underlyingError:qf})}var _l=class e{constructor(A){this.params=A;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}throwValidationError(A){La({errors:[A],originalMethod:this.params.originalMethod,args:this.params.rootArgs??{},callsite:this.params.callsite,errorFormat:this.params.errorFormat,clientVersion:this.params.clientVersion,globalOmit:this.params.globalOmit})}getSelectionPath(){return this.params.selectionPath}getArgumentPath(){return this.params.argumentPath}getArgumentName(){return this.params.argumentPath[this.params.argumentPath.length-1]}getOutputTypeDescription(){if(!(!this.params.modelName||!this.modelOrType))return{name:this.params.modelName,fields:this.modelOrType.fields.map(A=>({name:A.name,typeName:"boolean",isRelation:A.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(A){return this.params.previewFeatures.includes(A)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(A){return this.modelOrType?.fields.find(t=>t.name===A)}nestSelection(A){let t=this.findField(A),r=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:r,selectionPath:this.params.selectionPath.concat(A)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[kn(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:vt(this.params.action,"Unknown action")}}nestArgument(A){return new e({...this.params,argumentPath:this.params.argumentPath.concat(A)})}};var Pn=class{constructor(A){this._engine=A}prometheus(A){return this._engine.metrics({format:"prometheus",...A})}json(A){return this._engine.metrics({format:"json",...A})}};function Wf(e){return{models:Kl(e.models),enums:Kl(e.enums),types:Kl(e.types)}}function Kl(e){let A={};for(let{name:t,...r}of e)A[t]=r;return A}function _f(e,A){let t=Qs(()=>xN(A));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function xN(e){return{datamodel:{models:Zl(e.models),enums:Zl(e.enums),types:Zl(e.types)}}}function Zl(e){return Object.entries(e).map(([A,t])=>({name:A,...t}))}var Xl=new WeakMap,va="$$PrismaTypedSql",zl=class{constructor(A,t){Xl.set(this,{sql:A,values:t}),Object.defineProperty(this,va,{value:va})}get sql(){return Xl.get(this).sql}get values(){return Xl.get(this).values}};function jf(e){return(...A)=>new zl(e,A)}function Kf(e){return e!=null&&e[va]===va}function Is(e){return{ok:!1,error:e,map(){return Is(e)},flatMap(){return Is(e)}}}var $l=class{constructor(){this.registeredErrors=[]}consumeError(A){return this.registeredErrors[A]}registerNewError(A){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:A},t}},eu=e=>{let A=new $l,t=Ct(A,e.transactionContext.bind(e)),r={adapterName:e.adapterName,errorRegistry:A,queryRaw:Ct(A,e.queryRaw.bind(e)),executeRaw:Ct(A,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...n)=>(await t(...n)).map(s=>LN(A,s))};return e.getConnectionInfo&&(r.getConnectionInfo=TN(A,e.getConnectionInfo.bind(e))),r},LN=(e,A)=>{let t=Ct(e,A.startTransaction.bind(A));return{adapterName:A.adapterName,provider:A.provider,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),startTransaction:async(...r)=>(await t(...r)).map(i=>UN(e,i))}},UN=(e,A)=>({adapterName:A.adapterName,provider:A.provider,options:A.options,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),commit:Ct(e,A.commit.bind(A)),rollback:Ct(e,A.rollback.bind(A))});function Ct(e,A){return async(...t)=>{try{return await A(...t)}catch(r){let n=e.registerNewError(r);return Is({kind:"GenericJs",id:n})}}}function TN(e,A){return(...t)=>{try{return A(...t)}catch(r){let n=e.registerNewError(r);return Is({kind:"GenericJs",id:n})}}}var fD=Z(pl());var ID=require("async_hooks"),BD=require("events"),pD=Z(require("fs")),xo=Z(require("path"));var dA=class e{constructor(A,t){if(A.length-1!==t.length)throw A.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${A.length} strings to have ${A.length-1} values`);let r=t.reduce((s,o)=>s+(o instanceof e?o.values.length:1),0);this.values=new Array(r),this.strings=new Array(r+1),this.strings[0]=A[0];let n=0,i=0;for(;n<t.length;){let s=t[n++],o=A[n];if(s instanceof e){this.strings[i]+=s.strings[0];let a=0;for(;a<s.values.length;)this.values[i++]=s.values[a++],this.strings[i]=s.strings[a];this.strings[i]+=o}else this.values[i++]=s,this.strings[i]=o}}get sql(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`?${this.strings[t++]}`;return r}get statement(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`:${t}${this.strings[t++]}`;return r}get text(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`$${t}${this.strings[t++]}`;return r}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Zf(e,A=",",t="",r=""){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 dA([t,...Array(e.length-1).fill(A),r],e)}function Au(e){return new dA([e],[])}var Xf=Au("");function tu(e,...A){return new dA(e,A)}function Bs(e){return{getKeys(){return Object.keys(e)},getPropertyValue(A){return e[A]}}}function nA(e,A){return{getKeys(){return[e]},getPropertyValue(){return A()}}}function Gr(e){let A=new ht;return{getKeys(){return e.getKeys()},getPropertyValue(t){return A.getOrCreate(t,()=>e.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Pa={enumerable:!0,configurable:!0,writable:!0};function Ga(e){let A=new Set(e);return{getOwnPropertyDescriptor:()=>Pa,has:(t,r)=>A.has(r),set:(t,r,n)=>A.add(r)&&Reflect.set(t,r,n),ownKeys:()=>[...A]}}var zf=Symbol.for("nodejs.util.inspect.custom");function ft(e,A){let t=MN(A),r=new Set,n=new Proxy(e,{get(i,s){if(r.has(s))return i[s];let o=t.get(s);return o?o.getPropertyValue(s):i[s]},has(i,s){if(r.has(s))return!0;let o=t.get(s);return o?o.has?.(s)??!0:Reflect.has(i,s)},ownKeys(i){let s=$f(Reflect.ownKeys(i),t),o=$f(Array.from(t.keys()),t);return[...new Set([...s,...o,...r])]},set(i,s,o){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(r.add(s),Reflect.set(i,s,o))},getOwnPropertyDescriptor(i,s){let o=Reflect.getOwnPropertyDescriptor(i,s);if(o&&!o.configurable)return o;let a=t.get(s);return a?a.getPropertyDescriptor?{...Pa,...a?.getPropertyDescriptor(s)}:Pa:o},defineProperty(i,s,o){return r.add(s),Reflect.defineProperty(i,s,o)}});return n[zf]=function(){let i={...this};return delete i[zf],i},n}function MN(e){let A=new Map;for(let t of e){let r=t.getKeys();for(let n of r)A.set(n,t)}return A}function $f(e,A){return e.filter(t=>A.get(t)?.has?.(t)??!0)}function Gn(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Jn(e,A){return{batch:e,transaction:A?.kind==="batch"?{isolationLevel:A.options.isolationLevel}:void 0}}function eI(e){if(e===void 0)return"";let A=Mn(e);return new Nn(0,{colors:ba}).write(A).toString()}var vN="P2037";function hr({error:e,user_facing_error:A},t,r){return A.error_code?new He(PN(A,r),{code:A.error_code,clientVersion:t,meta:A.meta,batchRequestIdx:A.batch_request_idx}):new Me(e,{clientVersion:t,batchRequestIdx:A.batch_request_idx})}function PN(e,A){let t=e.message;return(A==="postgresql"||A==="postgres"||A==="mysql")&&e.error_code===vN&&(t+=`
|
|
80
|
+
`)}};function Mn(e){return new Wl(Mf(e))}function Mf(e){let A=new Un;for(let[t,r]of Object.entries(e)){let n=new Na(t,vf(r));A.addField(n)}return A}function vf(e){if(typeof e=="string")return new qe(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new qe(String(e));if(typeof e=="bigint")return new qe(`${e}n`);if(e===null)return new qe("null");if(e===void 0)return new qe("undefined");if(Fn(e))return new qe(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new qe(`Buffer.alloc(${e.byteLength})`):new qe(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let A=Ba(e)?e.toISOString():"Invalid Date";return new qe(`new Date("${A}")`)}return e instanceof Gt?new qe(`Prisma.${e._getName()}`):Tn(e)?new qe(`prisma.${Uf(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?BN(e):typeof e=="object"?Mf(e):new qe(Object.prototype.toString.call(e))}function BN(e){let A=new Ln;for(let t of e)A.addItem(vf(t));return A}function xa(e,A){let t=A==="pretty"?bf:ba,r=e.renderAllMessages(t),n=new Nn(0,{colors:t}).write(e).toString();return{message:r,args:n}}function La({args:e,errors:A,errorFormat:t,callsite:r,originalMethod:n,clientVersion:i,globalOmit:s}){let o=Mn(e);for(let l of A)wa(l,o,s);let{message:a,args:c}=xa(o,t),g=ya({message:a,callsite:r,originalMethod:n,showColors:t==="pretty",callArguments:c});throw new Xe(g,{clientVersion:i})}var ht=class{constructor(){this._map=new Map}get(A){return this._map.get(A)?.value}set(A,t){this._map.set(A,{value:t})}getOrCreate(A,t){let r=this._map.get(A);if(r)return r.value;let n=t();return this.set(A,n),n}};function Qs(e){let A;return{get(){return A||(A={value:e()}),A.value}}}function dt(e){return e.replace(/^./,A=>A.toLowerCase())}function Gf(e,A,t){let r=dt(t);return!A.result||!(A.result.$allModels||A.result[r])?e:pN({...e,...Pf(A.name,e,A.result.$allModels),...Pf(A.name,e,A.result[r])})}function pN(e){let A=new ht,t=(r,n)=>A.getOrCreate(r,()=>n.has(r)?[r]:(n.add(r),e[r]?e[r].needs.flatMap(i=>t(i,n)):[r]));return wn(e,r=>({...r,needs:t(r.name,new Set)}))}function Pf(e,A,t){return t?wn(t,({needs:r,compute:n},i)=>({name:i,needs:r?Object.keys(r).filter(s=>r[s]):[],compute:mN(A,i,n)})):{}}function mN(e,A,t){let r=e?.[A]?.compute;return r?n=>t({...n,[A]:r(n)}):t}function Jf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(e[r.name])for(let n of r.needs)t[n]=!0;return t}function Yf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(!e[r.name])for(let n of r.needs)delete t[n];return t}var Ua=class{constructor(A,t){this.extension=A;this.previous=t;this.computedFieldsCache=new ht;this.modelExtensionsCache=new ht;this.queryCallbacksCache=new ht;this.clientExtensions=Qs(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Qs(()=>{let A=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?A.concat(t):A})}getAllComputedFields(A){return this.computedFieldsCache.getOrCreate(A,()=>Gf(this.previous?.getAllComputedFields(A),this.extension,A))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(A){return this.modelExtensionsCache.getOrCreate(A,()=>{let t=dt(A);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(A):{...this.previous?.getAllModelExtensions(A),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(A,t){return this.queryCallbacksCache.getOrCreate(`${A}:${t}`,()=>{let r=this.previous?.getAllQueryCallbacks(A,t)??[],n=[],i=this.extension.query;return!i||!(i[A]||i.$allModels||i[t]||i.$allOperations)?r:(i[A]!==void 0&&(i[A][t]!==void 0&&n.push(i[A][t]),i[A].$allOperations!==void 0&&n.push(i[A].$allOperations)),A!=="$none"&&i.$allModels!==void 0&&(i.$allModels[t]!==void 0&&n.push(i.$allModels[t]),i.$allModels.$allOperations!==void 0&&n.push(i.$allModels.$allOperations)),i[t]!==void 0&&n.push(i[t]),i.$allOperations!==void 0&&n.push(i.$allOperations),r.concat(n))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},vn=class e{constructor(A){this.head=A}static empty(){return new e}static single(A){return new e(new Ua(A))}isEmpty(){return this.head===void 0}append(A){return new e(new Ua(A,this.head))}getAllComputedFields(A){return this.head?.getAllComputedFields(A)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(A){return this.head?.getAllModelExtensions(A)}getAllQueryCallbacks(A,t){return this.head?.getAllQueryCallbacks(A,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Vf=Symbol(),Cs=class{constructor(A){if(A!==Vf)throw new Error("Skip instance can not be constructed directly")}ifUndefined(A){return A===void 0?Ta:A}},Ta=new Cs(Vf);function Qt(e){return e instanceof Cs}var yN={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},qf="explicitly `undefined` values are not allowed";function Ma({modelName:e,action:A,args:t,runtimeDataModel:r,extensions:n=vn.empty(),callsite:i,clientMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g}){let l=new _l({runtimeDataModel:r,modelName:e,action:A,rootArgs:t,callsite:i,extensions:n,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g});return{modelName:e,action:yN[A],query:fs(t,l)}}function fs({select:e,include:A,...t}={},r){let n;return r.isPreviewFeatureOn("omitApi")&&(n=t.omit,delete t.omit),{arguments:Hf(t,r),selection:wN(e,A,n,r)}}function wN(e,A,t,r){return e?(A?r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:r.getSelectionPath()}):t&&r.isPreviewFeatureOn("omitApi")&&r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:r.getSelectionPath()}),kN(e,r)):RN(r,A,t)}function RN(e,A,t){let r={};return e.modelOrType&&!e.isRawAction()&&(r.$composites=!0,r.$scalars=!0),A&&DN(r,A,e),e.isPreviewFeatureOn("omitApi")&&bN(r,t,e),r}function DN(e,A,t){for(let[r,n]of Object.entries(A)){if(Qt(n))continue;let i=t.nestSelection(r);if(jl(n,i),n===!1||n===void 0){e[r]=!1;continue}let s=t.findField(r);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(r),outputType:t.getOutputTypeDescription()}),s){e[r]=fs(n===!0?{}:n,i);continue}if(n===!0){e[r]=!0;continue}e[r]=fs(n,i)}}function bN(e,A,t){let r=t.getComputedFields(),n={...t.getGlobalOmit(),...A},i=Yf(n,r);for(let[s,o]of Object.entries(i)){if(Qt(o))continue;jl(o,t.nestSelection(s));let a=t.findField(s);r?.[s]&&!a||(e[s]=!o)}}function kN(e,A){let t={},r=A.getComputedFields(),n=Jf(e,r);for(let[i,s]of Object.entries(n)){if(Qt(s))continue;let o=A.nestSelection(i);jl(s,o);let a=A.findField(i);if(!(r?.[i]&&!a)){if(s===!1||s===void 0||Qt(s)){t[i]=!1;continue}if(s===!0){a?.kind==="object"?t[i]=fs({},o):t[i]=!0;continue}t[i]=fs(s,o)}}return t}function Of(e,A){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Sn(e)){if(Ba(e))return{$type:"DateTime",value:e.toISOString()};A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Tn(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return SN(e,A);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return{$type:"Bytes",value:Buffer.from(t,r,n).toString("base64")}}if(FN(e))return e.values;if(Fn(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Gt){if(e!==Fa.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(NN(e))return e.toJSON();if(typeof e=="object")return Hf(e,A);A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Hf(e,A){if(e.$type)return{$type:"Raw",value:e};let t={};for(let r in e){let n=e[r],i=A.nestArgument(r);Qt(n)||(n!==void 0?t[r]=Of(n,i):A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidArgumentValue",argumentPath:i.getArgumentPath(),selectionPath:A.getSelectionPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:qf}))}return t}function SN(e,A){let t=[];for(let r=0;r<e.length;r++){let n=A.nestArgument(String(r)),i=e[r];if(i===void 0||Qt(i)){let s=i===void 0?"undefined":"Prisma.skip";A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:n.getSelectionPath(),argumentPath:n.getArgumentPath(),argument:{name:`${A.getArgumentName()}[${r}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}t.push(Of(i,n))}return t}function FN(e){return typeof e=="object"&&e!==null&&e.__prismaRawParameters__===!0}function NN(e){return typeof e=="object"&&e!==null&&typeof e.toJSON=="function"}function jl(e,A){e===void 0&&A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidSelectionValue",selectionPath:A.getSelectionPath(),underlyingError:qf})}var _l=class e{constructor(A){this.params=A;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}throwValidationError(A){La({errors:[A],originalMethod:this.params.originalMethod,args:this.params.rootArgs??{},callsite:this.params.callsite,errorFormat:this.params.errorFormat,clientVersion:this.params.clientVersion,globalOmit:this.params.globalOmit})}getSelectionPath(){return this.params.selectionPath}getArgumentPath(){return this.params.argumentPath}getArgumentName(){return this.params.argumentPath[this.params.argumentPath.length-1]}getOutputTypeDescription(){if(!(!this.params.modelName||!this.modelOrType))return{name:this.params.modelName,fields:this.modelOrType.fields.map(A=>({name:A.name,typeName:"boolean",isRelation:A.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(A){return this.params.previewFeatures.includes(A)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(A){return this.modelOrType?.fields.find(t=>t.name===A)}nestSelection(A){let t=this.findField(A),r=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:r,selectionPath:this.params.selectionPath.concat(A)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[kn(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:vt(this.params.action,"Unknown action")}}nestArgument(A){return new e({...this.params,argumentPath:this.params.argumentPath.concat(A)})}};var Pn=class{constructor(A){this._engine=A}prometheus(A){return this._engine.metrics({format:"prometheus",...A})}json(A){return this._engine.metrics({format:"json",...A})}};function Wf(e){return{models:Kl(e.models),enums:Kl(e.enums),types:Kl(e.types)}}function Kl(e){let A={};for(let{name:t,...r}of e)A[t]=r;return A}function _f(e,A){let t=Qs(()=>xN(A));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function xN(e){return{datamodel:{models:Zl(e.models),enums:Zl(e.enums),types:Zl(e.types)}}}function Zl(e){return Object.entries(e).map(([A,t])=>({name:A,...t}))}var Xl=new WeakMap,va="$$PrismaTypedSql",zl=class{constructor(A,t){Xl.set(this,{sql:A,values:t}),Object.defineProperty(this,va,{value:va})}get sql(){return Xl.get(this).sql}get values(){return Xl.get(this).values}};function jf(e){return(...A)=>new zl(e,A)}function Kf(e){return e!=null&&e[va]===va}function Is(e){return{ok:!1,error:e,map(){return Is(e)},flatMap(){return Is(e)}}}var $l=class{constructor(){this.registeredErrors=[]}consumeError(A){return this.registeredErrors[A]}registerNewError(A){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:A},t}},eu=e=>{let A=new $l,t=Ct(A,e.transactionContext.bind(e)),r={adapterName:e.adapterName,errorRegistry:A,queryRaw:Ct(A,e.queryRaw.bind(e)),executeRaw:Ct(A,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...n)=>(await t(...n)).map(s=>LN(A,s))};return e.getConnectionInfo&&(r.getConnectionInfo=TN(A,e.getConnectionInfo.bind(e))),r},LN=(e,A)=>{let t=Ct(e,A.startTransaction.bind(A));return{adapterName:A.adapterName,provider:A.provider,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),startTransaction:async(...r)=>(await t(...r)).map(i=>UN(e,i))}},UN=(e,A)=>({adapterName:A.adapterName,provider:A.provider,options:A.options,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),commit:Ct(e,A.commit.bind(A)),rollback:Ct(e,A.rollback.bind(A))});function Ct(e,A){return async(...t)=>{try{return await A(...t)}catch(r){let n=e.registerNewError(r);return Is({kind:"GenericJs",id:n})}}}function TN(e,A){return(...t)=>{try{return A(...t)}catch(r){let n=e.registerNewError(r);return Is({kind:"GenericJs",id:n})}}}var fD=Z(pl());var ID=require("async_hooks"),BD=require("events"),pD=Z(require("fs")),xo=Z(require("path"));var dA=class e{constructor(A,t){if(A.length-1!==t.length)throw A.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${A.length} strings to have ${A.length-1} values`);let r=t.reduce((s,o)=>s+(o instanceof e?o.values.length:1),0);this.values=new Array(r),this.strings=new Array(r+1),this.strings[0]=A[0];let n=0,i=0;for(;n<t.length;){let s=t[n++],o=A[n];if(s instanceof e){this.strings[i]+=s.strings[0];let a=0;for(;a<s.values.length;)this.values[i++]=s.values[a++],this.strings[i]=s.strings[a];this.strings[i]+=o}else this.values[i++]=s,this.strings[i]=o}}get sql(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`?${this.strings[t++]}`;return r}get statement(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`:${t}${this.strings[t++]}`;return r}get text(){let A=this.strings.length,t=1,r=this.strings[0];for(;t<A;)r+=`$${t}${this.strings[t++]}`;return r}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Zf(e,A=",",t="",r=""){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 dA([t,...Array(e.length-1).fill(A),r],e)}function Au(e){return new dA([e],[])}var Xf=Au("");function tu(e,...A){return new dA(e,A)}function Bs(e){return{getKeys(){return Object.keys(e)},getPropertyValue(A){return e[A]}}}function nA(e,A){return{getKeys(){return[e]},getPropertyValue(){return A()}}}function Gr(e){let A=new ht;return{getKeys(){return e.getKeys()},getPropertyValue(t){return A.getOrCreate(t,()=>e.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Pa={enumerable:!0,configurable:!0,writable:!0};function Ga(e){let A=new Set(e);return{getOwnPropertyDescriptor:()=>Pa,has:(t,r)=>A.has(r),set:(t,r,n)=>A.add(r)&&Reflect.set(t,r,n),ownKeys:()=>[...A]}}var zf=Symbol.for("nodejs.util.inspect.custom");function ft(e,A){let t=MN(A),r=new Set,n=new Proxy(e,{get(i,s){if(r.has(s))return i[s];let o=t.get(s);return o?o.getPropertyValue(s):i[s]},has(i,s){if(r.has(s))return!0;let o=t.get(s);return o?o.has?.(s)??!0:Reflect.has(i,s)},ownKeys(i){let s=$f(Reflect.ownKeys(i),t),o=$f(Array.from(t.keys()),t);return[...new Set([...s,...o,...r])]},set(i,s,o){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(r.add(s),Reflect.set(i,s,o))},getOwnPropertyDescriptor(i,s){let o=Reflect.getOwnPropertyDescriptor(i,s);if(o&&!o.configurable)return o;let a=t.get(s);return a?a.getPropertyDescriptor?{...Pa,...a?.getPropertyDescriptor(s)}:Pa:o},defineProperty(i,s,o){return r.add(s),Reflect.defineProperty(i,s,o)}});return n[zf]=function(){let i={...this};return delete i[zf],i},n}function MN(e){let A=new Map;for(let t of e){let r=t.getKeys();for(let n of r)A.set(n,t)}return A}function $f(e,A){return e.filter(t=>A.get(t)?.has?.(t)??!0)}function Gn(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Jn(e,A){return{batch:e,transaction:A?.kind==="batch"?{isolationLevel:A.options.isolationLevel}:void 0}}function eI(e){if(e===void 0)return"";let A=Mn(e);return new Nn(0,{colors:ba}).write(A).toString()}var vN="P2037";function hr({error:e,user_facing_error:A},t,r){return A.error_code?new He(PN(A,r),{code:A.error_code,clientVersion:t,meta:A.meta,batchRequestIdx:A.batch_request_idx}):new Me(e,{clientVersion:t,batchRequestIdx:A.batch_request_idx})}function PN(e,A){let t=e.message;return(A==="postgresql"||A==="postgres"||A==="mysql")&&e.error_code===vN&&(t+=`
|
|
81
81
|
Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var ps="<unknown>";function AI(e){var A=e.split(`
|
|
82
82
|
`);return A.reduce(function(t,r){var n=YN(r)||qN(r)||WN(r)||ZN(r)||jN(r);return n&&t.push(n),t},[])}var GN=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,JN=/\((\S*)(?::(\d+))(?::(\d+))\)/;function YN(e){var A=GN.exec(e);if(!A)return null;var t=A[2]&&A[2].indexOf("native")===0,r=A[2]&&A[2].indexOf("eval")===0,n=JN.exec(A[2]);return r&&n!=null&&(A[2]=n[1],A[3]=n[2],A[4]=n[3]),{file:t?null:A[2],methodName:A[1]||ps,arguments:t?[A[2]]:[],lineNumber:A[3]?+A[3]:null,column:A[4]?+A[4]:null}}var VN=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function qN(e){var A=VN.exec(e);return A?{file:A[2],methodName:A[1]||ps,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var ON=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,HN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function WN(e){var A=ON.exec(e);if(!A)return null;var t=A[3]&&A[3].indexOf(" > eval")>-1,r=HN.exec(A[3]);return t&&r!=null&&(A[3]=r[1],A[4]=r[2],A[5]=null),{file:A[3],methodName:A[1]||ps,arguments:A[2]?A[2].split(","):[],lineNumber:A[4]?+A[4]:null,column:A[5]?+A[5]:null}}var _N=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function jN(e){var A=_N.exec(e);return A?{file:A[3],methodName:A[1]||ps,arguments:[],lineNumber:+A[4],column:A[5]?+A[5]:null}:null}var KN=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function ZN(e){var A=KN.exec(e);return A?{file:A[2],methodName:A[1]||ps,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var ru=class{getLocation(){return null}},nu=class{constructor(){this._error=new Error}getLocation(){let A=this._error.stack;if(!A)return null;let r=AI(A).find(n=>{if(!n.file)return!1;let i=kl(n.file);return i!=="<anonymous>"&&!i.includes("@prisma")&&!i.includes("/packages/client/src/runtime/")&&!i.endsWith("/runtime/binary.js")&&!i.endsWith("/runtime/library.js")&&!i.endsWith("/runtime/edge.js")&&!i.endsWith("/runtime/edge-esm.js")&&!i.startsWith("internal/")&&!n.methodName.includes("new ")&&!n.methodName.includes("getCallSite")&&!n.methodName.includes("Proxy.")&&n.methodName.split(".").length<4});return!r||!r.file?null:{fileName:r.file,lineNumber:r.lineNumber,columnNumber:r.column}}};function dr(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new ru:new nu}var tI={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Yn(e={}){let A=zN(e);return Object.entries(A).reduce((r,[n,i])=>(tI[n]!==void 0?r.select[n]={select:i}:r[n]=i,r),{select:{}})}function zN(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ja(e={}){return A=>(typeof e._count=="boolean"&&(A._count=A._count._all),A)}function rI(e,A){let t=Ja(e);return A({action:"aggregate",unpacker:t,argsMapper:Yn})(e)}function $N(e={}){let{select:A,...t}=e;return typeof A=="object"?Yn({...t,_count:A}):Yn({...t,_count:{_all:!0}})}function ex(e={}){return typeof e.select=="object"?A=>Ja(e)(A)._count:A=>Ja(e)(A)._count._all}function nI(e,A){return A({action:"count",unpacker:ex(e),argsMapper:$N})(e)}function Ax(e={}){let A=Yn(e);if(Array.isArray(A.by))for(let t of A.by)typeof t=="string"&&(A.select[t]=!0);else typeof A.by=="string"&&(A.select[A.by]=!0);return A}function tx(e={}){return A=>(typeof e?._count=="boolean"&&A.forEach(t=>{t._count=t._count._all}),A)}function iI(e,A){return A({action:"groupBy",unpacker:tx(e),argsMapper:Ax})(e)}function sI(e,A,t){if(A==="aggregate")return r=>rI(r,t);if(A==="count")return r=>nI(r,t);if(A==="groupBy")return r=>iI(r,t)}function oI(e,A){let t=A.fields.filter(n=>!n.relationName),r=Tl(t,n=>n.name);return new Proxy({},{get(n,i){if(i in n||typeof i=="symbol")return n[i];let s=r[i];if(s)return new ls(e,i,s.type,s.isList,s.kind==="enum")},...Ga(Object.keys(r))})}var aI=e=>Array.isArray(e)?e:e.split("."),iu=(e,A)=>aI(A).reduce((t,r)=>t&&t[r],e),cI=(e,A,t)=>aI(A).reduceRight((r,n,i,s)=>Object.assign({},iu(e,s.slice(0,i)),{[n]:r}),t);function rx(e,A){return e===void 0||A===void 0?[]:[...A,"select",e]}function nx(e,A,t){return A===void 0?e??{}:cI(A,t,e||!0)}function su(e,A,t,r,n,i){let o=e._runtimeDataModel.models[A].fields.reduce((a,c)=>({...a,[c.name]:c}),{});return a=>{let c=dr(e._errorFormat),g=rx(r,n),l=nx(a,i,g),u=t({dataPath:g,callsite:c})(l),E=ix(e,A);return new Proxy(u,{get(h,d){if(!E.includes(d))return h[d];let I=[o[d].type,t,d],p=[g,l];return su(e,...I,...p)},...Ga([...E,...Object.getOwnPropertyNames(u)])})}}function ix(e,A){return e._runtimeDataModel.models[A].fields.filter(t=>t.kind==="object").map(t=>t.name)}var sx=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ox=["aggregate","count","groupBy"];function ou(e,A){let t=e._extensions.getAllModelExtensions(A)??{},r=[ax(e,A),gx(e,A),Bs(t),nA("name",()=>A),nA("$name",()=>A),nA("$parent",()=>e._appliedParent)];return ft({},r)}function ax(e,A){let t=dt(A),r=Object.keys(As.ModelAction).concat("count");return{getKeys(){return r},getPropertyValue(n){let i=n,s=o=>a=>{let c=dr(e._errorFormat);return e._createPrismaPromise(g=>{let l={args:a,dataPath:[],action:i,model:A,clientMethod:`${t}.${n}`,jsModelName:t,transaction:g,callsite:c};return e._request({...l,...o})})};return sx.includes(i)?su(e,A,s):cx(n)?sI(e,n,s):s({})}}}function cx(e){return ox.includes(e)}function gx(e,A){return Gr(nA("fields",()=>{let t=e._runtimeDataModel.models[A];return oI(A,t)}))}function gI(e){return e.replace(/^./,A=>A.toUpperCase())}var au=Symbol();function ms(e){let A=[lx(e),nA(au,()=>e),nA("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&A.push(Bs(t)),ft(e,A)}function lx(e){let A=Object.keys(e._runtimeDataModel.models),t=A.map(dt),r=[...new Set(A.concat(t))];return Gr({getKeys(){return r},getPropertyValue(n){let i=gI(n);if(e._runtimeDataModel.models[i]!==void 0)return ou(e,i);if(e._runtimeDataModel.models[n]!==void 0)return ou(e,n)},getPropertyDescriptor(n){if(!t.includes(n))return{enumerable:!1}}})}function lI(e){return e[au]?e[au]:e}function uI(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let A=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return ms(A)}function EI({result:e,modelName:A,select:t,omit:r,extensions:n}){let i=n.getAllComputedFields(A);if(!i)return e;let s=[],o=[];for(let a of Object.values(i)){if(r){if(r[a.name])continue;let c=a.needs.filter(g=>r[g]);c.length>0&&o.push(Gn(c))}else if(t){if(!t[a.name])continue;let c=a.needs.filter(g=>!t[g]);c.length>0&&o.push(Gn(c))}ux(e,a.needs)&&s.push(Ex(a,ft(e,s)))}return s.length>0||o.length>0?ft(e,[...s,...o]):e}function ux(e,A){return A.every(t=>Ul(e,t))}function Ex(e,A){return Gr(nA(e.name,()=>e.compute(A)))}function Ya({visitor:e,result:A,args:t,runtimeDataModel:r,modelName:n}){if(Array.isArray(A)){for(let s=0;s<A.length;s++)A[s]=Ya({result:A[s],args:t,modelName:n,runtimeDataModel:r,visitor:e});return A}let i=e(A,n,t)??A;return t.include&&hI({includeOrSelect:t.include,result:i,parentModelName:n,runtimeDataModel:r,visitor:e}),t.select&&hI({includeOrSelect:t.select,result:i,parentModelName:n,runtimeDataModel:r,visitor:e}),i}function hI({includeOrSelect:e,result:A,parentModelName:t,runtimeDataModel:r,visitor:n}){for(let[i,s]of Object.entries(e)){if(!s||A[i]==null||Qt(s))continue;let a=r.models[t].fields.find(g=>g.name===i);if(!a||a.kind!=="object"||!a.relationName)continue;let c=typeof s=="object"?s:{};A[i]=Ya({visitor:n,result:A[i],args:c,modelName:a.type,runtimeDataModel:r})}}function dI({result:e,modelName:A,args:t,extensions:r,runtimeDataModel:n,globalOmit:i}){return r.isEmpty()||e==null||typeof e!="object"||!n.models[A]?e:Ya({result:e,args:t??{},modelName:A,runtimeDataModel:n,visitor:(o,a,c)=>{let g=dt(a);return EI({result:o,modelName:g,select:c.select,omit:c.select?void 0:{...i?.[g],...c.omit},extensions:r})}})}function QI(e){if(e instanceof dA)return hx(e);if(Array.isArray(e)){let t=[e[0]];for(let r=1;r<e.length;r++)t[r]=ys(e[r]);return t}let A={};for(let t in e)A[t]=ys(e[t]);return A}function hx(e){return new dA(e.strings,e.values)}function ys(e){if(typeof e!="object"||e==null||e instanceof Gt||Tn(e))return e;if(Fn(e))return new ut(e.toFixed());if(Sn(e))return new Date(+e);if(ArrayBuffer.isView(e))return e.slice(0);if(Array.isArray(e)){let A=e.length,t;for(t=Array(A);A--;)t[A]=ys(e[A]);return t}if(typeof e=="object"){let A={};for(let t in e)t==="__proto__"?Object.defineProperty(A,t,{value:ys(e[t]),configurable:!0,enumerable:!0,writable:!0}):A[t]=ys(e[t]);return A}vt(e,"Unknown value")}function fI(e,A,t,r=0){return e._createPrismaPromise(n=>{let i=A.customDataProxyFetch;return"transaction"in A&&n!==void 0&&(A.transaction?.kind==="batch"&&A.transaction.lock.then(),A.transaction=n),r===t.length?e._executeRequest(A):t[r]({model:A.model,operation:A.model?A.action:A.clientMethod,args:QI(A.args??{}),__internalParams:A,query:(s,o=A)=>{let a=o.customDataProxyFetch;return o.customDataProxyFetch=mI(i,a),o.args=s,fI(e,o,t,r+1)}})})}function II(e,A){let{jsModelName:t,action:r,clientMethod:n}=A,i=t?r:n;if(e._extensions.isEmpty())return e._executeRequest(A);let s=e._extensions.getAllQueryCallbacks(t??"$none",i);return fI(e,A,s)}function BI(e){return A=>{let t={requests:A},r=A[0].extensions.getAllBatchQueryCallbacks();return r.length?pI(t,r,0,e):e(t)}}function pI(e,A,t,r){if(t===A.length)return r(e);let n=e.customDataProxyFetch,i=e.requests[0].transaction;return A[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:i?{isolationLevel:i.kind==="batch"?i.isolationLevel:void 0}:void 0},__internalParams:e,query(s,o=e){let a=o.customDataProxyFetch;return o.customDataProxyFetch=mI(n,a),pI(o,A,t+1,r)}})}var CI=e=>e;function mI(e=CI,A=CI){return t=>e(A(t))}var yI=ie("prisma:client"),wI={Vercel:"vercel","Netlify CI":"netlify"};function RI({postinstall:e,ciName:A,clientVersion:t}){if(yI("checkPlatformCaching:postinstall",e),yI("checkPlatformCaching:ciName",A),e===!0&&A&&A in wI){let r=`Prisma has detected that this project was built on ${A}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process.
|
|
83
83
|
|
|
@@ -170,16 +170,16 @@ You may have to run ${rr("prisma generate")} for your changes to take effect.`,t
|
|
|
170
170
|
`+c,this.clientVersion),a.retryable=!0):this.child?.signalCode?(a=new z(`Query engine process killed with signal ${this.child.signalCode} for unknown reason.
|
|
171
171
|
Make sure that the engine binary at ${r} is not corrupt.
|
|
172
172
|
`+c,this.clientVersion),a.retryable=!0):a=new z(c,this.clientVersion),this.engineStartDeferred.reject(a)}this.child&&(this.lastError||o===126&&this.setError({timestamp:new Date,target:"binary engine process exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system.
|
|
173
|
-
You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(Vn(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await gu("binary",this.config),t=await(0,NR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?hr(a.errors[0],this.clientVersion,this.config.activeProvider):new Me(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){Qo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=kR&&g&&!n)return Qo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=Jn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>l.errors&&l.errors.length>0?hr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l});throw hr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=kR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel});return(await Ar.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=bR}throwAsyncErrorIfExists(A=!1){if(Qo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(Vn(t)),this.clientVersion):new Me(this.getErrorMessageWithLink(Vn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return VI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data;throw new He(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Co(e,A=!1){process.once(e,async()=>{for(let t of Tg)await t.emitExit(),t.kill(e);Tg.splice(0,Tg.length),A&&process.listenerCount(e)===0&&process.exit()})}var SR=!1;function mY(){SR||(Co("beforeExit"),Co("exit"),Co("SIGINT",!0),Co("SIGUSR2",!0),Co("SIGTERM",!0),SR=!0)}function yY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Ui({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var Mg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends Mg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Ti=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};U(Ti,"ForcedRetryError");var gn=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};U(gn,"InvalidDatasourceError");var ln=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};U(ln,"NotImplementedYetError");var Ce=class extends wA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var un=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};U(un,"SchemaMissingError");var od="This request could not be understood by the server",Io=class extends Ce{constructor(t,r,n){super(r||od,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};U(Io,"BadRequestError");var Bo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};U(Bo,"HealthcheckTimeoutError");var po=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};U(po,"EngineStartupError");var mo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};U(mo,"EngineVersionNotSupportedError");var ad="Request timed out",yo=class extends Ce{constructor(t,r=ad){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};U(yo,"GatewayTimeoutError");var wY="Interactive transaction error",wo=class extends Ce{constructor(t,r=wY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};U(wo,"InteractiveTransactionError");var RY="Request parameters are invalid",Ro=class extends Ce{constructor(t,r=RY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};U(Ro,"InvalidRequestError");var cd="Requested resource does not exist",Do=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};U(Do,"NotFoundError");var gd="Unknown server error",Mi=class extends Ce{constructor(t,r,n){super(r||gd,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};U(Mi,"ServerError");var ld="Unauthorized, check your connection string",bo=class extends Ce{constructor(t,r=ld){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};U(bo,"UnauthorizedError");var ud="Usage exceeded, retry again later",ko=class extends Ce{constructor(t,r=ud){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};U(ko,"UsageExceededError");async function DY(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function So(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await DY(e);if(r.type==="QueryEngineError")throw new He(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Mi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new un(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new mo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new po(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Bo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new wo(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new Ro(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new bo(t,vi(ld,r));if(e.status===404)return new Do(t,vi(cd,r));if(e.status===429)throw new ko(t,vi(ud,r));if(e.status===504)throw new yo(t,vi(ad,r));if(e.status>=500)throw new Mi(t,vi(gd,r));if(e.status>=400)throw new Io(t,vi(od,r))}function vi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function LR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function UR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l<i;l=l+3)g=A[l]<<16|A[l+1]<<8|A[l+2],s=(g&16515072)>>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=tr[s]+tr[o]+tr[a]+tr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=tr[s]+tr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=tr[s]+tr[o]+tr[a]+"="),t}function TR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function bY(e){return e[0]*1e3+e[1]/1e6}function MR(e){return new Date(bY(e))}var vR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Fo=class extends wA{constructor(t,r){super(`Cannot fetch data from service:
|
|
173
|
+
You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(Vn(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await gu("binary",this.config),t=await(0,NR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?hr(a.errors[0],this.clientVersion,this.config.activeProvider):new Me(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){Qo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=kR&&g&&!n)return Qo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=Jn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>l.errors&&l.errors.length>0?hr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l});throw hr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=kR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel});return(await Ar.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=bR}throwAsyncErrorIfExists(A=!1){if(Qo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(Vn(t)),this.clientVersion):new Me(this.getErrorMessageWithLink(Vn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return VI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data;throw new He(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Co(e,A=!1){process.once(e,async()=>{for(let t of Tg)await t.emitExit(),t.kill(e);Tg.splice(0,Tg.length),A&&process.listenerCount(e)===0&&process.exit()})}var SR=!1;function mY(){SR||(Co("beforeExit"),Co("exit"),Co("SIGINT",!0),Co("SIGUSR2",!0),Co("SIGTERM",!0),SR=!0)}function yY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Ui({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var Mg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends Mg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Ti=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};U(Ti,"ForcedRetryError");var gn=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};U(gn,"InvalidDatasourceError");var ln=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};U(ln,"NotImplementedYetError");var Ce=class extends wA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var un=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};U(un,"SchemaMissingError");var od="This request could not be understood by the server",Io=class extends Ce{constructor(t,r,n){super(r||od,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};U(Io,"BadRequestError");var Bo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};U(Bo,"HealthcheckTimeoutError");var po=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};U(po,"EngineStartupError");var mo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};U(mo,"EngineVersionNotSupportedError");var ad="Request timed out",yo=class extends Ce{constructor(t,r=ad){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};U(yo,"GatewayTimeoutError");var wY="Interactive transaction error",wo=class extends Ce{constructor(t,r=wY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};U(wo,"InteractiveTransactionError");var RY="Request parameters are invalid",Ro=class extends Ce{constructor(t,r=RY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};U(Ro,"InvalidRequestError");var cd="Requested resource does not exist",Do=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};U(Do,"NotFoundError");var gd="Unknown server error",Mi=class extends Ce{constructor(t,r,n){super(r||gd,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};U(Mi,"ServerError");var ld="Unauthorized, check your connection string",bo=class extends Ce{constructor(t,r=ld){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};U(bo,"UnauthorizedError");var ud="Usage exceeded, retry again later",ko=class extends Ce{constructor(t,r=ud){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};U(ko,"UsageExceededError");async function DY(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function So(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await DY(e);if(r.type==="QueryEngineError")throw new He(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Mi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new un(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new mo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new po(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Bo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new wo(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new Ro(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new bo(t,vi(ld,r));if(e.status===404)return new Do(t,vi(cd,r));if(e.status===429)throw new ko(t,vi(ud,r));if(e.status===504)throw new yo(t,vi(ad,r));if(e.status>=500)throw new Mi(t,vi(gd,r));if(e.status>=400)throw new Io(t,vi(od,r))}function vi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function LR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function UR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l<i;l=l+3)g=A[l]<<16|A[l+1]<<8|A[l+2],s=(g&16515072)>>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=tr[s]+tr[o]+tr[a]+tr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=tr[s]+tr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=tr[s]+tr[o]+tr[a]+"="),t}function TR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function bY(e){return e[0]*1e3+e[1]/1e6}function MR(e){return new Date(bY(e))}var vR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Fo=class extends wA{constructor(t,r){super(`Cannot fetch data from service:
|
|
174
174
|
${t}`,j(r,!0));this.name="RequestError";this.code="P5010"}};U(Fo,"RequestError");async function En(e,A,t=r=>r){let{clientVersion:r,...n}=A,i=t(fetch);try{return await i(e,n)}catch(s){let o=s.message??"Unknown error";throw new Fo(o,{clientVersion:r,cause:s})}}var SY=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,PR=ie("prisma:client:dataproxyEngine");async function FY(e,A){let t=vR["@prisma/engines-version"],r=A.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&r!=="0.0.0"&&r!=="in-memory")return r;let[n,i]=r?.split("-")??[];if(i===void 0&&SY.test(n))return n;if(i!==void 0||r==="0.0.0"||r==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[o,a,c]=s.split("."),g=NY(`<=${o}.${a}.${c}`),l=await En(g,{clientVersion:r});if(!l.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${l.status} ${l.statusText}, response body: ${await l.text()||"<empty body>"}`);let u=await l.text();PR("length of body fetched from unpkg.com",u.length);let E;try{E=JSON.parse(u)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",u),h}return E.version}throw new ln("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:r})}async function GR(e,A){let t=await FY(e,A);return PR("version",t),t}function NY(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var JR=3,Ed=ie("prisma:client:dataproxyEngine"),hd=class{constructor({apiKey:A,tracingHelper:t,logLevel:r,logQueries:n,engineHash:i}){this.apiKey=A,this.tracingHelper=t,this.logLevel=r,this.logQueries=n,this.engineHash=i}build({traceparent:A,interactiveTransaction:t}={}){let r={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(r.traceparent=A??this.tracingHelper.getTraceParent()),t&&(r["X-transaction-id"]=t.id);let n=this.buildCaptureSettings();return n.length>0&&(r["X-capture-telemetry"]=n.join(", ")),r}buildCaptureSettings(){let A=[];return this.tracingHelper.isEnabled()&&A.push("tracing"),this.logLevel&&A.push(this.logLevel),this.logQueries&&A.push("query"),A}},No=class{constructor(A){this.name="DataProxyEngine";TR(A),this.config=A,this.env={...A.env,...typeof process<"u"?process.env:{}},this.inlineSchema=UR(A.inlineSchema),this.inlineDatasources=A.inlineDatasources,this.inlineSchemaHash=A.inlineSchemaHash,this.clientVersion=A.clientVersion,this.engineHash=A.engineVersion,this.logEmitter=A.logEmitter,this.tracingHelper=A.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[A,t]=this.extractHostAndApiKey();this.host=A,this.headerBuilder=new hd({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await GR(A,this.config),Ed("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(A){A?.logs?.length&&A.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let r=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[n]=r.split("/* traceparent");r=n}this.logEmitter.emit("query",{query:r,timestamp:MR(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),A?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:A.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(A){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${A}`}async uploadSchema(){let A={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(A,async()=>{let t=await En(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Ed("schema response status",t.status);let r=await So(t,this.clientVersion);if(r)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${r.message}`,timestamp:new Date,target:""}),r;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(A,{traceparent:t,interactiveTransaction:r,customDataProxyFetch:n}){return this.requestInternal({body:A,traceparent:t,interactiveTransaction:r,customDataProxyFetch:n})}async requestBatch(A,{traceparent:t,transaction:r,customDataProxyFetch:n}){let i=r?.kind==="itx"?r.options:void 0,s=Jn(A,r);return(await this.requestInternal({body:s,customDataProxyFetch:n,interactiveTransaction:i,traceparent:t})).map(a=>(a.extensions&&this.propagateResponseExtensions(a.extensions),"errors"in a?this.convertProtocolErrorsToClientError(a.errors):a))}requestInternal({body:A,traceparent:t,customDataProxyFetch:r,interactiveTransaction:n}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=n?`${n.payload.endpoint}/graphql`:await this.url("graphql");i(s);let o=await En(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:n}),body:JSON.stringify(A),clientVersion:this.clientVersion},r);o.ok||Ed("graphql response status",o.status),await this.handleError(await So(o,this.clientVersion));let a=await o.json();if(a.extensions&&this.propagateResponseExtensions(a.extensions),"errors"in a)throw this.convertProtocolErrorsToClientError(a.errors);return"batchResult"in a?a.batchResult:a}})}async transaction(A,t,r){let n={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${n[A]} transaction`,callback:async({logHttpCall:i})=>{if(A==="start"){let s=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),o=await this.url("transaction/start");i(o);let a=await En(o,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await So(a,this.clientVersion));let c=await a.json(),{extensions:g}=c;g&&this.propagateResponseExtensions(g);let l=c.id,u=c["data-proxy"].endpoint;return{id:l,payload:{endpoint:u}}}else{let s=`${r.payload.endpoint}/${A}`;i(s);let o=await En(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await So(o,this.clientVersion));let a=await o.json(),{extensions:c}=a;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let A={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],r=Ui({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),n;try{n=new URL(r)}catch{throw new gn(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A)}let{protocol:i,host:s,searchParams:o}=n;if(i!=="prisma:"&&i!=="prisma+postgres:")throw new gn(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A);let a=o.get("api_key");if(a===null||a.length<1)throw new gn(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,A);return[s,a]}metrics(){throw new ln("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(A){for(let t=0;;t++){let r=n=>{this.logEmitter.emit("info",{message:`Calling ${n} (n=${t})`,timestamp:new Date,target:""})};try{return await A.callback({logHttpCall:r})}catch(n){if(!(n instanceof wA)||!n.isRetryable)throw n;if(t>=JR)throw n instanceof Ti?n.cause:n;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${JR} failed for ${A.actionGerund}: ${n.message??"(unknown)"}`,timestamp:new Date,target:""});let i=await LR(t);this.logEmitter.emit("warn",{message:`Retrying after ${i}ms`,timestamp:new Date,target:""})}}}async handleError(A){if(A instanceof un)throw await this.uploadSchema(),new Ti({clientVersion:this.clientVersion,cause:A});if(A)throw A}convertProtocolErrorsToClientError(A){return A.length===1?hr(A[0],this.config.clientVersion,this.config.activeProvider):new Me(JSON.stringify(A),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function YR({copyEngine:e=!0},A){let t;try{t=Ui({inlineDatasources:A.inlineDatasources,overrideDatasources:A.overrideDatasources,env:{...A.env,...process.env},clientVersion:A.clientVersion})}catch{}let r=!!(t?.startsWith("prisma://")||t?.startsWith("prisma+postgres://"));e&&r&&ss("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=es(A.generator),i=r||!e,s=!!A.adapter,o=n==="library",a=n==="binary";if(i&&s||s&&!1){let c;throw e?t?.startsWith("prisma://")?c=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:c=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:c=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new Xe(c.join(`
|
|
175
|
-
`),{clientVersion:A.clientVersion})}if(i)return new No(A);if(a)return new fo(A);throw new Xe("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function vg({generator:e}){return e?.previewFeatures??[]}var VR=e=>({command:e});var qR=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Pi(e){try{return OR(e,"fast")}catch{return OR(e,"slow")}}function OR(e,A){return JSON.stringify(e.map(t=>WR(t,A)))}function WR(e,A){
|
|
175
|
+
`),{clientVersion:A.clientVersion})}if(i)return new No(A);if(a)return new fo(A);throw new Xe("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function vg({generator:e}){return e?.previewFeatures??[]}var VR=e=>({command:e});var qR=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Pi(e){try{return OR(e,"fast")}catch{return OR(e,"slow")}}function OR(e,A){return JSON.stringify(e.map(t=>WR(t,A)))}function WR(e,A){if(Array.isArray(e))return e.map(t=>WR(t,A));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Sn(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ut.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(xY(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,r,n).toString("base64")}}return typeof e=="object"&&A==="slow"?_R(e):e}function xY(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function _R(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(HR);let A={};for(let t of Object.keys(e))A[t]=HR(e[t]);return A}function HR(e){return typeof e=="bigint"?e.toString():_R(e)}var LY=["$connect","$disconnect","$on","$transaction","$use","$extends"],jR=LY;var UY=/^(\s*alter\s)/i,KR=ie("prisma:client");function dd(e,A,t,r){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&UY.exec(A))throw new Error(`Running ALTER using ${r} is not supported
|
|
176
176
|
Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization.
|
|
177
177
|
|
|
178
178
|
Example:
|
|
179
179
|
await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`)
|
|
180
180
|
|
|
181
181
|
More Information: https://pris.ly/d/execute-raw
|
|
182
|
-
`)}var Qd=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(Kf(t))r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Pi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=qR(t),n={values:Pi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?KR(`prisma.${e}(${r}, ${n.values})`):KR(`prisma.${e}(${r})`),{query:r,parameters:n}},ZR={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},XR={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Cd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=zR(t(i)):zR(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function zR(e){return typeof e.then=="function"?e:Promise.resolve(e)}var $R={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},fd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$R}};function eD(e){return e.includes("tracing")?new fd:$R}function AD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function tD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Pg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var iD=Z(Ll());function Gg(e){return typeof e.batchRequestIdx=="number"}function rD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Id(e.query.arguments)),A.push(Id(e.query.selection)),A.join("")}function Id(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Id(r)})`:t}).join(" ")})`}var TY={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Bd(e){return TY[e]}var Jg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n<t.length;n++)t[n].reject(r);else for(let n=0;n<t.length;n++){let i=r[n];i instanceof Error?t[n].reject(i):t[n].resolve(i)}}).catch(r=>{for(let n=0;n<t.length;n++)t[n].reject(r)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function hn(e,A){if(A===null)return A;switch(e){case"bigint":return BigInt(A);case"bytes":
|
|
182
|
+
`)}var Qd=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(Kf(t))r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Pi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=qR(t),n={values:Pi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?KR(`prisma.${e}(${r}, ${n.values})`):KR(`prisma.${e}(${r})`),{query:r,parameters:n}},ZR={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},XR={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Cd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=zR(t(i)):zR(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function zR(e){return typeof e.then=="function"?e:Promise.resolve(e)}var $R={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},fd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$R}};function eD(e){return e.includes("tracing")?new fd:$R}function AD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function tD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Pg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var iD=Z(Ll());function Gg(e){return typeof e.batchRequestIdx=="number"}function rD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Id(e.query.arguments)),A.push(Id(e.query.selection)),A.join("")}function Id(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Id(r)})`:t}).join(" ")})`}var TY={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Bd(e){return TY[e]}var Jg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n<t.length;n++)t[n].reject(r);else for(let n=0;n<t.length;n++){let i=r[n];i instanceof Error?t[n].reject(i):t[n].resolve(i)}}).catch(r=>{for(let n=0;n<t.length;n++)t[n].reject(r)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function hn(e,A){if(A===null)return A;switch(e){case"bigint":return BigInt(A);case"bytes":{let{buffer:t,byteOffset:r,byteLength:n}=Buffer.from(A,"base64");return new Uint8Array(t,r,n)}case"decimal":return new ut(A);case"datetime":case"date":return new Date(A);case"time":return new Date(`1970-01-01T${A}Z`);case"bigint-array":return A.map(t=>hn("bigint",t));case"bytes-array":return A.map(t=>hn("bytes",t));case"decimal-array":return A.map(t=>hn("decimal",t));case"datetime-array":return A.map(t=>hn("datetime",t));case"date-array":return A.map(t=>hn("date",t));case"time-array":return A.map(t=>hn("time",t));default:return A}}function nD(e){let A=[],t=MY(e);for(let r=0;r<e.rows.length;r++){let n=e.rows[r],i={...t};for(let s=0;s<n.length;s++)i[e.columns[s]]=hn(e.types[s],n[s]);A.push(i)}return A}function MY(e){let A={};for(let t=0;t<e.columns.length;t++)A[e.columns[t]]=null;return A}var vY=ie("prisma:client:request_handler"),Yg=class{constructor(A,t){this.logEmitter=t,this.client=A,this.dataloader=new Jg({batchLoader:BI(async({requests:r,customDataProxyFetch:n})=>{let{transaction:i,otelParentCtx:s}=r[0],o=r.map(l=>l.protocolQuery),a=this.client._tracingHelper.getTraceParent(s),c=r.some(l=>Bd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:PY(i),containsWrite:c,customDataProxyFetch:n})).map((l,u)=>{if(l instanceof Error)return l;try{return this.mapQueryEngineResult(r[u],l)}catch(E){return E}})}),singleLoader:async r=>{let n=r.transaction?.kind==="itx"?sD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:Bd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:rD(r.protocolQuery),batchOrder(r,n){return r.transaction?.kind==="batch"&&n.transaction?.kind==="batch"?r.transaction.index-n.transaction.index:0}})}async request(A){try{return await this.dataloader.request(A)}catch(t){let{clientMethod:r,callsite:n,transaction:i,args:s,modelName:o}=A;this.handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:s,modelName:o,globalOmit:A.globalOmit})}}mapQueryEngineResult({dataPath:A,unpacker:t},r){let n=r?.data,i=this.unpack(n,A,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:i}:i}handleAndLogRequestError(A){try{this.handleRequestError(A)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:A.clientMethod,timestamp:new Date}),t}}handleRequestError({error:A,clientMethod:t,callsite:r,transaction:n,args:i,modelName:s,globalOmit:o}){if(vY(A),GY(A,n))throw A;if(A instanceof He&&JY(A)){let c=oD(A.meta);La({args:i,errors:[c],callsite:r,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:o})}let a=A.message;if(r&&(a=ya({callsite:r,originalMethod:t,isPanic:A.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),A.code){let c=s?{modelName:s,...A.meta}:A.meta;throw new He(a,{code:A.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:A.batchRequestIdx})}else{if(A.isPanic)throw new JA(a,this.client._clientVersion);if(A instanceof Me)throw new Me(a,{clientVersion:this.client._clientVersion,batchRequestIdx:A.batchRequestIdx});if(A instanceof z)throw new z(a,this.client._clientVersion);if(A instanceof JA)throw new JA(a,this.client._clientVersion)}throw A.clientVersion=this.client._clientVersion,A}sanitizeMessage(A){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,iD.default)(A):A}unpack(A,t,r){if(!A||(A.data&&(A=A.data),!A))return A;let n=Object.keys(A)[0],i=Object.values(A)[0],s=t.filter(c=>c!=="select"&&c!=="include"),o=iu(i,s),a=n==="queryRaw"?nD(o):bn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function PY(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:sD(e)};vt(e,"Unknown transaction kind")}}function sD(e){return{id:e.id,payload:e.payload}}function GY(e,A){return Gg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function JY(e){return e.code==="P2009"||e.code==="P2012"}function oD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(oD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var aD="5.23.0-dev.18";var cD=aD;var hD=Z(ql());var oe=class extends Error{constructor(A){super(A+`
|
|
183
183
|
Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};U(oe,"PrismaClientConstructorValidationError");var gD=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],lD=["pretty","colorless","minimal"],uD=["info","query","warn","error"],VY={datasources:(e,{datasourceNames:A})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,r]of Object.entries(e)){if(!A.includes(t)){let n=Gi(t,A)||` Available datasources: ${A.join(", ")}`;throw new oe(`Unknown datasource ${t} provided to PrismaClient constructor.${n}`)}if(typeof r!="object"||Array.isArray(r))throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
|
|
184
184
|
It should have this form: { url: "CONNECTION_STRING" }`);if(r&&typeof r=="object")for(let[n,i]of Object.entries(r)){if(n!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
|
|
185
185
|
It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${t}" provided to PrismaClient constructor.
|