@prisma/client 5.17.0-integration-fix-vitest-edgemw.1 → 5.17.0-integration-avoid-using-process-in-debug.2

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/runtime/wasm.js CHANGED
@@ -1,33 +1,32 @@
1
- "use strict";var Lo=Object.create;var At=Object.defineProperty;var Io=Object.getOwnPropertyDescriptor;var _o=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,Fo=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ze=(e,t)=>{for(var r in t)At(e,r,{get:t[r],enumerable:!0})},Hr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _o(t))!Fo.call(e,i)&&i!==r&&At(e,i,{get:()=>t[i],enumerable:!(n=Io(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Lo(Do(e)):{},Hr(t||!e||!e.__esModule?At(r,"default",{value:e,enumerable:!0}):r,e)),ur=e=>Hr(At({},"__esModule",{value:!0}),e);function cr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h($o.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;i<e.length;i++)n.setUint16(i*2,e.charCodeAt(i),!0);return r}if(t==="hex"){let r=new h(e.length/2);for(let n=0,i=0;i<e.length;i+=2,n++)r[n]=parseInt(e.slice(i,i+2),16);return r}Yr(`encoding "${t}"`)}function No(e){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(b=0){return $(b,"offset"),Y(b,"offset"),q(b,"offset",this.length-1),new DataView(this.buffer)[r[a]](b,f)},o=(a,f)=>function(b,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Bo[C];return $(T,"offset"),Y(T,"offset"),q(T,"offset",this.length-1),Uo(b,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,b,f),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Yr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Rt(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=jo+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Uo(e,t,r,n){if(e<r||e>n){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function zr(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Qo(e,t="utf8"){return h.from(e,t)}var h,Bo,$o,Vo,qo,jo,y,mr,u=oe(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return zr(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return cr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return qo.includes(r)}static compare(r,n){Rt(r,"buff1"),Rt(n,"buff2");for(let i=0;i<r.length;i++){if(r[i]<n[i])return-1;if(r[i]>n[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return cr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o=o*256+i.getUint8(s);return i.getUint8(0)&128&&(o-=Math.pow(256,n)),o}readIntLE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o+=i.getUint8(s)*Math.pow(256,s);return i.getUint8(n-1)&128&&(o-=Math.pow(256,n)),o}readUIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o=o*256+i.getUint8(s);return o}readUintBE(r,n){return this.readUIntBE(r,n)}readUIntLE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o+=i.getUint8(s)*Math.pow(256,s);return o}readUintLE(r,n){return this.readUIntLE(r,n)}writeIntBE(r,n,i){return r=r<0?r+Math.pow(256,i):r,this.writeUIntBE(r,n,i)}writeIntLE(r,n,i){return r=r<0?r+Math.pow(256,i):r,this.writeUIntLE(r,n,i)}writeUIntBE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=i-1;s>=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;s<i;s++)o.setUint8(s,r&255),r=r/256;return n+i}writeUintLE(r,n,i){return this.writeUIntLE(r,n,i)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=2)r.setUint16(n,r.getUint16(n,!0),!1);return this}swap32(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=4)r.setUint32(n,r.getUint32(n,!0),!1);return this}swap64(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=8)r.setBigUint64(n,r.getBigUint64(n,!0),!1);return this}compare(r,n=0,i=r.length,o=0,s=this.length){return Rt(r,"target"),$(n,"targetStart"),$(i,"targetEnd"),$(o,"sourceStart"),$(s,"sourceEnd"),q(n,"targetStart"),q(i,"targetEnd",r.length),q(o,"sourceStart"),q(s,"sourceEnd",this.length),e.compare(this.slice(o,s),r.slice(n,i))}equals(r){return Rt(r,"otherBuffer"),this.length===r.length&&this.every((n,i)=>n===r[i])}copy(r,n=0,i=0,o=this.length){q(n,"targetStart"),q(i,"sourceStart",this.length),q(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i<o&&!(this[i]===void 0||r[n]===void 0);)r[n]=this[i],s++,i++,n++;return s}write(r,n,i,o="utf8"){let s=typeof n=="string"?0:n??0,a=typeof i=="string"?this.length-s:i??this.length-s;return o=typeof n=="string"?n:typeof i=="string"?i:o,$(s,"offset"),$(a,"length"),q(s,"offset",this.length),q(a,"length",this.length),(o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")&&(a=a-a%2),cr(r,o).copy(this,s,0,a)}fill(r=0,n=0,i=this.length,o="utf-8"){let s=typeof n=="string"?0:n,a=typeof i=="string"?this.length:i;if(o=typeof n=="string"?n:typeof i=="string"?i:o,r=e.from(typeof r=="number"?[r]:r??[],o),zr(o,"encoding"),q(s,"offset",this.length),q(a,"end",this.length),r.length!==0)for(let f=s;f<a;f+=r.length)super.set(r.slice(0,r.length+f>=this.length?this.length-f:r.length),f);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),f=typeof n=="string"?0:n;return f=typeof n=="number"?f:null,f=Number.isNaN(f)?null:f,f??=o?this.length:0,f=f<0?this.length+f:f,a.length===0&&o===!1?f>=this.length?this.length:f:a.length===0&&o===!0?(f>=this.length?this.length:f)||this.length:s((b,T)=>(o?T<=f:T>=f)&&this[T]===a[0]&&a.every((O,R)=>this[T+R]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Vo.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+mr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+mr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1<o.byteLength?mr(o.getUint16(a*2,!0)):"").join("")}if(r==="hex")return this.slice(n,i).reduce((o,s)=>o+s.toString(16).padStart(2,"0"),"");Yr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};Bo={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},$o=new TextEncoder,Vo=new TextDecoder,qo=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],jo=4294967295;No(h.prototype);y=new Proxy(Qo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),mr=String.fromCodePoint});var g,c=oe(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,m=oe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=oe(()=>{"use strict";E=()=>{};E.prototype=E});var w,d=oe(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function tn(e,t){var r,n,i,o,s,a,f,b,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(f=e.d,b=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=b.length):(n=b,i=s,a=f.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=b.length,a-o<0&&(o=a,n=b,b=f,f=n),r=0;o;)r=(f[--o]=f[o]+b[o]+r)/j|0,f[o]%=j;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,U?D(t,C):t}function le(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Re+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)n=e[t]+"",r=N-n.length,r&&(o+=we(r)),o+=n;s=e[t],n=s+"",r=N-n.length,r&&(o+=we(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function rn(e,t){var r,n,i,o,s,a,f=0,b=0,T=e.constructor,C=T.precision;if(V(e)>16)throw Error(dr+V(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),b+=5;for(n=Math.log(Ae(2,b))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++f),s=o.plus(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;b--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function V(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function pr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(re+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function we(e){for(var t="";e--;)t+="0";return t}function et(e,t){var r,n,i,o,s,a,f,b,T,C=1,O=10,R=e,M=R.d,S=R.constructor,L=S.precision;if(R.s<1)throw Error(re+(R.s?"NaN":"-Infinity"));if(R.eq(Z))return new S(0);if(t==null?(U=!1,b=L):b=t,R.eq(10))return t==null&&(U=!0),pr(S,b);if(b+=O,S.precision=b,r=ae(M),n=r.charAt(0),o=V(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=ae(R.d),n=r.charAt(0),C++;o=V(R),n>1?(R=new S("0."+r),o++):R=new S(n+"."+r.slice(1))}else return f=pr(S,b+2,L).times(o+""),R=et(new S(n+"."+r.slice(1)),b-O).plus(f),S.precision=L,t==null?(U=!0,D(R,L)):R;for(a=s=R=ge(R.minus(Z),R.plus(Z),b),T=D(R.times(R),b),i=3;;){if(s=D(s.times(T),b),f=a.plus(ge(s,new S(i),b)),ae(f.d).slice(0,b)===ae(a.d).slice(0,b))return a=a.times(2),o!==0&&(a=a.plus(pr(S,b+2,L).times(o+""))),a=ge(a,new S(C),b),S.precision=L,t==null?(U=!0,D(a,L)):a;a=f,i+=2}}function Xr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=N;n<i;)e.d.push(+t.slice(n,n+=N));t=t.slice(n),n=N-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),U&&(e.e>St||e.e<-St))throw Error(dr+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,f,b,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,b=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(b=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Ae(10,s-i-1),a=b/o%10|0,f=t<0||C[T+1]!==void 0||b%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?b/Ae(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return f?(o=V(e),C.length=1,t=t-o-1,C[0]=Ae(10,(N-t%N)%N),e.e=Fe(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Ae(10,N-n),C[T]=i>0?(b/Ae(10,s-i)%Ae(10,i)|0)*o:0),f)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>St||e.e<-St))throw Error(dr+V(e));return e}function nn(e,t){var r,n,i,o,s,a,f,b,T,C,O=e.constructor,R=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,R):t;if(f=e.d,C=t.d,n=t.e,b=e.e,f=f.slice(),s=b-n,s){for(T=s<0,T?(r=f,s=-s,a=C.length):(r=C,n=b,a=f.length),i=Math.max(Math.ceil(R/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=C.length,T=i<a,T&&(a=i),i=0;i<a;i++)if(f[i]!=C[i]){T=f[i]<C[i];break}s=0}for(T&&(r=f,f=C,C=r,t.s=-t.s),a=f.length,i=C.length-a;i>0;--i)f[a++]=0;for(i=C.length;i>s;){if(f[--i]<C[i]){for(o=i;o&&f[--o]===0;)f[o]=j-1;--f[o],f[i]+=j}f[i]-=C[i]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,U?D(t,R):t):new O(0)}function Se(e,t,r){var n,i=V(e),o=ae(e.d),s=o.length;return t?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+we(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+we(-i-1)+o,r&&(n=r-s)>0&&(o+=we(n))):i>=s?(o+=we(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+we(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=we(n))),e.s<0?"-"+o:o}function Zr(e,t){if(e.length>t)return e.length=t,!0}function on(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Re+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Xr(s,o.toString())}else if(typeof o!="string")throw Error(Re+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Go.test(o))Xr(s,o);else throw Error(Re+o)}if(i.prototype=A,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=on,i.config=i.set=Wo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function Wo(e){if(!e||typeof e!="object")throw Error(re+"Object expected");var t,r,n,i=["precision",1,De,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Fe(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Re+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Re+r+": "+n);return this}var De,Jo,fr,U,re,Re,dr,Fe,Ae,Go,Z,j,N,en,St,A,ge,fr,Ot,sn=oe(()=>{"use strict";u();c();m();p();d();l();De=1e9,Jo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Re=re+"Invalid argument: ",dr=re+"Exponent out of range: ",Fe=Math.floor,Ae=Math.pow,Go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,en=9007199254740991,St=Fe(en/N),A={};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};A.comparedTo=A.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};A.decimalPlaces=A.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};A.dividedBy=A.div=function(e){return ge(this,new this.constructor(e))};A.dividedToIntegerBy=A.idiv=function(e){var t=this,r=t.constructor;return D(ge(t,new r(e),0,1),r.precision)};A.equals=A.eq=function(e){return!this.cmp(e)};A.exponent=function(){return V(this)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){return this.cmp(e)>=0};A.isInteger=A.isint=function(){return this.e>this.d.length-2};A.isNegative=A.isneg=function(){return this.s<0};A.isPositive=A.ispos=function(){return this.s>0};A.isZero=function(){return this.s===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(re+"NaN");if(r.s<1)throw Error(re+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ge(et(r,o),et(e,o),o),U=!0,D(t,i))};A.minus=A.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nn(t,e):tn(t,(e.s=-e.s,e))};A.modulo=A.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(re+"NaN");return r.s?(U=!1,t=ge(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};A.naturalExponential=A.exp=function(){return rn(this)};A.naturalLogarithm=A.ln=function(){return et(this)};A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};A.plus=A.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?tn(t,e):nn(t,(e.s=-e.s,e))};A.precision=A.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);if(t=V(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};A.squareRoot=A.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(re+"NaN")}for(e=V(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(ge(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};A.times=A.mul=function(e){var t,r,n,i,o,s,a,f,b,T=this,C=T.constructor,O=T.d,R=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,f=O.length,b=R.length,f<b&&(o=O,O=R,R=o,s=f,f=b,b=s),o=[],s=f+b,n=s;n--;)o.push(0);for(n=b;--n>=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};A.toDecimalPlaces=A.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,De),t===void 0?t=n.rounding:le(t,0,8),D(r,e+V(r)+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Se(n,!0):(le(e,0,De),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=Se(n,!0,e+1)),r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Se(i):(le(e,0,De),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+V(i)+1,t),r=Se(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};A.toInteger=A.toint=function(){var e=this,t=e.constructor;return D(new t(e),V(e)+1,t.rounding)};A.toNumber=function(){return+this};A.toPower=A.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,b=12,T=+(e=new f(e));if(!e.s)return new f(Z);if(a=new f(a),!a.s){if(e.s<1)throw Error(re+"Infinity");return a}if(a.eq(Z))return a;if(n=f.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=en){for(i=new f(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),Zr(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),Zr(a.d,t);return U=!0,e.s<0?new f(Z).div(i):D(i,n)}}else if(o<0)throw Error(re+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(et(a,n+b)),U=!0,i=rn(i),i.s=o,i};A.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Se(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,De),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=V(i),n=Se(i,e<=r||r<=o.toExpNeg,e)),n};A.toSignificantDigits=A.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,De),t===void 0?t=n.rounding:le(t,0,8)),D(new n(r),e,t)};A.toString=A.valueOf=A.val=A.toJSON=A[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=V(e),r=e.constructor;return Se(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;a<o;a++)if(n[a]!=i[a]){f=n[a]>i[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*j+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,f,b,T,C,O,R,M,S,L,ne,z,Ie,k,Te,lr,ie,Tt,Ct=n.constructor,Mo=n.s==i.s?1:-1,se=n.d,B=i.d;if(!n.s)return new Ct(n);if(!i.s)throw Error(re+"Division by zero");for(f=n.e-i.e,ie=B.length,Te=se.length,R=new Ct(Mo),M=R.d=[],b=0;B[b]==(se[b]||0);)++b;if(B[b]>(se[b]||0)&&--f,o==null?z=o=Ct.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Ct(0);if(z=z/N+2|0,b=0,ie==1)for(T=0,B=B[0],z++;(b<Te||T)&&z--;b++)Ie=T*j+(se[b]||0),M[b]=Ie/B|0,T=Ie%B|0;else{for(T=j/(B[0]+1)|0,T>1&&(B=e(B,T),se=e(se,T),ie=B.length,Te=se.length),k=ie,S=se.slice(0,ie),L=S.length;L<ie;)S[L++]=0;Tt=B.slice(),Tt.unshift(0),lr=B[0],B[1]>=j/2&&++lr;do T=0,a=t(B,S,ie,L),a<0?(ne=S[0],ie!=L&&(ne=ne*j+(S[1]||0)),T=ne/lr|0,T>1?(T>=j&&(T=j-1),C=e(B,T),O=C.length,L=S.length,a=t(C,S,O,L),a==1&&(T--,r(C,ie<O?Tt:B,O))):(T==0&&(a=T=1),C=B.slice()),O=C.length,O<L&&C.unshift(0),r(S,C,L),a==-1&&(L=S.length,a=t(B,S,ie,L),a<1&&(T++,r(S,ie<L?Tt:B,L))),L=S.length):a===0&&(T++,S=[0]),M[b++]=T,a&&S[0]?S[L++]=se[k]||0:(S=[se[k]],L=1);while((k++<Te||S[0]!==void 0)&&z--)}return M[0]||M.shift(),R.e=f,D(R,s?o+V(R)+1:o)}}();fr=on(Jo);Z=new fr(1);Ot=fr});var v,ue,l=oe(()=>{"use strict";sn();v=class extends Ot{static isDecimal(t){return t instanceof Ot}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Ot(`0.${n.slice(0,t)}`)}}},ue=v});function Ko(){return!1}var Ho,zo,cn,mn=oe(()=>{"use strict";u();c();m();p();d();l();Ho={},zo={existsSync:Ko,promises:Ho},cn=zo});var vn=Ce((Mu,Pn)=>{"use strict";u();c();m();p();d();l();Pn.exports=(wr(),ur(br)).format});var br={};Ze(br,{default:()=>Zo,deprecate:()=>Cn,format:()=>Rn,inspect:()=>An,promisify:()=>Tn});function Tn(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function Cn(e,t){return(...r)=>(console.warn(t),e(...r))}function An(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Rn,Xo,Zo,wr=oe(()=>{"use strict";u();c();m();p();d();l();Rn=vn(),Xo={promisify:Tn,deprecate:Cn,inspect:An,format:Rn},Zo=Xo});function is(...e){return e.join("/")}function os(...e){return e.join("/")}var Mn,ss,as,rt,Ln=oe(()=>{"use strict";u();c();m();p();d();l();Mn="/",ss={sep:Mn},as={resolve:is,posix:ss,join:os,sep:Mn},rt=as});var It,_n=oe(()=>{"use strict";u();c();m();p();d();l();It=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Fn=Ce((Zc,Dn)=>{"use strict";u();c();m();p();d();l();Dn.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bn=Ce((dm,Un)=>{"use strict";u();c();m();p();d();l();Un.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Vn=Ce((Em,$n)=>{"use strict";u();c();m();p();d();l();var ds=Bn();$n.exports=e=>typeof e=="string"?e.replace(ds(),""):e});var Jn=Ce((zf,ys)=>{ys.exports={name:"@prisma/engines-version",version:"5.17.0-2.9b8d05f58b90e474495c811c76f88979000107a9",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"9b8d05f58b90e474495c811c76f88979000107a9"},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 Gn=Ce(()=>{"use strict";u();c();m();p();d();l()});var Vr=Ce((JC,Ni)=>{"use strict";u();c();m();p();d();l();Ni.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,f,b,T,C,O,R,M,S,L,ne,z,Ie,k=[];for(f=0;f<i;f++)k.push(f+1),k.push(t.charCodeAt(s+f));for(var Te=k.length-1;a<o-3;)for(L=r.charCodeAt(s+(b=a)),ne=r.charCodeAt(s+(T=a+1)),z=r.charCodeAt(s+(C=a+2)),Ie=r.charCodeAt(s+(O=a+3)),R=a+=4,f=0;f<Te;f+=2)M=k[f],S=k[f+1],b=e(M,b,T,L,S),T=e(b,T,C,ne,S),C=e(T,C,O,z,S),R=e(C,O,R,Ie,S),k[f]=R,O=C,C=T,T=b,b=M;for(;a<o;)for(L=r.charCodeAt(s+(b=a)),R=++a,f=0;f<Te;f+=2)M=k[f],k[f]=R=e(M,b,R,L,k[f+1]),b=M;return R}}()});var rl={};Ze(rl,{Debug:()=>xr,Decimal:()=>ue,Extensions:()=>gr,MetricsClient:()=>Be,NotFoundError:()=>he,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>ye,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>G,Public:()=>hr,Sql:()=>X,defineDmmfProperty:()=>Qn,empty:()=>Kn,getPrismaClient:()=>So,getRuntime:()=>Pe,join:()=>Wn,makeStrictEnum:()=>Oo,objectEnumValues:()=>Ft,raw:()=>Lr,sqltag:()=>Ir,warnEnvConflicts:()=>void 0,warnOnce:()=>st});module.exports=ur(rl);u();c();m();p();d();l();var gr={};Ze(gr,{defineExtension:()=>an,getExtensionContext:()=>ln});u();c();m();p();d();l();u();c();m();p();d();l();function an(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();m();p();d();l();function ln(e){return e}var hr={};Ze(hr,{validator:()=>un});u();c();m();p();d();l();u();c();m();p();d();l();function un(...e){return t=>t}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var yr,pn,dn,fn,gn=!0;typeof g<"u"&&({FORCE_COLOR:yr,NODE_DISABLE_COLORS:pn,NO_COLOR:dn,TERM:fn}=g.env||{},gn=g.stdout&&g.stdout.isTTY);var Yo={enabled:!pn&&dn==null&&fn!=="dumb"&&(yr!=null&&yr!=="0"||gn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Yo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var au=F(0,0),kt=F(1,22),Mt=F(2,22),lu=F(3,23),hn=F(4,24),uu=F(7,27),cu=F(8,28),mu=F(9,29),pu=F(30,39),Ne=F(31,39),yn=F(32,39),bn=F(33,39),wn=F(34,39),du=F(35,39),En=F(36,39),fu=F(37,39),xn=F(90,39),gu=F(90,39),hu=F(40,49),yu=F(41,49),bu=F(42,49),wu=F(43,49),Eu=F(44,49),xu=F(45,49),Pu=F(46,49),vu=F(47,49);u();c();m();p();d();l();var es=100,Sn=["green","yellow","blue","magenta","cyan","red"],Lt=[],On=Date.now(),ts=0,Er=typeof g<"u"?g.env:{};globalThis.DEBUG??=Er.DEBUG??"";globalThis.DEBUG_COLORS??=Er.DEBUG_COLORS?Er.DEBUG_COLORS==="true":!0;var tt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e,i;typeof require=="function"&&typeof g<"u"&&typeof g.stderr<"u"&&typeof g.stderr.write=="function"?i=(...o)=>{try{let s=(wr(),ur(br));g.stderr.write(s.format(...o)+`
2
- `)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function rs(e){let t={color:Sn[ts++%Sn.length],enabled:tt.enabled(e),namespace:e,log:tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Lt.push([o,...n]),Lt.length>es&&Lt.shift(),tt.enabled(o)||i){let f=n.map(T=>typeof T=="string"?T:ns(T)),b=`+${Date.now()-On}ms`;On=Date.now(),a(o,...f,b)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var xr=new Proxy(rs,{get:(e,t)=>tt[t],set:(e,t,r)=>tt[t]=r});function ns(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function kn(){Lt.length=0}var ee=xr;u();c();m();p();d();l();u();c();m();p();d();l();var Pr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var In="library";function nt(e){let t=ls();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":In)}function ls(){let e=g.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u();c();m();p();d();l();u();c();m();p();d();l();var Oe;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Oe||={});var ot={};Ze(ot,{error:()=>ms,info:()=>cs,log:()=>us,query:()=>ps,should:()=>Nn,tags:()=>it,warn:()=>vr});u();c();m();p();d();l();var it={error:Ne("prisma:error"),warn:bn("prisma:warn"),info:En("prisma:info"),query:wn("prisma:query")},Nn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function us(...e){console.log(...e)}function vr(e,...t){Nn.warn()&&console.warn(`${it.warn} ${e}`,...t)}function cs(e,...t){console.info(`${it.info} ${e}`,...t)}function ms(e,...t){console.error(`${it.error} ${e}`,...t)}function ps(e,...t){console.log(`${it.query} ${e}`,...t)}u();c();m();p();d();l();function _t(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function ke(e,t){throw new Error(t)}u();c();m();p();d();l();function Tr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();m();p();d();l();var Cr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});u();c();m();p();d();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();m();p();d();l();function Ar(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++)t(r,e[n])<0&&(r=e[n]);return r}u();c();m();p();d();l();function K(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();m();p();d();l();var qn=new Set,st=(e,t,...r)=>{qn.has(e)||(qn.add(e),vr(t,...r))};u();c();m();p();d();l();var Q=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(Q,"PrismaClientKnownRequestError");var he=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(he,"NotFoundError");u();c();m();p();d();l();var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(I,"PrismaClientInitializationError");u();c();m();p();d();l();var ye=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(ye,"PrismaClientRustPanicError");u();c();m();p();d();l();var J=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(J,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(G,"PrismaClientValidationError");u();c();m();p();d();l();var Be=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u();c();m();p();d();l();u();c();m();p();d();l();function at(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Qn(e,t){let r=at(()=>fs(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function fs(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Rr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();m();p();d();l();var Dt=Symbol(),Sr=new WeakMap,be=class{constructor(t){t===Dt?Sr.set(this,`Prisma.${this._getName()}`):Sr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Sr.get(this)}},lt=class extends be{_getNamespace(){return"NullTypes"}},ut=class extends lt{};Or(ut,"DbNull");var ct=class extends lt{};Or(ct,"JsonNull");var mt=class extends lt{};Or(mt,"AnyNull");var Ft={classes:{DbNull:ut,JsonNull:ct,AnyNull:mt},instances:{DbNull:new ut(Dt),JsonNull:new ct(Dt),AnyNull:new mt(Dt)}};function Or(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function pt(e){return{ok:!1,error:e,map(){return pt(e)},flatMap(){return pt(e)}}}var kr=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Mr=e=>{let t=new kr,r=Me(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Me(t,e.queryRaw.bind(e)),executeRaw:Me(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>gs(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=hs(t,e.getConnectionInfo.bind(e))),n},gs=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Me(e,t.queryRaw.bind(t)),executeRaw:Me(e,t.executeRaw.bind(t)),commit:Me(e,t.commit.bind(t)),rollback:Me(e,t.rollback.bind(t))});function Me(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}function hs(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}var Ro=_e(Jn());var kO=_e(Gn());_n();mn();Ln();u();c();m();p();d();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;i<r.length;){let s=r[i++],a=t[i];if(s instanceof e){this.strings[o]+=s.strings[0];let f=0;for(;f<s.values.length;)this.values[o++]=s.values[f++],this.strings[o]=s.strings[f];this.strings[o]+=a}else this.values[o++]=s,this.strings[o]=a}}get sql(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`?${this.strings[r++]}`;return n}get statement(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`:${r}${this.strings[r++]}`;return n}get text(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`$${r}${this.strings[r++]}`;return n}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Wn(e,t=",",r="",n=""){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 X([r,...Array(e.length-1).fill(t),n],e)}function Lr(e){return new X([e],[])}var Kn=Lr("");function Ir(e,...t){return new X(e,t)}u();c();m();p();d();l();u();c();m();p();d();l();function dt(e){return{getKeys(){return Object.keys(e)},getPropertyValue(t){return e[t]}}}u();c();m();p();d();l();function H(e,t){return{getKeys(){return[e]},getPropertyValue(){return t()}}}u();c();m();p();d();l();u();c();m();p();d();l();var ce=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function Le(e){let t=new ce;return{getKeys(){return e.getKeys()},getPropertyValue(r){return t.getOrCreate(r,()=>e.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var Nt={enumerable:!0,configurable:!0,writable:!0};function Ut(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Nt,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Hn=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=bs(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=zn(Reflect.ownKeys(o),r),a=zn(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Nt,...f?.getPropertyDescriptor(s)}:Nt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Hn]=function(){let o={...this};return delete o[Hn],o},i}function bs(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function zn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function $e(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function Bt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();m();p();d();l();u();c();m();p();d();l();var Ve=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o<r.length;o++)n(r[o],this),o!==i&&this.write(t);return this}writeLine(t){return this.write(t).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let t=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,t?.(),this}withIndent(t){return this.indent(),t(this),this.unindent(),this}afterNextNewline(t){return this.afterNextNewLineCallback=t,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
3
- `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};u();c();m();p();d();l();u();c();m();p();d();l();function Yn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();m();p();d();l();function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function $t(e){return e.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}u();c();m();p();d();l();var ft=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Qe(e){return e instanceof ft}u();c();m();p();d();l();u();c();m();p();d();l();var Vt=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var qt=e=>e,jt={bold:qt,red:qt,green:qt,dim:qt,enabled:!1},Xn={bold:kt,red:Ne,green:yn,dim:Mt,enabled:!0},Je={write(e){e.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Ee=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Ge=class extends Ee{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Vt(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Je,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};u();c();m();p();d();l();var Zn=": ",Qt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Zn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Zn).write(this.value)}};u();c();m();p();d();l();var We=class e extends Ee{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let f;if(s.value instanceof e?f=s.value.getField(a):s.value instanceof Ge&&(f=s.value.getField(Number(a))),!f)return;s=f}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Je,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Ee{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var _r=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(`
4
- `)}};function Ke(e){return new _r(ei(e))}function ei(e){let t=new We;for(let[r,n]of Object.entries(e)){let i=new Qt(r,ti(n));t.addField(i)}return t}function ti(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(je(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=$t(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof be?new W(`Prisma.${e._getName()}`):Qe(e)?new W(`prisma.${Yn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Es(e):typeof e=="object"?ei(e):new W(Object.prototype.toString.call(e))}function Es(e){let t=new Ge;for(let r of e)t.addItem(ti(r));return t}function Jt(e,t){let r=t==="pretty"?Xn:jt,n=e.renderAllMessages(r),i=new Ve(0,{colors:r}).write(e).toString();return{message:n,args:i}}function ri(e){if(e===void 0)return"";let t=Ke(e);return new Ve(0,{colors:jt}).write(t).toString()}u();c();m();p();d();l();var xs="P2037";function Gt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(Ps(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Ps(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===xs&&(r+=`
5
- Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Dr=class{getLocation(){return null}};function xe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Dr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ni={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function He(e={}){let t=Ts(e);return Object.entries(t).reduce((n,[i,o])=>(ni[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ts(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Wt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ii(e,t){let r=Wt(e);return t({action:"aggregate",unpacker:r,argsMapper:He})(e)}u();c();m();p();d();l();function Cs(e={}){let{select:t,...r}=e;return typeof t=="object"?He({...r,_count:t}):He({...r,_count:{_all:!0}})}function As(e={}){return typeof e.select=="object"?t=>Wt(e)(t)._count:t=>Wt(e)(t)._count._all}function oi(e,t){return t({action:"count",unpacker:As(e),argsMapper:Cs})(e)}u();c();m();p();d();l();function Rs(e={}){let t=He(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Ss(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function si(e,t){return t({action:"groupBy",unpacker:Ss(e),argsMapper:Rs})(e)}function ai(e,t,r){if(t==="aggregate")return n=>ii(n,r);if(t==="count")return n=>oi(n,r);if(t==="groupBy")return n=>si(n,r)}u();c();m();p();d();l();function li(e,t){let r=t.fields.filter(i=>!i.relationName),n=Cr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new ft(e,o,s.type,s.isList,s.kind==="enum")},...Ut(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var ui=e=>Array.isArray(e)?e:e.split("."),Fr=(e,t)=>ui(t).reduce((r,n)=>r&&r[n],e),ci=(e,t,r)=>ui(t).reduceRight((n,i,o,s)=>Object.assign({},Fr(e,s.slice(0,o)),{[i]:n}),r);function Os(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ks(e,t,r){return t===void 0?e??{}:ci(t,r,e||!0)}function Nr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,b)=>({...f,[b.name]:b}),{});return f=>{let b=xe(e._errorFormat),T=Os(n,i),C=ks(f,o,T),O=r({dataPath:T,callsite:b})(C),R=Ms(e,t);return new Proxy(O,{get(M,S){if(!R.includes(S))return M[S];let ne=[a[S].type,r,S],z=[T,C];return Nr(e,...ne,...z)},...Ut([...R,...Object.getOwnPropertyNames(O)])})}}function Ms(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u();c();m();p();d();l();u();c();m();p();d();l();var Ls=_e(Fn());var Is={red:Ne,gray:xn,dim:Mt,bold:kt,underline:hn,highlightSource:e=>e.highlight()},_s={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ds({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Fs({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(Ns(t))),i){a.push("");let b=[i.toString()];o&&(b.push(o),b.push(s.dim(")"))),a.push(b.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
6
- `)}function Ns(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ze(e){let t=e.showColors?Is:_s,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ds(e),Fs(r,t)}function mi(e,t,r,n){return e===Oe.ModelAction.findFirstOrThrow||e===Oe.ModelAction.findUniqueOrThrow?Us(t,r,n):n}function Us(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ze({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new G(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new he(`No ${e} found`,t):o})}}u();c();m();p();d();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Bs=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],$s=["aggregate","count","groupBy"];function Ur(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Vs(e,t),js(e,t),dt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Vs(e,t){let r=de(t),n=Object.keys(Oe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=f=>e._request(f);s=mi(o,t,e._clientVersion,s);let a=f=>b=>{let T=xe(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:b,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...f})})};return Bs.includes(o)?Nr(e,t,a):qs(i)?ai(e,i,a):a({})}}}function qs(e){return $s.includes(e)}function js(e,t){return Le(H("fields",()=>{let r=e._runtimeDataModel.models[t];return li(t,r)}))}u();c();m();p();d();l();function pi(e){return e.replace(/^./,t=>t.toUpperCase())}var Br=Symbol();function gt(e){let t=[Qs(e),H(Br,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(dt(r)),me(e,t)}function Qs(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Le({getKeys(){return n},getPropertyValue(i){let o=pi(i);if(e._runtimeDataModel.models[o]!==void 0)return Ur(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Ur(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function di(e){return e[Br]?e[Br]:e}function fi(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return gt(t)}u();c();m();p();d();l();u();c();m();p();d();l();function gi({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let b=f.needs.filter(T=>n[T]);b.length>0&&a.push($e(b))}else if(r){if(!r[f.name])continue;let b=f.needs.filter(T=>!r[T]);b.length>0&&a.push($e(b))}Js(e,f.needs)&&s.push(Gs(f,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Js(e,t){return t.every(r=>Tr(e,r))}function Gs(e,t){return Le(H(e.name,()=>e.compute(t)))}u();c();m();p();d();l();function Kt({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;s<t.length;s++)t[s]=Kt({result:t[s],args:r,modelName:i,runtimeDataModel:n,visitor:e});return t}let o=e(t,i,r)??t;return r.include&&hi({includeOrSelect:r.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),r.select&&hi({includeOrSelect:r.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),o}function hi({includeOrSelect:e,result:t,parentModelName:r,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(e)){if(!s||t[o]==null)continue;let f=n.models[r].fields.find(T=>T.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let b=typeof s=="object"?s:{};t[o]=Kt({visitor:i,result:t[o],args:b,modelName:f.type,runtimeDataModel:n})}}function yi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kt({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,b)=>{let T=de(f);return gi({result:a,modelName:T,select:b.select,omit:b.select?void 0:{...o?.[T],...b.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();function bi(e){if(e instanceof X)return Ws(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n<e.length;n++)r[n]=ht(e[n]);return r}let t={};for(let r in e)t[r]=ht(e[r]);return t}function Ws(e){return new X(e.strings,e.values)}function ht(e){if(typeof e!="object"||e==null||e instanceof be||Qe(e))return e;if(je(e))return new ue(e.toFixed());if(qe(e))return new Date(+e);if(ArrayBuffer.isView(e))return e.slice(0);if(Array.isArray(e)){let t=e.length,r;for(r=Array(t);t--;)r[t]=ht(e[t]);return r}if(typeof e=="object"){let t={};for(let r in e)r==="__proto__"?Object.defineProperty(t,r,{value:ht(e[r]),configurable:!0,enumerable:!0,writable:!0}):t[r]=ht(e[r]);return t}ke(e,"Unknown value")}function Ei(e,t,r,n=0){return e._createPrismaPromise(i=>{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:bi(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ti(o,f),a.args=s,Ei(e,a,r,n+1)}})})}function xi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ei(e,t,s)}function Pi(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?vi(r,n,0,e):e(r)}}function vi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ti(i,f),vi(a,t,r+1,n)}})}var wi=e=>e;function Ti(e=wi,t=wi){return r=>e(t(r))}u();c();m();p();d();l();u();c();m();p();d();l();function Ai(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ks({...e,...Ci(t.name,e,t.result.$allModels),...Ci(t.name,e,t.result[n])})}function Ks(e){let t=new ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function Ci(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Hs(t,o,i)})):{}}function Hs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ri(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Si(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Ht=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=at(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ai(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},zt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Ht(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Ht(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var Oi=ee("prisma:client"),ki={Vercel:"vercel","Netlify CI":"netlify"};function Mi({postinstall:e,ciName:t,clientVersion:r}){if(Oi("checkPlatformCaching:postinstall",e),Oi("checkPlatformCaching:ciName",t),e===!0&&t&&t in ki){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process.
1
+ "use strict";var vo=Object.create;var Ct=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Co=Object.getOwnPropertyNames;var Ao=Object.getPrototypeOf,Ro=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var r in t)Ct(e,r,{get:t[r],enumerable:!0})},Gr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Co(t))!Ro.call(e,i)&&i!==r&&Ct(e,i,{get:()=>t[i],enumerable:!(n=To(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?vo(Ao(e)):{},Gr(t||!e||!e.__esModule?Ct(r,"default",{value:e,enumerable:!0}):r,e)),So=e=>Gr(Ct({},"__esModule",{value:!0}),e);function ur(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Lo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;i<e.length;i++)n.setUint16(i*2,e.charCodeAt(i),!0);return r}if(t==="hex"){let r=new h(e.length/2);for(let n=0,i=0;i<e.length;i+=2,n++)r[n]=parseInt(e.slice(i,i+2),16);return r}Kr(`encoding "${t}"`)}function Oo(e){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,u)=>function(y=0){return $(y,"offset"),Y(y,"offset"),q(y,"offset",this.length-1),new DataView(this.buffer)[r[a]](y,u)},o=(a,u)=>function(y,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Mo[C];return $(T,"offset"),Y(T,"offset"),q(T,"offset",this.length-1),ko(y,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,y,u),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(u=>{u.includes("Uint")&&(e[u.replace("Uint","UInt")]=e[u]),u.includes("Float64")&&(e[u.replace("Float64","Double")]=e[u]),u.includes("Float32")&&(e[u.replace("Float32","Float")]=e[u])})};n.forEach((a,u)=>{a.startsWith("read")&&(e[a]=i(u,!1),e[a+"LE"]=i(u,!0),e[a+"BE"]=i(u,!1)),a.startsWith("write")&&(e[a]=o(u,!1),e[a+"LE"]=o(u,!0),e[a+"BE"]=o(u,!1)),s([a,a+"LE",a+"BE"])})}function Kr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Rt(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=Do+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function ko(e,t,r,n){if(e<r||e>n){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Wr(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Fo(e,t="utf8"){return h.from(e,t)}var h,Mo,Lo,Io,_o,Do,b,cr,c=se(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Wr(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return ur(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return _o.includes(r)}static compare(r,n){Rt(r,"buff1"),Rt(n,"buff2");for(let i=0;i<r.length;i++){if(r[i]<n[i])return-1;if(r[i]>n[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return ur(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o=o*256+i.getUint8(s);return i.getUint8(0)&128&&(o-=Math.pow(256,n)),o}readIntLE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o+=i.getUint8(s)*Math.pow(256,s);return i.getUint8(n-1)&128&&(o-=Math.pow(256,n)),o}readUIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o=o*256+i.getUint8(s);return o}readUintBE(r,n){return this.readUIntBE(r,n)}readUIntLE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s<n;s++)o+=i.getUint8(s)*Math.pow(256,s);return o}readUintLE(r,n){return this.readUIntLE(r,n)}writeIntBE(r,n,i){return r=r<0?r+Math.pow(256,i):r,this.writeUIntBE(r,n,i)}writeIntLE(r,n,i){return r=r<0?r+Math.pow(256,i):r,this.writeUIntLE(r,n,i)}writeUIntBE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=i-1;s>=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;s<i;s++)o.setUint8(s,r&255),r=r/256;return n+i}writeUintLE(r,n,i){return this.writeUIntLE(r,n,i)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=2)r.setUint16(n,r.getUint16(n,!0),!1);return this}swap32(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=4)r.setUint32(n,r.getUint32(n,!0),!1);return this}swap64(){let r=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let n=0;n<this.length;n+=8)r.setBigUint64(n,r.getBigUint64(n,!0),!1);return this}compare(r,n=0,i=r.length,o=0,s=this.length){return Rt(r,"target"),$(n,"targetStart"),$(i,"targetEnd"),$(o,"sourceStart"),$(s,"sourceEnd"),q(n,"targetStart"),q(i,"targetEnd",r.length),q(o,"sourceStart"),q(s,"sourceEnd",this.length),e.compare(this.slice(o,s),r.slice(n,i))}equals(r){return Rt(r,"otherBuffer"),this.length===r.length&&this.every((n,i)=>n===r[i])}copy(r,n=0,i=0,o=this.length){q(n,"targetStart"),q(i,"sourceStart",this.length),q(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i<o&&!(this[i]===void 0||r[n]===void 0);)r[n]=this[i],s++,i++,n++;return s}write(r,n,i,o="utf8"){let s=typeof n=="string"?0:n??0,a=typeof i=="string"?this.length-s:i??this.length-s;return o=typeof n=="string"?n:typeof i=="string"?i:o,$(s,"offset"),$(a,"length"),q(s,"offset",this.length),q(a,"length",this.length),(o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")&&(a=a-a%2),ur(r,o).copy(this,s,0,a)}fill(r=0,n=0,i=this.length,o="utf-8"){let s=typeof n=="string"?0:n,a=typeof i=="string"?this.length:i;if(o=typeof n=="string"?n:typeof i=="string"?i:o,r=e.from(typeof r=="number"?[r]:r??[],o),Wr(o,"encoding"),q(s,"offset",this.length),q(a,"end",this.length),r.length!==0)for(let u=s;u<a;u+=r.length)super.set(r.slice(0,r.length+u>=this.length?this.length-u:r.length),u);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),u=typeof n=="string"?0:n;return u=typeof n=="number"?u:null,u=Number.isNaN(u)?null:u,u??=o?this.length:0,u=u<0?this.length+u:u,a.length===0&&o===!1?u>=this.length?this.length:u:a.length===0&&o===!0?(u>=this.length?this.length:u)||this.length:s((y,T)=>(o?T<=u:T>=u)&&this[T]===a[0]&&a.every((O,R)=>this[T+R]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Io.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+cr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+cr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1<o.byteLength?cr(o.getUint16(a*2,!0)):"").join("")}if(r==="hex")return this.slice(n,i).reduce((o,s)=>o+s.toString(16).padStart(2,"0"),"");Kr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};Mo={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Lo=new TextEncoder,Io=new TextDecoder,_o=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Do=4294967295;Oo(h.prototype);b=new Proxy(Fo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),cr=String.fromCodePoint});var g,m=se(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=se(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=se(()=>{"use strict";E=()=>{};E.prototype=E});var w,f=se(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function Xr(e,t){var r,n,i,o,s,a,u,y,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(u=e.d,y=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=y.length):(n=y,i=s,a=u.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=u.length,o=y.length,a-o<0&&(o=a,n=y,y=u,u=n),r=0;o;)r=(u[--o]=u[o]+y[o]+r)/j|0,u[o]%=j;for(r&&(u.unshift(r),++i),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=i,U?D(t,C):t}function le(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ae+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)n=e[t]+"",r=N-n.length,r&&(o+=we(r)),o+=n;s=e[t],n=s+"",r=N-n.length,r&&(o+=we(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function Zr(e,t){var r,n,i,o,s,a,u=0,y=0,T=e.constructor,C=T.precision;if(V(e)>16)throw Error(pr+V(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),y+=5;for(n=Math.log(Ce(2,y))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++u),s=o.plus(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;y--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function V(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function mr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(re+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function we(e){for(var t="";e--;)t+="0";return t}function Ze(e,t){var r,n,i,o,s,a,u,y,T,C=1,O=10,R=e,M=R.d,S=R.constructor,L=S.precision;if(R.s<1)throw Error(re+(R.s?"NaN":"-Infinity"));if(R.eq(Z))return new S(0);if(t==null?(U=!1,y=L):y=t,R.eq(10))return t==null&&(U=!0),mr(S,y);if(y+=O,S.precision=y,r=ae(M),n=r.charAt(0),o=V(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=ae(R.d),n=r.charAt(0),C++;o=V(R),n>1?(R=new S("0."+r),o++):R=new S(n+"."+r.slice(1))}else return u=mr(S,y+2,L).times(o+""),R=Ze(new S(n+"."+r.slice(1)),y-O).plus(u),S.precision=L,t==null?(U=!0,D(R,L)):R;for(a=s=R=ge(R.minus(Z),R.plus(Z),y),T=D(R.times(R),y),i=3;;){if(s=D(s.times(T),y),u=a.plus(ge(s,new S(i),y)),ae(u.d).slice(0,y)===ae(a.d).slice(0,y))return a=a.times(2),o!==0&&(a=a.plus(mr(S,y+2,L).times(o+""))),a=ge(a,new S(C),y),S.precision=L,t==null?(U=!0,D(a,L)):a;a=u,i+=2}}function Hr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=N;n<i;)e.d.push(+t.slice(n,n+=N));t=t.slice(n),n=N-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),U&&(e.e>St||e.e<-St))throw Error(pr+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,u,y,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,y=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(y=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Ce(10,s-i-1),a=y/o%10|0,u=t<0||C[T+1]!==void 0||y%o,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(n>0?i>0?y/Ce(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=V(e),C.length=1,t=t-o-1,C[0]=Ce(10,(N-t%N)%N),e.e=Fe(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Ce(10,N-n),C[T]=i>0?(y/Ce(10,s-i)%Ce(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>St||e.e<-St))throw Error(pr+V(e));return e}function en(e,t){var r,n,i,o,s,a,u,y,T,C,O=e.constructor,R=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,R):t;if(u=e.d,C=t.d,n=t.e,y=e.e,u=u.slice(),s=y-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=y,a=u.length),i=Math.max(Math.ceil(R/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,a=C.length,T=i<a,T&&(a=i),i=0;i<a;i++)if(u[i]!=C[i]){T=u[i]<C[i];break}s=0}for(T&&(r=u,u=C,C=r,t.s=-t.s),a=u.length,i=C.length-a;i>0;--i)u[a++]=0;for(i=C.length;i>s;){if(u[--i]<C[i]){for(o=i;o&&u[--o]===0;)u[o]=j-1;--u[o],u[i]+=j}u[i]-=C[i]}for(;u[--a]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,U?D(t,R):t):new O(0)}function Re(e,t,r){var n,i=V(e),o=ae(e.d),s=o.length;return t?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+we(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+we(-i-1)+o,r&&(n=r-s)>0&&(o+=we(n))):i>=s?(o+=we(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+we(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=we(n))),e.s<0?"-"+o:o}function zr(e,t){if(e.length>t)return e.length=t,!0}function tn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ae+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Hr(s,o.toString())}else if(typeof o!="string")throw Error(Ae+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Uo.test(o))Hr(s,o);else throw Error(Ae+o)}if(i.prototype=A,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=tn,i.config=i.set=Bo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function Bo(e){if(!e||typeof e!="object")throw Error(re+"Object expected");var t,r,n,i=["precision",1,De,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Fe(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ae+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ae+r+": "+n);return this}var De,No,dr,U,re,Ae,pr,Fe,Ce,Uo,Z,j,N,Yr,St,A,ge,dr,Ot,rn=se(()=>{"use strict";c();m();p();d();f();l();De=1e9,No={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Ae=re+"Invalid argument: ",pr=re+"Exponent out of range: ",Fe=Math.floor,Ce=Math.pow,Uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,Yr=9007199254740991,St=Fe(Yr/N),A={};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};A.comparedTo=A.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};A.decimalPlaces=A.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};A.dividedBy=A.div=function(e){return ge(this,new this.constructor(e))};A.dividedToIntegerBy=A.idiv=function(e){var t=this,r=t.constructor;return D(ge(t,new r(e),0,1),r.precision)};A.equals=A.eq=function(e){return!this.cmp(e)};A.exponent=function(){return V(this)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){return this.cmp(e)>=0};A.isInteger=A.isint=function(){return this.e>this.d.length-2};A.isNegative=A.isneg=function(){return this.s<0};A.isPositive=A.ispos=function(){return this.s>0};A.isZero=function(){return this.s===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(re+"NaN");if(r.s<1)throw Error(re+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ge(Ze(r,o),Ze(e,o),o),U=!0,D(t,i))};A.minus=A.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?en(t,e):Xr(t,(e.s=-e.s,e))};A.modulo=A.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(re+"NaN");return r.s?(U=!1,t=ge(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};A.naturalExponential=A.exp=function(){return Zr(this)};A.naturalLogarithm=A.ln=function(){return Ze(this)};A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};A.plus=A.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Xr(t,e):en(t,(e.s=-e.s,e))};A.precision=A.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ae+e);if(t=V(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};A.squareRoot=A.sqrt=function(){var e,t,r,n,i,o,s,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(re+"NaN")}for(e=V(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=s=r+3;;)if(o=n,n=o.plus(ge(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};A.times=A.mul=function(e){var t,r,n,i,o,s,a,u,y,T=this,C=T.constructor,O=T.d,R=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,u=O.length,y=R.length,u<y&&(o=O,O=R,R=o,s=u,u=y,y=s),o=[],s=u+y,n=s;n--;)o.push(0);for(n=y;--n>=0;){for(t=0,i=u+n;i>n;)a=o[i]+R[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};A.toDecimalPlaces=A.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,De),t===void 0?t=n.rounding:le(t,0,8),D(r,e+V(r)+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Re(n,!0):(le(e,0,De),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=Re(n,!0,e+1)),r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Re(i):(le(e,0,De),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+V(i)+1,t),r=Re(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};A.toInteger=A.toint=function(){var e=this,t=e.constructor;return D(new t(e),V(e)+1,t.rounding)};A.toNumber=function(){return+this};A.toPower=A.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,y=12,T=+(e=new u(e));if(!e.s)return new u(Z);if(a=new u(a),!a.s){if(e.s<1)throw Error(re+"Infinity");return a}if(a.eq(Z))return a;if(n=u.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=Yr){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),zr(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),zr(a.d,t);return U=!0,e.s<0?new u(Z).div(i):D(i,n)}}else if(o<0)throw Error(re+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(Ze(a,n+y)),U=!0,i=Zr(i),i.s=o,i};A.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Re(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,De),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=V(i),n=Re(i,e<=r||r<=o.toExpNeg,e)),n};A.toSignificantDigits=A.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,De),t===void 0?t=n.rounding:le(t,0,8)),D(new n(r),e,t)};A.toString=A.valueOf=A.val=A.toJSON=A[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=V(e),r=e.constructor;return Re(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;a<o;a++)if(n[a]!=i[a]){u=n[a]>i[a]?1:-1;break}return u}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*j+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,u,y,T,C,O,R,M,S,L,ne,z,Le,k,Te,lr,ie,vt,Tt=n.constructor,Po=n.s==i.s?1:-1,oe=n.d,B=i.d;if(!n.s)return new Tt(n);if(!i.s)throw Error(re+"Division by zero");for(u=n.e-i.e,ie=B.length,Te=oe.length,R=new Tt(Po),M=R.d=[],y=0;B[y]==(oe[y]||0);)++y;if(B[y]>(oe[y]||0)&&--u,o==null?z=o=Tt.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Tt(0);if(z=z/N+2|0,y=0,ie==1)for(T=0,B=B[0],z++;(y<Te||T)&&z--;y++)Le=T*j+(oe[y]||0),M[y]=Le/B|0,T=Le%B|0;else{for(T=j/(B[0]+1)|0,T>1&&(B=e(B,T),oe=e(oe,T),ie=B.length,Te=oe.length),k=ie,S=oe.slice(0,ie),L=S.length;L<ie;)S[L++]=0;vt=B.slice(),vt.unshift(0),lr=B[0],B[1]>=j/2&&++lr;do T=0,a=t(B,S,ie,L),a<0?(ne=S[0],ie!=L&&(ne=ne*j+(S[1]||0)),T=ne/lr|0,T>1?(T>=j&&(T=j-1),C=e(B,T),O=C.length,L=S.length,a=t(C,S,O,L),a==1&&(T--,r(C,ie<O?vt:B,O))):(T==0&&(a=T=1),C=B.slice()),O=C.length,O<L&&C.unshift(0),r(S,C,L),a==-1&&(L=S.length,a=t(B,S,ie,L),a<1&&(T++,r(S,ie<L?vt:B,L))),L=S.length):a===0&&(T++,S=[0]),M[y++]=T,a&&S[0]?S[L++]=oe[k]||0:(S=[oe[k]],L=1);while((k++<Te||S[0]!==void 0)&&z--)}return M[0]||M.shift(),R.e=u,D(R,s?o+V(R)+1:o)}}();dr=tn(No);Z=new dr(1);Ot=dr});var v,ue,l=se(()=>{"use strict";rn();v=class extends Ot{static isDecimal(t){return t instanceof Ot}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Ot(`0.${n.slice(0,t)}`)}}},ue=v});function $o(){return!1}var Vo,qo,an,ln=se(()=>{"use strict";c();m();p();d();f();l();Vo={},qo={existsSync:$o,promises:Vo},an=qo});function Ko(...e){return e.join("/")}function Ho(...e){return e.join("/")}var Pn,zo,Yo,tt,vn=se(()=>{"use strict";c();m();p();d();f();l();Pn="/",zo={sep:Pn},Yo={resolve:Ko,posix:zo,join:Ho,sep:Pn},tt=Yo});var It,Cn=se(()=>{"use strict";c();m();p();d();f();l();It=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Rn=Ie((kc,An)=>{"use strict";c();m();p();d();f();l();An.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var kn=Ie((Qc,On)=>{"use strict";c();m();p();d();f();l();On.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ln=Ie((Yc,Mn)=>{"use strict";c();m();p();d();f();l();var ns=kn();Mn.exports=e=>typeof e=="string"?e.replace(ns(),""):e});var Fn=Ie((Rf,as)=>{as.exports={name:"@prisma/engines-version",version:"5.17.0-2.9b8d05f58b90e474495c811c76f88979000107a9",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"9b8d05f58b90e474495c811c76f88979000107a9"},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 Nn=Ie(()=>{"use strict";c();m();p();d();f();l()});var Ur=Ie((PC,Si)=>{"use strict";c();m();p();d();f();l();Si.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,u,y,T,C,O,R,M,S,L,ne,z,Le,k=[];for(u=0;u<i;u++)k.push(u+1),k.push(t.charCodeAt(s+u));for(var Te=k.length-1;a<o-3;)for(L=r.charCodeAt(s+(y=a)),ne=r.charCodeAt(s+(T=a+1)),z=r.charCodeAt(s+(C=a+2)),Le=r.charCodeAt(s+(O=a+3)),R=a+=4,u=0;u<Te;u+=2)M=k[u],S=k[u+1],y=e(M,y,T,L,S),T=e(y,T,C,ne,S),C=e(T,C,O,z,S),R=e(C,O,R,Le,S),k[u]=R,O=C,C=T,T=y,y=M;for(;a<o;)for(L=r.charCodeAt(s+(y=a)),R=++a,u=0;u<Te;u+=2)M=k[u],k[u]=R=e(M,y,R,L,k[u+1]),y=M;return R}}()});var Ga={};At(Ga,{Debug:()=>br,Decimal:()=>ue,Extensions:()=>fr,MetricsClient:()=>Be,NotFoundError:()=>he,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>ye,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>G,Public:()=>gr,Sql:()=>X,defineDmmfProperty:()=>Dn,empty:()=>Bn,getPrismaClient:()=>wo,getRuntime:()=>Pe,join:()=>Un,makeStrictEnum:()=>Eo,objectEnumValues:()=>Ft,raw:()=>Or,sqltag:()=>kr,warnEnvConflicts:()=>void 0,warnOnce:()=>ot});module.exports=So(Ga);c();m();p();d();f();l();var fr={};At(fr,{defineExtension:()=>nn,getExtensionContext:()=>on});c();m();p();d();f();l();c();m();p();d();f();l();function nn(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function on(e){return e}var gr={};At(gr,{validator:()=>sn});c();m();p();d();f();l();c();m();p();d();f();l();function sn(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var hr,un,cn,mn,pn=!0;typeof g<"u"&&({FORCE_COLOR:hr,NODE_DISABLE_COLORS:un,NO_COLOR:cn,TERM:mn}=g.env||{},pn=g.stdout&&g.stdout.isTTY);var jo={enabled:!un&&cn==null&&mn!=="dumb"&&(hr!=null&&hr!=="0"||pn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!jo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Yl=F(0,0),kt=F(1,22),Mt=F(2,22),Xl=F(3,23),dn=F(4,24),Zl=F(7,27),eu=F(8,28),tu=F(9,29),ru=F(30,39),Ne=F(31,39),fn=F(32,39),gn=F(33,39),hn=F(34,39),nu=F(35,39),yn=F(36,39),iu=F(37,39),bn=F(90,39),ou=F(90,39),su=F(40,49),au=F(41,49),lu=F(42,49),uu=F(43,49),cu=F(44,49),mu=F(45,49),pu=F(46,49),du=F(47,49);c();m();p();d();f();l();var Qo=100,wn=["green","yellow","blue","magenta","cyan","red"],Lt=[],En=Date.now(),Jo=0,yr=typeof g<"u"?g.env:{};globalThis.DEBUG??=yr.DEBUG??"";globalThis.DEBUG_COLORS??=yr.DEBUG_COLORS?yr.DEBUG_COLORS==="true":!0;var et={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Go(e){let t={color:wn[Jo++%wn.length],enabled:et.enabled(e),namespace:e,log:et.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Lt.push([o,...n]),Lt.length>Qo&&Lt.shift(),et.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:Wo(T)),y=`+${Date.now()-En}ms`;En=Date.now(),a(o,...u,y)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var br=new Proxy(Go,{get:(e,t)=>et[t],set:(e,t,r)=>et[t]=r});function Wo(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function xn(){Lt.length=0}var ee=br;c();m();p();d();f();l();c();m();p();d();f();l();var wr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];c();m();p();d();f();l();var Tn="library";function rt(e){let t=Xo();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Tn)}function Xo(){let e=g.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}c();m();p();d();f();l();c();m();p();d();f();l();var Se;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Se||={});var it={};At(it,{error:()=>ts,info:()=>es,log:()=>Zo,query:()=>rs,should:()=>Sn,tags:()=>nt,warn:()=>Er});c();m();p();d();f();l();var nt={error:Ne("prisma:error"),warn:gn("prisma:warn"),info:yn("prisma:info"),query:hn("prisma:query")},Sn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Zo(...e){console.log(...e)}function Er(e,...t){Sn.warn()&&console.warn(`${nt.warn} ${e}`,...t)}function es(e,...t){console.info(`${nt.info} ${e}`,...t)}function ts(e,...t){console.error(`${nt.error} ${e}`,...t)}function rs(e,...t){console.log(`${nt.query} ${e}`,...t)}c();m();p();d();f();l();function _t(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}c();m();p();d();f();l();function Oe(e,t){throw new Error(t)}c();m();p();d();f();l();function xr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var Pr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});c();m();p();d();f();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();m();p();d();f();l();function vr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++)t(r,e[n])<0&&(r=e[n]);return r}c();m();p();d();f();l();function K(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();var In=new Set,ot=(e,t,...r)=>{In.has(e)||(In.add(e),Er(t,...r))};c();m();p();d();f();l();var Q=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(Q,"PrismaClientKnownRequestError");var he=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(he,"NotFoundError");c();m();p();d();f();l();var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(I,"PrismaClientInitializationError");c();m();p();d();f();l();var ye=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(ye,"PrismaClientRustPanicError");c();m();p();d();f();l();var J=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(J,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(G,"PrismaClientValidationError");c();m();p();d();f();l();var Be=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};c();m();p();d();f();l();c();m();p();d();f();l();function st(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Dn(e,t){let r=st(()=>is(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function is(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Tr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Dt=Symbol(),Cr=new WeakMap,be=class{constructor(t){t===Dt?Cr.set(this,`Prisma.${this._getName()}`):Cr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Cr.get(this)}},at=class extends be{_getNamespace(){return"NullTypes"}},lt=class extends at{};Ar(lt,"DbNull");var ut=class extends at{};Ar(ut,"JsonNull");var ct=class extends at{};Ar(ct,"AnyNull");var Ft={classes:{DbNull:lt,JsonNull:ut,AnyNull:ct},instances:{DbNull:new lt(Dt),JsonNull:new ut(Dt),AnyNull:new ct(Dt)}};function Ar(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();function mt(e){return{ok:!1,error:e,map(){return mt(e)},flatMap(){return mt(e)}}}var Rr=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Sr=e=>{let t=new Rr,r=ke(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:ke(t,e.queryRaw.bind(e)),executeRaw:ke(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>os(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ss(t,e.getConnectionInfo.bind(e))),n},os=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ke(e,t.queryRaw.bind(t)),executeRaw:ke(e,t.executeRaw.bind(t)),commit:ke(e,t.commit.bind(t)),rollback:ke(e,t.rollback.bind(t))});function ke(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return mt({kind:"GenericJs",id:i})}}}function ss(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return mt({kind:"GenericJs",id:i})}}}var bo=_e(Fn());var aO=_e(Nn());Cn();ln();vn();c();m();p();d();f();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;i<r.length;){let s=r[i++],a=t[i];if(s instanceof e){this.strings[o]+=s.strings[0];let u=0;for(;u<s.values.length;)this.values[o++]=s.values[u++],this.strings[o]=s.strings[u];this.strings[o]+=a}else this.values[o++]=s,this.strings[o]=a}}get sql(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`?${this.strings[r++]}`;return n}get statement(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`:${r}${this.strings[r++]}`;return n}get text(){let t=this.strings.length,r=1,n=this.strings[0];for(;r<t;)n+=`$${r}${this.strings[r++]}`;return n}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Un(e,t=",",r="",n=""){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 X([r,...Array(e.length-1).fill(t),n],e)}function Or(e){return new X([e],[])}var Bn=Or("");function kr(e,...t){return new X(e,t)}c();m();p();d();f();l();c();m();p();d();f();l();function pt(e){return{getKeys(){return Object.keys(e)},getPropertyValue(t){return e[t]}}}c();m();p();d();f();l();function H(e,t){return{getKeys(){return[e]},getPropertyValue(){return t()}}}c();m();p();d();f();l();c();m();p();d();f();l();var ce=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function Me(e){let t=new ce;return{getKeys(){return e.getKeys()},getPropertyValue(r){return t.getOrCreate(r,()=>e.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();m();p();d();f();l();c();m();p();d();f();l();var Nt={enumerable:!0,configurable:!0,writable:!0};function Ut(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Nt,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var $n=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=ls(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Vn(Reflect.ownKeys(o),r),a=Vn(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...Nt,...u?.getPropertyDescriptor(s)}:Nt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[$n]=function(){let o={...this};return delete o[$n],o},i}function ls(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Vn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function $e(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function Bt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();c();m();p();d();f();l();var Ve=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o<r.length;o++)n(r[o],this),o!==i&&this.write(t);return this}writeLine(t){return this.write(t).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let t=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,t?.(),this}withIndent(t){return this.indent(),t(this),this.unindent(),this}afterNextNewline(t){return this.afterNextNewLineCallback=t,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
2
+ `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};c();m();p();d();f();l();c();m();p();d();f();l();function qn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function $t(e){return e.toString()!=="Invalid Date"}c();m();p();d();f();l();l();function je(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();m();p();d();f();l();var dt=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Qe(e){return e instanceof dt}c();m();p();d();f();l();c();m();p();d();f();l();var Vt=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();m();p();d();f();l();var qt=e=>e,jt={bold:qt,red:qt,green:qt,dim:qt,enabled:!1},jn={bold:kt,red:Ne,green:fn,dim:Mt,enabled:!0},Je={write(e){e.writeLine(",")}};c();m();p();d();f();l();var pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();m();p();d();f();l();var Ee=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Ge=class extends Ee{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Vt(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Je,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};c();m();p();d();f();l();var Qn=": ",Qt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Qn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Qn).write(this.value)}};c();m();p();d();f();l();var We=class e extends Ee{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Ge&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Je,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();m();p();d();f();l();var W=class extends Ee{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Mr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(`
3
+ `)}};function Ke(e){return new Mr(Jn(e))}function Jn(e){let t=new We;for(let[r,n]of Object.entries(e)){let i=new Qt(r,Gn(n));t.addField(i)}return t}function Gn(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(je(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return b.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=$t(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof be?new W(`Prisma.${e._getName()}`):Qe(e)?new W(`prisma.${qn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?cs(e):typeof e=="object"?Jn(e):new W(Object.prototype.toString.call(e))}function cs(e){let t=new Ge;for(let r of e)t.addItem(Gn(r));return t}function Jt(e,t){let r=t==="pretty"?jn:jt,n=e.renderAllMessages(r),i=new Ve(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Wn(e){if(e===void 0)return"";let t=Ke(e);return new Ve(0,{colors:jt}).write(t).toString()}c();m();p();d();f();l();var ms="P2037";function Gt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(ps(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ps(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ms&&(r+=`
4
+ Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Lr=class{getLocation(){return null}};function xe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Lr}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Kn={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function He(e={}){let t=fs(e);return Object.entries(t).reduce((n,[i,o])=>(Kn[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function fs(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Wt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Hn(e,t){let r=Wt(e);return t({action:"aggregate",unpacker:r,argsMapper:He})(e)}c();m();p();d();f();l();function gs(e={}){let{select:t,...r}=e;return typeof t=="object"?He({...r,_count:t}):He({...r,_count:{_all:!0}})}function hs(e={}){return typeof e.select=="object"?t=>Wt(e)(t)._count:t=>Wt(e)(t)._count._all}function zn(e,t){return t({action:"count",unpacker:hs(e),argsMapper:gs})(e)}c();m();p();d();f();l();function ys(e={}){let t=He(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function bs(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Yn(e,t){return t({action:"groupBy",unpacker:bs(e),argsMapper:ys})(e)}function Xn(e,t,r){if(t==="aggregate")return n=>Hn(n,r);if(t==="count")return n=>zn(n,r);if(t==="groupBy")return n=>Yn(n,r)}c();m();p();d();f();l();function Zn(e,t){let r=t.fields.filter(i=>!i.relationName),n=Pr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new dt(e,o,s.type,s.isList,s.kind==="enum")},...Ut(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var ei=e=>Array.isArray(e)?e:e.split("."),Ir=(e,t)=>ei(t).reduce((r,n)=>r&&r[n],e),ti=(e,t,r)=>ei(t).reduceRight((n,i,o,s)=>Object.assign({},Ir(e,s.slice(0,o)),{[i]:n}),r);function ws(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Es(e,t,r){return t===void 0?e??{}:ti(t,r,e||!0)}function _r(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,y)=>({...u,[y.name]:y}),{});return u=>{let y=xe(e._errorFormat),T=ws(n,i),C=Es(u,o,T),O=r({dataPath:T,callsite:y})(C),R=xs(e,t);return new Proxy(O,{get(M,S){if(!R.includes(S))return M[S];let ne=[a[S].type,r,S],z=[T,C];return _r(e,...ne,...z)},...Ut([...R,...Object.getOwnPropertyNames(O)])})}}function xs(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}c();m();p();d();f();l();c();m();p();d();f();l();var Ps=_e(Rn());var vs={red:Ne,gray:bn,dim:Mt,bold:kt,underline:dn,highlightSource:e=>e.highlight()},Ts={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Cs({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function As({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Rs(t))),i){a.push("");let y=[i.toString()];o&&(y.push(o),y.push(s.dim(")"))),a.push(y.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
5
+ `)}function Rs(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ze(e){let t=e.showColors?vs:Ts,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Cs(e),As(r,t)}function ri(e,t,r,n){return e===Se.ModelAction.findFirstOrThrow||e===Se.ModelAction.findUniqueOrThrow?Ss(t,r,n):n}function Ss(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ze({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new G(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new he(`No ${e} found`,t):o})}}c();m();p();d();f();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Os=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ks=["aggregate","count","groupBy"];function Dr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Ms(e,t),Is(e,t),pt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Ms(e,t){let r=de(t),n=Object.keys(Se.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=ri(o,t,e._clientVersion,s);let a=u=>y=>{let T=xe(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:y,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...u})})};return Os.includes(o)?_r(e,t,a):Ls(i)?Xn(e,i,a):a({})}}}function Ls(e){return ks.includes(e)}function Is(e,t){return Me(H("fields",()=>{let r=e._runtimeDataModel.models[t];return Zn(t,r)}))}c();m();p();d();f();l();function ni(e){return e.replace(/^./,t=>t.toUpperCase())}var Fr=Symbol();function ft(e){let t=[_s(e),H(Fr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(pt(r)),me(e,t)}function _s(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=ni(i);if(e._runtimeDataModel.models[o]!==void 0)return Dr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Dr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ii(e){return e[Fr]?e[Fr]:e}function oi(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return ft(t)}c();m();p();d();f();l();c();m();p();d();f();l();function si({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let y=u.needs.filter(T=>n[T]);y.length>0&&a.push($e(y))}else if(r){if(!r[u.name])continue;let y=u.needs.filter(T=>!r[T]);y.length>0&&a.push($e(y))}Ds(e,u.needs)&&s.push(Fs(u,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Ds(e,t){return t.every(r=>xr(e,r))}function Fs(e,t){return Me(H(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function Kt({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;s<t.length;s++)t[s]=Kt({result:t[s],args:r,modelName:i,runtimeDataModel:n,visitor:e});return t}let o=e(t,i,r)??t;return r.include&&ai({includeOrSelect:r.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),r.select&&ai({includeOrSelect:r.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),o}function ai({includeOrSelect:e,result:t,parentModelName:r,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(e)){if(!s||t[o]==null)continue;let u=n.models[r].fields.find(T=>T.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let y=typeof s=="object"?s:{};t[o]=Kt({visitor:i,result:t[o],args:y,modelName:u.type,runtimeDataModel:n})}}function li({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kt({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,y)=>{let T=de(u);return si({result:a,modelName:T,select:y.select,omit:y.select?void 0:{...o?.[T],...y.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function ui(e){if(e instanceof X)return Ns(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n<e.length;n++)r[n]=gt(e[n]);return r}let t={};for(let r in e)t[r]=gt(e[r]);return t}function Ns(e){return new X(e.strings,e.values)}function gt(e){if(typeof e!="object"||e==null||e instanceof be||Qe(e))return e;if(je(e))return new ue(e.toFixed());if(qe(e))return new Date(+e);if(ArrayBuffer.isView(e))return e.slice(0);if(Array.isArray(e)){let t=e.length,r;for(r=Array(t);t--;)r[t]=gt(e[t]);return r}if(typeof e=="object"){let t={};for(let r in e)r==="__proto__"?Object.defineProperty(t,r,{value:gt(e[r]),configurable:!0,enumerable:!0,writable:!0}):t[r]=gt(e[r]);return t}Oe(e,"Unknown value")}function mi(e,t,r,n=0){return e._createPrismaPromise(i=>{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ui(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=gi(o,u),a.args=s,mi(e,a,r,n+1)}})})}function pi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return mi(e,t,s)}function di(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?fi(r,n,0,e):e(r)}}function fi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=gi(i,u),fi(a,t,r+1,n)}})}var ci=e=>e;function gi(e=ci,t=ci){return r=>e(t(r))}c();m();p();d();f();l();c();m();p();d();f();l();function yi(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Us({...e,...hi(t.name,e,t.result.$allModels),...hi(t.name,e,t.result[n])})}function Us(e){let t=new ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function hi(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Bs(t,o,i)})):{}}function Bs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function bi(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function wi(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Ht=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=st(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=st(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>yi(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},zt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Ht(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Ht(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();m();p();d();f();l();var Ei=ee("prisma:client"),xi={Vercel:"vercel","Netlify CI":"netlify"};function Pi({postinstall:e,ciName:t,clientVersion:r}){if(Ei("checkPlatformCaching:postinstall",e),Ei("checkPlatformCaching:ciName",t),e===!0&&t&&t in xi){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process.
7
6
 
8
- Learn how: https://pris.ly/d/${ki[t]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function Li(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var zs="Cloudflare-Workers",Ys="node";function Ii(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===zs?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Ys?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Xs={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Pe(){let e=Ii();return{id:e,prettyName:Xs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();m();p();d();l();u();c();m();p();d();l();function Yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Pe().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}.
7
+ Learn how: https://pris.ly/d/${xi[t]}-build`;throw console.error(n),new I(n,r)}}c();m();p();d();f();l();function vi(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var $s="Cloudflare-Workers",Vs="node";function Ti(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===$s?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Vs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var qs={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Pe(){let e=Ti();return{id:e,prettyName:qs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function Yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Pe().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}.
9
8
 
10
9
  In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`.
11
- To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function _i(e){if(e?.kind==="itx")return e.options.id}u();c();m();p();d();l();var $r,Di={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Pe().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);$r===void 0&&($r=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(f.exports),o.QueryEngine})());let i=await $r;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Zs="P2036",fe=ee("prisma:client:libraryEngine");function ea(e){return e.item_type==="query"&&"query"in e}function ta(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var qT=[...Pr,"native"],yt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Di,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(ra(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",ea(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(ta(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){fe(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message}
12
- ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=Bt(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),_i(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:f}=s;if(Array.isArray(a))return a.map(b=>b.errors&&b.errors.length>0?this.loggerRustPanic??this.buildQueryError(b.errors[0]):{data:b,elapsed:0});throw f&&f.length===1?new Error(f[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Gt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Zs&&this.config.adapter){let r=t.meta?.id;_t(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return _t(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function ra(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}u();c();m();p();d();l();var bt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Xt=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(bt,this.config.clientVersion)}metrics(t){throw new I(bt,this.config.clientVersion)}request(t,r){throw new I(bt,this.config.clientVersion)}requestBatch(t,r){throw new I(bt,this.config.clientVersion)}applyPendingMigrations(){throw new I(bt,this.config.clientVersion)}};function Fi({copyEngine:e=!0},t){let r;try{r=Yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&st("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=nt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let f;throw e?r?.startsWith("prisma://")?f=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:f=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:f=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new G(f.join(`
13
- `),{clientVersion:t.clientVersion})}if(o)return new yt(t);if(i)return new Xt(t);{let f=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Pe().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new G(f.join(`
14
- `),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}u();c();m();p();d();l();function Zt({generator:e}){return e?.previewFeatures??[]}u();c();m();p();d();l();u();c();m();p();d();l();function Ye(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();m();p();d();l();u();c();m();p();d();l();var qi=_e(Vr());u();c();m();p();d();l();function $i(e,t,r){let n=Vi(e),i=na(n),o=oa(i);o?er(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Vi(e){return e.errors.flatMap(t=>t.kind==="Union"?Vi(t):[t])}function na(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ia(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ia(e,t){return[...new Set(e.concat(t))]}function oa(e){return Ar(e,(t,r)=>{let n=Ui(t),i=Ui(r);return n!==i?n-i:Bi(t)-Bi(r)})}function Ui(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Bi(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var te=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};u();c();m();p();d();l();var wt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function er(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":sa(e,t);break;case"IncludeOnScalar":aa(e,t);break;case"EmptySelection":la(e,t,r);break;case"UnknownSelectionField":pa(e,t);break;case"UnknownArgument":da(e,t);break;case"UnknownInputField":fa(e,t);break;case"RequiredArgumentMissing":ga(e,t);break;case"InvalidArgumentType":ha(e,t);break;case"InvalidArgumentValue":ya(e,t);break;case"ValueTooLarge":ba(e,t);break;case"SomeFieldsMissing":wa(e,t);break;case"TooManyFieldsGiven":Ea(e,t);break;case"Union":$i(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function sa(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function aa(e,t){let[r,n]=Et(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new te(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${xt(s)}`:a+=".",a+=`
15
- Note that ${s.bold("include")} statements only accept relation fields.`,a})}function la(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ua(e,t,i);return}if(n.hasField("select")){ca(e,t);return}}if(r?.[Ye(e.outputType.name)]){ma(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function ua(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new te(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function ca(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ji(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ma(e,t){let r=new wt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new te("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Et(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new We;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function pa(e,t){let[r,n]=Et(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),f=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Ji(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),xa(a,e.outputType)):f?.hasField(n)&&(o="omit",f.getField(n)?.markAsError(),Pa(f,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(xt(s)),a.join(" ")})}function da(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),va(n,e.arguments)),t.addErrorMessage(i=>ji(i,r,e.arguments.map(o=>o.name)))}function fa(e,t){let[r,n]=Et(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Gi(o,e.inputType)}t.addErrorMessage(o=>ji(o,n,e.inputType.fields.map(s=>s.name)))}function ji(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ca(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(xt(e)),n.join(" ")}function ga(e,t){let r;t.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Et(e.argumentPath),s=new wt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new te(o,s).makeRequired())}else{let f=e.inputTypes.map(Qi).join(" | ");a.addSuggestion(new te(o,f).makeRequired())}}function Qi(e){return e.kind==="list"?`${Qi(e.elementType)}[]`:e.name}function ha(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=tr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function ya(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=tr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ba(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function wa(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Gi(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${tr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(xt(i)),o.join(" ")})}function Ea(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${tr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ji(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function xa(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function Pa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function va(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function Gi(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function Et(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function xt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function tr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ta=3;function Ca(e,t){let r=1/0,n;for(let i of t){let o=(0,qi.default)(e,i);o>Ta||o<r&&(r=o,n=i)}return n}function rr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ke(e);for(let C of t)er(C,a,s);let{message:f,args:b}=Jt(a,r),T=ze({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:b});throw new G(T,{clientVersion:o})}var Aa={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"};function Wi({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i,callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:b,globalOmit:T}){let C=new qr({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:b,globalOmit:T});return{modelName:e,action:Aa[t],query:Pt(r,C)}}function Pt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:Hi(r,n),selection:Ra(e,t,i,n)}}function Ra(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Ma(e,n)):Sa(n,t,r)}function Sa(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Oa(n,t,e),e.isPreviewFeatureOn("omitApi")&&ka(n,r,e),n}function Oa(e,t,r){for(let[n,i]of Object.entries(t)){if(i===!1){e[n]=!1;continue}let o=r.findField(n);if(o&&o.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),o){e[n]=Pt(i===!0?{}:i,r.nestSelection(n));continue}if(i===!0){e[n]=!0;continue}e[n]=Pt(i,r.nestSelection(n))}}function ka(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Si(i,n);for(let[s,a]of Object.entries(o)){let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Ma(e,t){let r={},n=t.getComputedFields(),i=Ri(e,n);for(let[o,s]of Object.entries(i)){let a=t.findField(o);if(!(n?.[o]&&!a)){if(s===!1){r[o]=!1;continue}if(s===!0){a?.kind==="object"?r[o]=Pt({},t.nestSelection(o)):r[o]=!0;continue}r[o]=Pt(s,t.nestSelection(o))}}return r}function Ki(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(qe(e)){if($t(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Qe(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return La(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(Ia(e))return e.values;if(je(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof be){if(e!==Ft.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(_a(e))return e.toJSON();if(typeof e=="object")return Hi(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Hi(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n];i!==void 0&&(r[n]=Ki(i,t.nestArgument(n)))}return r}function La(e,t){let r=[];for(let n=0;n<e.length;n++){let i=t.nestArgument(String(n)),o=e[n];o===void 0&&t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${t.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:"Can not use `undefined` value within array. Use `null` or filter out `undefined` values"}),r.push(Ki(o,i))}return r}function Ia(e){return typeof e=="object"&&e!==null&&e.__prismaRawParameters__===!0}function _a(e){return typeof e=="object"&&e!==null&&typeof e.toJSON=="function"}var qr=class e{constructor(t){this.params=t;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}throwValidationError(t){rr({errors:[t],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(t=>({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName?this.params.globalOmit?.[Ye(this.params.modelName)]??{}:{}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();m();p();d();l();var zi=e=>({command:e});u();c();m();p();d();l();u();c();m();p();d();l();var Yi=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();m();p();d();l();l();function vt(e){try{return Xi(e,"fast")}catch{return Xi(e,"slow")}}function Xi(e,t){return JSON.stringify(e.map(r=>Da(r,t)))}function Da(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qe(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:y.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Fa(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?eo(e):e}function Fa(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function eo(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Zi);let t={};for(let r of Object.keys(e))t[r]=Zi(e[r]);return t}function Zi(e){return typeof e=="bigint"?e.toString():eo(e)}var Na=/^(\s*alter\s)/i,to=ee("prisma:client");function jr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Na.exec(t))throw new Error(`Running ALTER using ${n} is not supported
10
+ To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Ci(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Nr,Ai={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Pe().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Nr===void 0&&(Nr=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},u=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(u.exports),o.QueryEngine})());let i=await Nr;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var js="P2036",fe=ee("prisma:client:libraryEngine");function Qs(e){return e.item_type==="query"&&"query"in e}function Js(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var wT=[...wr,"native"],ht=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Ai,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(Gs(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",Qs(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Js(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){fe(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message}
11
+ ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=Bt(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ci(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(y=>y.errors&&y.errors.length>0?this.loggerRustPanic??this.buildQueryError(y.errors[0]):{data:y,elapsed:0});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Gt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===js&&this.config.adapter){let r=t.meta?.id;_t(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return _t(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Gs(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var yt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Xt=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(yt,this.config.clientVersion)}metrics(t){throw new I(yt,this.config.clientVersion)}request(t,r){throw new I(yt,this.config.clientVersion)}requestBatch(t,r){throw new I(yt,this.config.clientVersion)}applyPendingMigrations(){throw new I(yt,this.config.clientVersion)}};function Ri({copyEngine:e=!0},t){let r;try{r=Yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&ot("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=rt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let u;throw e?r?.startsWith("prisma://")?u=["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."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["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 G(u.join(`
12
+ `),{clientVersion:t.clientVersion})}if(o)return new ht(t);if(i)return new Xt(t);{let u=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Pe().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new G(u.join(`
13
+ `),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function Zt({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();c();m();p();d();f();l();function Ye(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();c();m();p();d();f();l();var Ii=_e(Ur());c();m();p();d();f();l();function Mi(e,t,r){let n=Li(e),i=Ws(n),o=Hs(i);o?er(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Li(e){return e.errors.flatMap(t=>t.kind==="Union"?Li(t):[t])}function Ws(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ks(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ks(e,t){return[...new Set(e.concat(t))]}function Hs(e){return vr(e,(t,r)=>{let n=Oi(t),i=Oi(r);return n!==i?n-i:ki(t)-ki(r)})}function Oi(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ki(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();m();p();d();f();l();var te=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();m();p();d();f();l();var bt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function er(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":zs(e,t);break;case"IncludeOnScalar":Ys(e,t);break;case"EmptySelection":Xs(e,t,r);break;case"UnknownSelectionField":ra(e,t);break;case"UnknownArgument":na(e,t);break;case"UnknownInputField":ia(e,t);break;case"RequiredArgumentMissing":oa(e,t);break;case"InvalidArgumentType":sa(e,t);break;case"InvalidArgumentValue":aa(e,t);break;case"ValueTooLarge":la(e,t);break;case"SomeFieldsMissing":ua(e,t);break;case"TooManyFieldsGiven":ca(e,t);break;case"Union":Mi(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function zs(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ys(e,t){let[r,n]=wt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new te(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Et(s)}`:a+=".",a+=`
14
+ Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Xs(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Zs(e,t,i);return}if(n.hasField("select")){ea(e,t);return}}if(r?.[Ye(e.outputType.name)]){ta(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Zs(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new te(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function ea(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Fi(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Et(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ta(e,t){let r=new bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new te("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=wt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new We;u.addSuggestion(n),a.value=u}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function ra(e,t){let[r,n]=wt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),u=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Fi(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ma(a,e.outputType)):u?.hasField(n)&&(o="omit",u.getField(n)?.markAsError(),pa(u,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Et(s)),a.join(" ")})}function na(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),da(n,e.arguments)),t.addErrorMessage(i=>_i(i,r,e.arguments.map(o=>o.name)))}function ia(e,t){let[r,n]=wt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ni(o,e.inputType)}t.addErrorMessage(o=>_i(o,n,e.inputType.fields.map(s=>s.name)))}function _i(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ga(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Et(e)),n.join(" ")}function oa(e,t){let r;t.addErrorMessage(u=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=wt(e.argumentPath),s=new bt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new te(o,s).makeRequired())}else{let u=e.inputTypes.map(Di).join(" | ");a.addSuggestion(new te(o,u).makeRequired())}}function Di(e){return e.kind==="list"?`${Di(e.elementType)}[]`:e.name}function sa(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=tr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function aa(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=tr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function la(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function ua(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ni(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${tr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Et(i)),o.join(" ")})}function ca(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${tr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Fi(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function ma(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function pa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function da(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function Ni(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function wt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Et({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function tr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var fa=3;function ga(e,t){let r=1/0,n;for(let i of t){let o=(0,Ii.default)(e,i);o>fa||o<r&&(r=o,n=i)}return n}function rr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ke(e);for(let C of t)er(C,a,s);let{message:u,args:y}=Jt(a,r),T=ze({message:u,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:y});throw new G(T,{clientVersion:o})}var ha={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"};function Ui({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i,callsite:o,clientMethod:s,errorFormat:a,clientVersion:u,previewFeatures:y,globalOmit:T}){let C=new Br({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:u,previewFeatures:y,globalOmit:T});return{modelName:e,action:ha[t],query:xt(r,C)}}function xt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:$i(r,n),selection:ya(e,t,i,n)}}function ya(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),xa(e,n)):ba(n,t,r)}function ba(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&wa(n,t,e),e.isPreviewFeatureOn("omitApi")&&Ea(n,r,e),n}function wa(e,t,r){for(let[n,i]of Object.entries(t)){if(i===!1){e[n]=!1;continue}let o=r.findField(n);if(o&&o.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),o){e[n]=xt(i===!0?{}:i,r.nestSelection(n));continue}if(i===!0){e[n]=!0;continue}e[n]=xt(i,r.nestSelection(n))}}function Ea(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=wi(i,n);for(let[s,a]of Object.entries(o)){let u=r.findField(s);n?.[s]&&!u||(e[s]=!a)}}function xa(e,t){let r={},n=t.getComputedFields(),i=bi(e,n);for(let[o,s]of Object.entries(i)){let a=t.findField(o);if(!(n?.[o]&&!a)){if(s===!1){r[o]=!1;continue}if(s===!0){a?.kind==="object"?r[o]=xt({},t.nestSelection(o)):r[o]=!0;continue}r[o]=xt(s,t.nestSelection(o))}}return r}function Bi(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(qe(e)){if($t(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Qe(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Pa(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:b.from(e).toString("base64")};if(va(e))return e.values;if(je(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof be){if(e!==Ft.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Ta(e))return e.toJSON();if(typeof e=="object")return $i(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function $i(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n];i!==void 0&&(r[n]=Bi(i,t.nestArgument(n)))}return r}function Pa(e,t){let r=[];for(let n=0;n<e.length;n++){let i=t.nestArgument(String(n)),o=e[n];o===void 0&&t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${t.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:"Can not use `undefined` value within array. Use `null` or filter out `undefined` values"}),r.push(Bi(o,i))}return r}function va(e){return typeof e=="object"&&e!==null&&e.__prismaRawParameters__===!0}function Ta(e){return typeof e=="object"&&e!==null&&typeof e.toJSON=="function"}var Br=class e{constructor(t){this.params=t;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}throwValidationError(t){rr({errors:[t],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(t=>({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName?this.params.globalOmit?.[Ye(this.params.modelName)]??{}:{}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();m();p();d();f();l();var Vi=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var qi=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function Pt(e){try{return ji(e,"fast")}catch{return ji(e,"slow")}}function ji(e,t){return JSON.stringify(e.map(r=>Ca(r,t)))}function Ca(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qe(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:b.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Aa(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ji(e):e}function Aa(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ji(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Qi);let t={};for(let r of Object.keys(e))t[r]=Qi(e[r]);return t}function Qi(e){return typeof e=="bigint"?e.toString():Ji(e)}var Ra=/^(\s*alter\s)/i,Gi=ee("prisma:client");function $r(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ra.exec(t))throw new Error(`Running ALTER using ${n} is not supported
16
15
  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.
17
16
 
18
17
  Example:
19
18
  await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`)
20
19
 
21
20
  More Information: https://pris.ly/d/execute-raw
22
- `)}var Qr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Yi(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?to(`prisma.${e}(${n}, ${i.values})`):to(`prisma.${e}(${n})`),{query:n,parameters:i}},ro={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},no={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();m();p();d();l();function Jr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=io(r(o)):io(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function io(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();m();p();d();l();var oo={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Gr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??oo}};function so(e){return e.includes("tracing")?new Gr:oo}u();c();m();p();d();l();function ao(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();m();p();d();l();var Ua=["$connect","$disconnect","$on","$transaction","$use","$extends"],lo=Ua;u();c();m();p();d();l();function uo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}u();c();m();p();d();l();var nr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};u();c();m();p();d();l();var mo=_e(Vn());u();c();m();p();d();l();function ir(e){return typeof e.batchRequestIdx=="number"}u();c();m();p();d();l();l();function or(e){return e===null?e:Array.isArray(e)?e.map(or):typeof e=="object"?Ba(e)?$a(e):Ue(e,or):e}function Ba(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function $a({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return y.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:ke(t,"Unknown tagged value")}}u();c();m();p();d();l();function co(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wr(e.query.arguments)),t.push(Wr(e.query.selection)),t.join("")}function Wr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wr(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Va={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 Kr(e){return Va[e]}u();c();m();p();d();l();var sr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<r.length;i++)r[i].reject(n);else for(let i=0;i<r.length;i++){let o=n[i];o instanceof Error?r[i].reject(o):r[i].resolve(o)}}).catch(n=>{for(let i=0;i<r.length;i++)r[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};var qa=ee("prisma:client:request_handler"),ar=class{constructor(t,r){this.logEmitter=r,this.client=t,this.dataloader=new sr({batchLoader:Pi(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),b=n.some(C=>Kr(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:ja(o),containsWrite:b,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?po(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:co(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(qa(t),Qa(t,i)||t instanceof he)throw t;if(t instanceof Q&&Ja(t)){let b=fo(t.meta);rr({args:o,errors:[b],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=ze({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let b=s?{modelName:s,...t.meta}:t.meta;throw new Q(f,{code:t.code,clientVersion:this.client._clientVersion,meta:b,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ye(f,this.client._clientVersion);if(t instanceof J)throw new J(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(f,this.client._clientVersion);if(t instanceof ye)throw new ye(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,mo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=or(Fr(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function ja(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:po(e)};ke(e,"Unknown transaction kind")}}function po(e){return{id:e.id,payload:e.payload}}function Qa(e,t){return ir(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Ja(e){return e.code==="P2009"||e.code==="P2012"}function fo(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(fo)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();m();p();d();l();var go="5.17.0-integration-fix-vitest-edgemw.1";var ho=go;u();c();m();p();d();l();l();function yo(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=bo(t[n]);return r})}function bo({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return y.from(t,"base64");case"decimal":return new ue(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(bo);default:return t}}u();c();m();p();d();l();var vo=_e(Vr());u();c();m();p();d();l();var _=class extends Error{constructor(t){super(t+`
23
- Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(_,"PrismaClientConstructorValidationError");var wo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Eo=["pretty","colorless","minimal"],xo=["info","query","warn","error"],Wa={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Xe(r,t)||` Available datasources: ${t.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor.
21
+ `)}var Vr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=qi(r),i={values:Pt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Gi(`prisma.${e}(${n}, ${i.values})`):Gi(`prisma.${e}(${n})`),{query:n,parameters:i}},Wi={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},Ki={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function qr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Hi(r(o)):Hi(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Hi(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var zi={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},jr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??zi}};function Yi(e){return e.includes("tracing")?new jr:zi}c();m();p();d();f();l();function Xi(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();m();p();d();f();l();var Sa=["$connect","$disconnect","$on","$transaction","$use","$extends"],Zi=Sa;c();m();p();d();f();l();function eo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();m();p();d();f();l();var nr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();m();p();d();f();l();var ro=_e(Ln());c();m();p();d();f();l();function ir(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();l();function or(e){return e===null?e:Array.isArray(e)?e.map(or):typeof e=="object"?Oa(e)?ka(e):Ue(e,or):e}function Oa(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ka({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return b.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:Oe(t,"Unknown tagged value")}}c();m();p();d();f();l();function to(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Qr(e.query.arguments)),t.push(Qr(e.query.selection)),t.join("")}function Qr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Qr(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Ma={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 Jr(e){return Ma[e]}c();m();p();d();f();l();var sr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<r.length;i++)r[i].reject(n);else for(let i=0;i<r.length;i++){let o=n[i];o instanceof Error?r[i].reject(o):r[i].resolve(o)}}).catch(n=>{for(let i=0;i<r.length;i++)r[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};var La=ee("prisma:client:request_handler"),ar=class{constructor(t,r){this.logEmitter=r,this.client=t,this.dataloader=new sr({batchLoader:di(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),y=n.some(C=>Jr(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Ia(o),containsWrite:y,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?no(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:to(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(La(t),_a(t,i)||t instanceof he)throw t;if(t instanceof Q&&Da(t)){let y=io(t.meta);rr({args:o,errors:[y],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=ze({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let y=s?{modelName:s,...t.meta}:t.meta;throw new Q(u,{code:t.code,clientVersion:this.client._clientVersion,meta:y,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ye(u,this.client._clientVersion);if(t instanceof J)throw new J(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(u,this.client._clientVersion);if(t instanceof ye)throw new ye(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ro.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=or(Ir(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Ia(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:no(e)};Oe(e,"Unknown transaction kind")}}function no(e){return{id:e.id,payload:e.payload}}function _a(e,t){return ir(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Da(e){return e.code==="P2009"||e.code==="P2012"}function io(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(io)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var oo="5.17.0-integration-avoid-using-process-in-debug.2";var so=oo;c();m();p();d();f();l();l();function ao(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=lo(t[n]);return r})}function lo({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return b.from(t,"base64");case"decimal":return new ue(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(lo);default:return t}}c();m();p();d();f();l();var fo=_e(Ur());c();m();p();d();f();l();var _=class extends Error{constructor(t){super(t+`
22
+ Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(_,"PrismaClientConstructorValidationError");var uo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],co=["pretty","colorless","minimal"],mo=["info","query","warn","error"],Na={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Xe(r,t)||` Available datasources: ${t.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor.
24
23
  It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor.
25
24
  It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor.
26
- It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Zt(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(nt()==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor.
27
- Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Eo.includes(e)){let t=Xe(e,Eo);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!xo.includes(r)){let n=Xe(r,xo);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Xe(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Ha(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(b=>b.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(za(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Xe(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function To(e,t){for(let[r,n]of Object.entries(e)){if(!wo.includes(r)){let i=Xe(r,wo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Wa[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Xe(e,t){if(t.length===0||typeof e!="string")return"";let r=Ka(e,t);return r?` Did you mean "${r}"?`:""}function Ka(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,vo.default)(e,i)}));r.sort((i,o)=>i.distance<o.distance?-1:1);let n=r[0];return n.distance<3?n.value:null}function Ha(e,t){return Po(t.models,e)??Po(t.types,e)}function Po(e,t){let r=Object.keys(e).find(n=>Ye(n)===t);if(r)return e[r]}function za(e,t){let r=Ke(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Jt(r,"colorless");return`Error validating "omit" option:
25
+ It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Zt(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(rt()==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor.
26
+ Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!co.includes(e)){let t=Xe(e,co);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!mo.includes(r)){let n=Xe(r,mo);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Xe(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Ba(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let u=o.fields.find(y=>y.name===s);if(!u){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(u.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _($a(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Xe(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function go(e,t){for(let[r,n]of Object.entries(e)){if(!uo.includes(r)){let i=Xe(r,uo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Na[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Xe(e,t){if(t.length===0||typeof e!="string")return"";let r=Ua(e,t);return r?` Did you mean "${r}"?`:""}function Ua(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,fo.default)(e,i)}));r.sort((i,o)=>i.distance<o.distance?-1:1);let n=r[0];return n.distance<3?n.value:null}function Ba(e,t){return po(t.models,e)??po(t.types,e)}function po(e,t){let r=Object.keys(e).find(n=>Ye(n)===t);if(r)return e[r]}function $a(e,t){let r=Ke(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Jt(r,"colorless");return`Error validating "omit" option:
28
27
 
29
28
  ${i}
30
29
 
31
- ${n}`}u();c();m();p();d();l();function Co(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=b=>{o||(o=!0,r(b))};for(let b=0;b<e.length;b++)e[b].then(T=>{n[b]=T,a()},T=>{if(!ir(T)){f(T);return}T.batchRequestIdx===b?f(T):(i||(i=T),a())})})}var ve=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Ya={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Xa=Symbol.for("prisma.client.transaction.id"),Za={id:0,nextId(){return++this.id}};function So(e){class t{constructor(n){this._originalClient=this;this._middlewares=new nr;this._createPrismaPromise=Jr();this.$extends=fi;e=n?.__internal?.configOverride?.(e)??e,Mi(e),n&&To(n,e);let i=new It().on("error",()=>{});this._extensions=zt.empty(),this._previewFeatures=Zt(e),this._clientVersion=e.clientVersion??ho,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=so(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Mr(n.adapter);let f=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==f)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},b=f.__internal??{},T=b.debug===!0;T&&ee.enable("prisma:client");let C=rt.resolve(e.dirname,e.relativePath);cn.existsSync(C)||(C=e.dirname),ve("dirname",e.dirname),ve("relativePath",e.relativePath),ve("cwd",C);let O=b.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:rt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&uo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Li(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Yt,getBatchRequestPayload:Bt,prismaGraphQLToJSError:Gt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:Ro.version,clientVersion:e.clientVersion}},ve("clientVersion",e.clientVersion),this._engine=Fi(e,this._engineConfig),this._requestHandler=new ar(this,i),f.log)for(let R of f.log){let M=typeof R=="string"?R:R.emit==="stdout"?R.level:null;M&&this.$on(M,S=>{ot.log(`${ot.tags[M]??""}`,S.message||S.query)})}this._metrics=new Be(this._engine)}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{kn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ao(n,i);return jr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw`<SQL>`":"prisma.$executeRaw(sql`<SQL>`)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(jr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(<SQL>, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:zi,callsite:xe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(yo)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Ao(n,i));throw new G("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Za.nextId(),s=ao(n.length),a=n.map((f,b)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:b,isolationLevel:T,lock:s};return f.requestTransaction?.(C)??f});return Co(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let b={kind:"itx",...a};f=await n(this._createItxClient(b)),await this._engine.transaction("commit",o,a)}catch(b){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),b}return f}_createItxClient(n){return gt(me(di(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>Jr(n)),H(Xa,()=>n.id),$e(lo)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Ya,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async b=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,L=>T(b,ne=>(L?.end(),f(ne))));let{runInTransaction:C,args:O,...R}=b,M={...n,...R};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await xi(this,M);return M.model?yi({result:S,modelName:M.model,args:M.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:b,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:R}){try{n=b?b(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Wi({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(ve("Prisma Client call:"),ve(`prisma.${i}(${ri(n)})`),ve("Generated request:"),ve(JSON.stringify(S,null,2)+`
32
- `)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(M){throw M.clientVersion=this._clientVersion,M}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new G("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Ao(e,t){return el(e)?[new X(e,t),ro]:[e,no]}function el(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();m();p();d();l();var tl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Oo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!tl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce});
30
+ ${n}`}c();m();p();d();f();l();function ho(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=y=>{o||(o=!0,r(y))};for(let y=0;y<e.length;y++)e[y].then(T=>{n[y]=T,a()},T=>{if(!ir(T)){u(T);return}T.batchRequestIdx===y?u(T):(i||(i=T),a())})})}var ve=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Va={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},qa=Symbol.for("prisma.client.transaction.id"),ja={id:0,nextId(){return++this.id}};function wo(e){class t{constructor(n){this._originalClient=this;this._middlewares=new nr;this._createPrismaPromise=qr();this.$extends=oi;e=n?.__internal?.configOverride?.(e)??e,Pi(e),n&&go(n,e);let i=new It().on("error",()=>{});this._extensions=zt.empty(),this._previewFeatures=Zt(e),this._clientVersion=e.clientVersion??so,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Yi(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&tt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&tt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Sr(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${u}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let u=n??{},y=u.__internal??{},T=y.debug===!0;T&&ee.enable("prisma:client");let C=tt.resolve(e.dirname,e.relativePath);an.existsSync(C)||(C=e.dirname),ve("dirname",e.dirname),ve("relativePath",e.relativePath),ve("cwd",C);let O=y.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:tt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&eo(u.log),logQueries:u.log&&!!(typeof u.log=="string"?u.log==="query":u.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:vi(u,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:u.transactionOptions?.maxWait??2e3,timeout:u.transactionOptions?.timeout??5e3,isolationLevel:u.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Yt,getBatchRequestPayload:Bt,prismaGraphQLToJSError:Gt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:bo.version,clientVersion:e.clientVersion}},ve("clientVersion",e.clientVersion),this._engine=Ri(e,this._engineConfig),this._requestHandler=new ar(this,i),u.log)for(let R of u.log){let M=typeof R=="string"?R:R.emit==="stdout"?R.level:null;M&&this.$on(M,S=>{it.log(`${it.tags[M]??""}`,S.message||S.query)})}this._metrics=new Be(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}return this._appliedParent=ft(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{xn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Vr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=yo(n,i);return $r(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw`<SQL>`":"prisma.$executeRaw(sql`<SQL>`)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>($r(this._activeProvider,n,i,"prisma.$executeRawUnsafe(<SQL>, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Vi,callsite:xe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Vr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(ao)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...yo(n,i));throw new G("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ja.nextId(),s=Xi(n.length),a=n.map((u,y)=>{if(u?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:y,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return ho(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let y={kind:"itx",...a};u=await n(this._createItxClient(y)),await this._engine.transaction("commit",o,a)}catch(y){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),y}return u}_createItxClient(n){return ft(me(ii(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>qr(n)),H(qa,()=>n.id),$e(Zi)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Va,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async y=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,L=>T(y,ne=>(L?.end(),u(ne))));let{runInTransaction:C,args:O,...R}=y,M={...n,...R};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await pi(this,M);return M.model?li({result:S,modelName:M.model,args:M.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:y,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:R}){try{n=y?y(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Ui({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(ve("Prisma Client call:"),ve(`prisma.${i}(${Wn(n)})`),ve("Generated request:"),ve(JSON.stringify(S,null,2)+`
31
+ `)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(M){throw M.clientVersion=this._clientVersion,M}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new G("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function yo(e,t){return Qa(e)?[new X(e,t),Wi]:[e,Ki]}function Qa(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var Ja=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Ja.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();m();p();d();f();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce});
33
32
  //# sourceMappingURL=wasm.js.map