prisma 6.7.0-dev.9 → 6.7.0-integration-push-qwtnrmswnvqm.1

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.
Files changed (30) hide show
  1. package/build/index.js +633 -627
  2. package/build/prisma_schema_build_bg.wasm +0 -0
  3. package/build/schema_engine_bg.wasm +0 -0
  4. package/package.json +14 -14
  5. package/prisma-client/generator-build/index.js +11 -11
  6. package/prisma-client/package.json +4 -4
  7. package/prisma-client/runtime/binary.js +4 -4
  8. package/prisma-client/runtime/binary.mjs +4 -4
  9. package/prisma-client/runtime/client.d.mts +3 -3
  10. package/prisma-client/runtime/client.d.ts +3 -3
  11. package/prisma-client/runtime/client.js +31 -31
  12. package/prisma-client/runtime/client.mjs +31 -31
  13. package/prisma-client/runtime/edge-esm.js +17 -17
  14. package/prisma-client/runtime/edge.d.ts +3 -3
  15. package/prisma-client/runtime/edge.js +16 -16
  16. package/prisma-client/runtime/index-browser.d.ts +3 -3
  17. package/prisma-client/runtime/index-browser.js +1 -1
  18. package/prisma-client/runtime/library.d.mts +3 -3
  19. package/prisma-client/runtime/library.d.ts +3 -3
  20. package/prisma-client/runtime/library.js +4 -4
  21. package/prisma-client/runtime/library.mjs +4 -4
  22. package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
  23. package/prisma-client/runtime/query_engine_bg.mysql.mjs +1 -1
  24. package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
  25. package/prisma-client/runtime/query_engine_bg.postgresql.mjs +1 -1
  26. package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
  27. package/prisma-client/runtime/query_engine_bg.sqlite.mjs +1 -1
  28. package/prisma-client/runtime/react-native.d.ts +3 -3
  29. package/prisma-client/runtime/react-native.js +4 -4
  30. package/prisma-client/scripts/default-index.js +3 -3
@@ -5,7 +5,7 @@ import * as __banner_node_url from "node:url";
5
5
  const __filename = __banner_node_url.fileURLToPath(import.meta.url);
6
6
  const __dirname = __banner_node_path.dirname(__filename);
7
7
  const require = __banner_node_module.createRequire(import.meta.url);
8
- var eu=Object.create;var Qn=Object.defineProperty;var ru=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var fr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ro=(e,r)=>()=>(e&&(r=e(e=0)),r);var te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),gr=(e,r)=>{for(var t in r)Qn(e,t,{get:r[t],enumerable:!0})},ou=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of tu(r))!iu.call(e,i)&&i!==t&&Qn(e,i,{get:()=>r[i],enumerable:!(n=ru(r,i))||n.enumerable});return e};var se=(e,r,t)=>(t=e!=null?eu(nu(e)):{},ou(r||!e||!e.__esModule?Qn(t,"default",{value:e,enumerable:!0}):t,e));var ii=te(($g,Xo)=>{"use strict";Xo.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ts=te((qg,rs)=>{"use strict";var vc=fr("node:os"),es=fr("node:tty"),pe=ii(),{env:U}=process,Qe;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?Qe=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(Qe=1);"FORCE_COLOR"in U&&(U.FORCE_COLOR==="true"?Qe=1:U.FORCE_COLOR==="false"?Qe=0:Qe=U.FORCE_COLOR.length===0?1:Math.min(parseInt(U.FORCE_COLOR,10),3));function oi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function si(e,r){if(Qe===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(U.TERM==="dumb")return t;if(process.platform==="win32"){let n=vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in U)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in U)||U.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in U){let n=parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(U.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM)||"COLORTERM"in U?1:t}function Pc(e){let r=si(e,e&&e.isTTY);return oi(r)}rs.exports={supportsColor:Pc,stdout:oi(si(!0,es.isatty(1))),stderr:oi(si(!0,es.isatty(2)))}});var os=te((jg,is)=>{"use strict";var Tc=ts(),Er=ii();function ns(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function ai(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(Er("no-hyperlink")||Er("no-hyperlinks")||Er("hyperlink=false")||Er("hyperlink=never"))return!1;if(Er("hyperlink=true")||Er("hyperlink=always")||n)return!0;if(!Tc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=ns(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=ns(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}is.exports={supportsHyperlink:ai,stdout:ai(process.stdout),stderr:ai(process.stderr)}});var ss=te((Xg,Sc)=>{Sc.exports={name:"@prisma/internals",version:"6.7.0-dev.9",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <suchanek@prisma.io>",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.4.7",esbuild:"0.25.1","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.7.0-5.86e95ba127659d2076fd5a902b2a6f3921fc2d2c","@prisma/schema-engine-wasm":"6.7.0-5.86e95ba127659d2076fd5a902b2a6f3921fc2d2c","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var ci=te((th,Ac)=>{Ac.exports={name:"@prisma/engines-version",version:"6.7.0-5.86e95ba127659d2076fd5a902b2a6f3921fc2d2c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"86e95ba127659d2076fd5a902b2a6f3921fc2d2c"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var pi=te(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.enginesVersion=void 0;Jt.enginesVersion=ci().prisma.enginesVersion});var ds=te((Ph,ps)=>{"use strict";ps.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var hi=te((Rh,gs)=>{"use strict";gs.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Es=te((Ih,bs)=>{"use strict";bs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var wi=te((kh,ws)=>{"use strict";var $c=Es();ws.exports=e=>typeof e=="string"?e.replace($c(),""):e});var xs=te((Lh,qc)=>{qc.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Ss=te((Fh,_e)=>{"use strict";var vi=fr("node:fs"),Pi=fr("node:path"),jc=fr("node:os"),Vc=fr("node:crypto"),Bc=xs(),Ti=Bc.version,Uc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Gc(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,`
8
+ var eu=Object.create;var Qn=Object.defineProperty;var ru=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var fr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ro=(e,r)=>()=>(e&&(r=e(e=0)),r);var te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),gr=(e,r)=>{for(var t in r)Qn(e,t,{get:r[t],enumerable:!0})},ou=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of tu(r))!iu.call(e,i)&&i!==t&&Qn(e,i,{get:()=>r[i],enumerable:!(n=ru(r,i))||n.enumerable});return e};var se=(e,r,t)=>(t=e!=null?eu(nu(e)):{},ou(r||!e||!e.__esModule?Qn(t,"default",{value:e,enumerable:!0}):t,e));var ii=te(($g,Xo)=>{"use strict";Xo.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ts=te((qg,rs)=>{"use strict";var vc=fr("node:os"),es=fr("node:tty"),pe=ii(),{env:U}=process,Qe;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?Qe=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(Qe=1);"FORCE_COLOR"in U&&(U.FORCE_COLOR==="true"?Qe=1:U.FORCE_COLOR==="false"?Qe=0:Qe=U.FORCE_COLOR.length===0?1:Math.min(parseInt(U.FORCE_COLOR,10),3));function oi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function si(e,r){if(Qe===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(U.TERM==="dumb")return t;if(process.platform==="win32"){let n=vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in U)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in U)||U.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in U){let n=parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(U.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM)||"COLORTERM"in U?1:t}function Pc(e){let r=si(e,e&&e.isTTY);return oi(r)}rs.exports={supportsColor:Pc,stdout:oi(si(!0,es.isatty(1))),stderr:oi(si(!0,es.isatty(2)))}});var os=te((jg,is)=>{"use strict";var Tc=ts(),Er=ii();function ns(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function ai(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(Er("no-hyperlink")||Er("no-hyperlinks")||Er("hyperlink=false")||Er("hyperlink=never"))return!1;if(Er("hyperlink=true")||Er("hyperlink=always")||n)return!0;if(!Tc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=ns(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=ns(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}is.exports={supportsHyperlink:ai,stdout:ai(process.stdout),stderr:ai(process.stderr)}});var ss=te((Xg,Sc)=>{Sc.exports={name:"@prisma/internals",version:"6.7.0-integration-push-qwtnrmswnvqm.1",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <suchanek@prisma.io>",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.4.7",esbuild:"0.25.1","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.7.0-22.4c3ddfb7dad39802dcdfa9953a1bdf747a5494fa","@prisma/schema-engine-wasm":"6.7.0-22.4c3ddfb7dad39802dcdfa9953a1bdf747a5494fa","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var ci=te((th,Ac)=>{Ac.exports={name:"@prisma/engines-version",version:"6.7.0-22.4c3ddfb7dad39802dcdfa9953a1bdf747a5494fa",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"4c3ddfb7dad39802dcdfa9953a1bdf747a5494fa"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var pi=te(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.enginesVersion=void 0;Jt.enginesVersion=ci().prisma.enginesVersion});var ds=te((Ph,ps)=>{"use strict";ps.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var hi=te((Rh,gs)=>{"use strict";gs.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Es=te((Ih,bs)=>{"use strict";bs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var wi=te((kh,ws)=>{"use strict";var $c=Es();ws.exports=e=>typeof e=="string"?e.replace($c(),""):e});var xs=te((Lh,qc)=>{qc.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Ss=te((Fh,_e)=>{"use strict";var vi=fr("node:fs"),Pi=fr("node:path"),jc=fr("node:os"),Vc=fr("node:crypto"),Bc=xs(),Ti=Bc.version,Uc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Gc(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,`
9
9
  `);let n;for(;(n=Uc.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
10
10
  `),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function Qc(e){let r=Ts(e),t=V.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Ps(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=Hc(t,a);o=V.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return V.parse(o)}function Wc(e){console.log(`[dotenv@${Ti}][INFO] ${e}`)}function Jc(e){console.log(`[dotenv@${Ti}][WARN] ${e}`)}function zt(e){console.log(`[dotenv@${Ti}][DEBUG] ${e}`)}function Ps(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Hc(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ts(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)vi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Pi.resolve(process.cwd(),".env.vault");return vi.existsSync(r)?r:null}function vs(e){return e[0]==="~"?Pi.join(jc.homedir(),e.slice(1)):e}function Kc(e){Wc("Loading env from encrypted .env.vault");let r=V._parseVault(e),t=process.env;return e&&e.processEnv!=null&&(t=e.processEnv),V.populate(t,r,e),{parsed:r}}function Yc(e){let r=Pi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&zt("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[vs(e.path)];else{i=[];for(let l of e.path)i.push(vs(l))}let o,s={};for(let l of i)try{let u=V.parse(vi.readFileSync(l,{encoding:t}));V.populate(s,u,e)}catch(u){n&&zt(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),V.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function zc(e){if(Ps(e).length===0)return V.configDotenv(e);let r=Ts(e);return r?V._configVault(e):(Jc(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),V.configDotenv(e))}function Zc(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=Vc.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Xc(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&zt(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var V={configDotenv:Yc,_configVault:Kc,_parseVault:Qc,config:zc,decrypt:Zc,parse:Gc,populate:Xc};_e.exports.configDotenv=V.configDotenv;_e.exports._configVault=V._configVault;_e.exports._parseVault=V._parseVault;_e.exports.config=V.config;_e.exports.decrypt=V.decrypt;_e.exports.parse=V.parse;_e.exports.populate=V.populate;_e.exports=V});var Is=te((Gh,Zt)=>{"use strict";Zt.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};Zt.exports.default=Zt.exports});var Fi=te((vb,Ys)=>{"use strict";Ys.exports=function(){function e(r,t,n,i,o){return r<t||n<t?r>n?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&r.charCodeAt(s)===t.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,l,u,c,p,d,f,g,h,I,P,S,b,k=[];for(l=0;l<i;l++)k.push(l+1),k.push(r.charCodeAt(s+l));for(var me=k.length-1;a<o-3;)for(I=t.charCodeAt(s+(u=a)),P=t.charCodeAt(s+(c=a+1)),S=t.charCodeAt(s+(p=a+2)),b=t.charCodeAt(s+(d=a+3)),f=a+=4,l=0;l<me;l+=2)g=k[l],h=k[l+1],u=e(g,u,c,I,h),c=e(u,c,p,P,h),p=e(c,p,d,S,h),f=e(p,d,f,b,h),k[l]=f,d=p,p=c,c=u,u=g;for(;a<o;)for(I=t.charCodeAt(s+(u=a)),f=++a,l=0;l<me;l+=2)g=k[l],k[l]=f=e(g,u,f,I,k[l+1]),u=g;return f}}()});var ra=Ro(()=>{"use strict"});var ta=Ro(()=>{"use strict"});var Io={};gr(Io,{defineExtension:()=>Co,getExtensionContext:()=>Ao});function Co(e){return typeof e=="function"?e:r=>r.$extends(e)}function Ao(e){return e}var Oo={};gr(Oo,{validator:()=>ko});function ko(...e){return r=>r}var Ft={};gr(Ft,{$:()=>Fo,bgBlack:()=>gu,bgBlue:()=>Eu,bgCyan:()=>xu,bgGreen:()=>yu,bgMagenta:()=>wu,bgRed:()=>hu,bgWhite:()=>vu,bgYellow:()=>bu,black:()=>pu,blue:()=>tr,bold:()=>Q,cyan:()=>ke,dim:()=>Ae,gray:()=>Wr,green:()=>qe,grey:()=>fu,hidden:()=>uu,inverse:()=>lu,italic:()=>au,magenta:()=>du,red:()=>ue,reset:()=>su,strikethrough:()=>cu,underline:()=>K,white:()=>mu,yellow:()=>Ie});var Wn,Do,_o,No,Lo=!0;typeof process<"u"&&({FORCE_COLOR:Wn,NODE_DISABLE_COLORS:Do,NO_COLOR:_o,TERM:No}=process.env||{},Lo=process.stdout&&process.stdout.isTTY);var Fo={enabled:!Do&&_o==null&&No!=="dumb"&&(Wn!=null&&Wn!=="0"||Lo)};function N(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Fo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var su=N(0,0),Q=N(1,22),Ae=N(2,22),au=N(3,23),K=N(4,24),lu=N(7,27),uu=N(8,28),cu=N(9,29),pu=N(30,39),ue=N(31,39),qe=N(32,39),Ie=N(33,39),tr=N(34,39),du=N(35,39),ke=N(36,39),mu=N(37,39),Wr=N(90,39),fu=N(90,39),gu=N(40,49),hu=N(41,49),yu=N(42,49),bu=N(43,49),Eu=N(44,49),wu=N(45,49),xu=N(46,49),vu=N(47,49);var Pu=100,Mo=["green","yellow","blue","magenta","cyan","red"],Jr=[],$o=Date.now(),Tu=0,Jn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Jn.DEBUG??"";globalThis.DEBUG_COLORS??=Jn.DEBUG_COLORS?Jn.DEBUG_COLORS==="true":!0;var Hr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Su(e){let r={color:Mo[Tu++%Mo.length],enabled:Hr.enabled(e),namespace:e,log:Hr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Jr.push([o,...n]),Jr.length>Pu&&Jr.shift(),Hr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ru(c)),u=`+${Date.now()-$o}ms`;$o=Date.now(),globalThis.DEBUG_COLORS?a(Ft[s](Q(o)),...l,Ft[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var L=new Proxy(Su,{get:(e,r)=>Hr[r],set:(e,r,t)=>Hr[r]=t});function Ru(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function qo(e=7500){let r=Jr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(`
11
11
  `);return r.length<e?r:r.slice(-e)}function jo(){Jr.length=0}var hr=L;import Cu from"node:fs";function Hn(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&Cu.existsSync(e))&&process.arch==="ia32")throw new Error('The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)')}var Kn=["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"];var Mt="libquery_engine";function $t(e,r){let t=r==="url";return e.includes("windows")?t?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?t?`${Mt}.dylib.node`:`${Mt}-${e}.dylib.node`:t?`${Mt}.so.node`:`${Mt}-${e}.so.node`}import _u from"node:child_process";import Go from"node:fs/promises";import ei from"node:os";var Oe=Symbol.for("@ts-pattern/matcher"),Au=Symbol.for("@ts-pattern/isVariadic"),jt="@ts-pattern/anonymous-select-key",Yn=e=>!!(e&&typeof e=="object"),qt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(qt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(Yn(e)){if(!Yn(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];qt(a)&&a[Au]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.length<n.length+i.length)return!1;let s=r.slice(0,n.length),a=i.length===0?[]:r.slice(-i.length),l=r.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,c)=>Ee(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||qt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return Yn(e)?qt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?Kr(e,Ge):Kr(Object.values(e),Ge):[]},Kr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function ce(e){return Object.assign(e,{optional:()=>Iu(e),and:r=>$(e,r),or:r=>ku(e,r),select:r=>r===void 0?Vo(e):Vo(r,e)})}function Iu(e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function $(...e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Kr(e,Ge),matcherType:"and"})})}function ku(...e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return Kr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Kr(e,Ge),matcherType:"or"})})}function C(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Vo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[Oe]:()=>({match:n=>{let i={[r??jt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??jt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var eg=ce(C(function(e){return!0}));var Be=e=>Object.assign(ce(e),{startsWith:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.endsWith(t)))));var t},minLength:r=>Be($(e,(t=>C(n=>je(n)&&n.length>=t))(r))),length:r=>Be($(e,(t=>C(n=>je(n)&&n.length===t))(r))),maxLength:r=>Be($(e,(t=>C(n=>je(n)&&n.length<=t))(r))),includes:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.includes(t)))));var t},regex:r=>{return Be($(e,(t=r,C(n=>je(n)&&!!n.match(t)))));var t}}),rg=Be(C(je)),be=e=>Object.assign(ce(e),{between:(r,t)=>be($(e,((n,i)=>C(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be($(e,(t=>C(n=>ye(n)&&n<t))(r))),gt:r=>be($(e,(t=>C(n=>ye(n)&&n>t))(r))),lte:r=>be($(e,(t=>C(n=>ye(n)&&n<=t))(r))),gte:r=>be($(e,(t=>C(n=>ye(n)&&n>=t))(r))),int:()=>be($(e,C(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be($(e,C(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be($(e,C(r=>ye(r)&&r>0))),negative:()=>be($(e,C(r=>ye(r)&&r<0)))}),tg=be(C(ye)),Ue=e=>Object.assign(ce(e),{between:(r,t)=>Ue($(e,((n,i)=>C(o=>Ve(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue($(e,(t=>C(n=>Ve(n)&&n<t))(r))),gt:r=>Ue($(e,(t=>C(n=>Ve(n)&&n>t))(r))),lte:r=>Ue($(e,(t=>C(n=>Ve(n)&&n<=t))(r))),gte:r=>Ue($(e,(t=>C(n=>Ve(n)&&n>=t))(r))),positive:()=>Ue($(e,C(r=>Ve(r)&&r>0))),negative:()=>Ue($(e,C(r=>Ve(r)&&r<0)))}),ng=Ue(C(Ve)),ig=ce(C(function(e){return typeof e=="boolean"})),og=ce(C(function(e){return typeof e=="symbol"})),sg=ce(C(function(e){return e==null})),ag=ce(C(function(e){return e!=null}));var zn=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},Zn={matched:!1,value:void 0};function yr(e){return new Xn(e,Zn)}var Xn=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?Zn:{matched:!0,value:t(o?jt in s?s[jt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:Zn)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new zn(this.input)}run(){return this.exhaustive()}returnType(){return this}};import{promisify as Nu}from"node:util";var Ou={warn:Ie("prisma:warn")},Du={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Vt(e,...r){Du.warn()&&console.warn(`${Ou.warn} ${e}`,...r)}var Lu=Nu(_u.exec),z=hr("prisma:get-platform"),Fu=["1.0.x","1.1.x","3.0.x"];async function Qo(){let e=ei.platform(),r=process.arch;if(e==="freebsd"){let s=await Ut("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await $u(),n=await Wu(),i=ju({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await Vu(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function Mu(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=yr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return z(`Found distro info:
@@ -32,7 +32,7 @@ Env vars from ${K(l)} overwrite the ones from ${K(a)}
32
32
  `)}};var id={red:ue,gray:Wr,dim:Ae,bold:Q,underline:K,highlightSource:e=>e.highlight()},od={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function sd({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function ad({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=sd({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=mn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=ud(c),d=ld(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Ks.default)(i,g).slice(g)}}return s}function ld(e){let r=Object.keys(Rr).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function ud(e){let r=0;for(let t=0;t<e.length;t++){if(e.charAt(t)!==" ")return r;r++}return r}function cd({functionName:e,location:r,message:t,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=r?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),r&&a.push(s.underline(pd(r))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(t),a.join(`
33
33
  `)}function pd(e){let r=[e.fileName];return e.lineNumber&&r.push(String(e.lineNumber)),e.columnNumber&&r.push(String(e.columnNumber)),r.join(":")}function fn(e){let r=e.showColors?id:od,t;return t=ad(e,r),cd(t,r)}var ia=se(Fi());function Xs(e,r,t){let n=ea(e),i=dd(n),o=fd(i);o?gn(o,r,t):r.addErrorMessage(()=>"Unknown error")}function ea(e){return e.errors.flatMap(r=>r.kind==="Union"?ea(r):[r])}function dd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:md(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function md(e,r){return[...new Set(e.concat(r))]}function fd(e){return Ii(e,(r,t)=>{let n=zs(r),i=zs(t);return n!==i?n-i:Zs(r)-Zs(t)})}function zs(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function Zs(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ae=class{constructor(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};ta();var Cr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o<t.length;o++)n(t[o],this),o!==i&&this.write(r);return this}writeLine(r){return this.write(r).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let r=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,r?.(),this}withIndent(r){return this.indent(),r(this),this.unindent(),this}afterNextNewline(r){return this.afterNextNewLineCallback=r,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
34
34
  `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ra();var hn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var yn=e=>e,bn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},na={bold:Q,red:ue,green:qe,dim:Ae,enabled:!0},Ar={write(e){e.writeLine(",")}};var Pe=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Ir=class extends ze{items=[];addItem(r){return this.items.push(new hn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new Pe("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ar,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var kr=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Ir&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new Pe("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ar,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var G=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Pe(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var st=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ar,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function gn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":gd(e,r);break;case"IncludeOnScalar":hd(e,r);break;case"EmptySelection":yd(e,r,t);break;case"UnknownSelectionField":xd(e,r);break;case"InvalidSelectionValue":vd(e,r);break;case"UnknownArgument":Pd(e,r);break;case"UnknownInputField":Td(e,r);break;case"RequiredArgumentMissing":Sd(e,r);break;case"InvalidArgumentType":Rd(e,r);break;case"InvalidArgumentValue":Cd(e,r);break;case"ValueTooLarge":Ad(e,r);break;case"SomeFieldsMissing":Id(e,r);break;case"TooManyFieldsGiven":kd(e,r);break;case"Union":Xs(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function gd(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function hd(e,r){let[t,n]=at(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ae(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${lt(s)}`:a+=".",a+=`
35
- Note that ${s.bold("include")} statements only accept relation fields.`,a})}function yd(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){bd(e,r,i);return}if(n.hasField("select")){Ed(e,r);return}}if(t?.[Ye(e.outputType.name)]){wd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function bd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ae(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ed(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),aa(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${lt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function wd(e,r){let t=new st;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ae("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new kr;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function xd(e,r){let t=la(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":aa(n,e.outputType);break;case"include":Od(n,e.outputType);break;case"omit":Dd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(lt(n)),i.join(" ")})}function vd(e,r){let t=la(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function Pd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),_d(n,e.arguments)),r.addErrorMessage(i=>oa(i,t,e.arguments.map(o=>o.name)))}function Td(e,r){let[t,n]=at(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ua(o,e.inputType)}r.addErrorMessage(o=>oa(o,n,e.inputType.fields.map(s=>s.name)))}function oa(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Ld(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(lt(e)),n.join(" ")}function Sd(e,r){let t;r.addErrorMessage(l=>t?.value instanceof G&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new st,a=n.getDeepFieldValue(i)?.asObject();if(a)if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(sa).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function sa(e){return e.kind==="list"?`${sa(e.elementType)}[]`:e.name}function Rd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=En("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Cd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=En("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ad(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Id(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ua(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${En("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(lt(i)),o.join(" ")})}function kd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${En("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function aa(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ae(t.name,"true"))}function Od(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ae(t.name,"true"))}function Dd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ae(t.name,"true"))}function _d(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ae(t.name,t.typeNames.join(" | ")))}function la(e,r){let[t,n]=at(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ua(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ae(t.name,t.typeNames.join(" | ")))}function at(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function lt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function En(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Nd=3;function Ld(e,r){let t=1/0,n;for(let i of r){let o=(0,ia.default)(e,i);o>Nd||o<t&&(t=o,n=i)}return n}var ut=class{modelName;name;typeName;isList;isEnum;constructor(r,t,n,i,o){this.modelName=r,this.name=t,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let r=this.isList?"List":"",t=this.isEnum?"Enum":"";return`${r}${t}${this.typeName}FieldRefInput<${this.modelName}>`}};function Or(e){return e instanceof ut}var wn=Symbol(),$i=new WeakMap,Fe=class{constructor(r){r===wn?$i.set(this,`Prisma.${this._getName()}`):$i.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return $i.get(this)}},ct=class extends Fe{_getNamespace(){return"NullTypes"}},pt=class extends ct{_brand_DbNull};ji(pt,"DbNull");var dt=class extends ct{_brand_JsonNull};ji(dt,"JsonNull");var mt=class extends ct{_brand_AnyNull};ji(mt,"AnyNull");var qi={classes:{DbNull:pt,JsonNull:dt,AnyNull:mt},instances:{DbNull:new pt(wn),JsonNull:new dt(wn),AnyNull:new mt(wn)}};function ji(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ca=": ",xn=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ca.length}write(r){let t=new Pe(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(ca).write(this.value)}};var Vi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(`
35
+ Note that ${s.bold("include")} statements only accept relation fields.`,a})}function yd(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){bd(e,r,i);return}if(n.hasField("select")){Ed(e,r);return}}if(t?.[Ye(e.outputType.name)]){wd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function bd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ae(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ed(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),aa(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${lt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function wd(e,r){let t=new st;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ae("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new kr;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function xd(e,r){let t=la(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":aa(n,e.outputType);break;case"include":Od(n,e.outputType);break;case"omit":Dd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(lt(n)),i.join(" ")})}function vd(e,r){let t=la(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function Pd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),_d(n,e.arguments)),r.addErrorMessage(i=>oa(i,t,e.arguments.map(o=>o.name)))}function Td(e,r){let[t,n]=at(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ua(o,e.inputType)}r.addErrorMessage(o=>oa(o,n,e.inputType.fields.map(s=>s.name)))}function oa(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Ld(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(lt(e)),n.join(" ")}function Sd(e,r){let t;r.addErrorMessage(l=>t?.value instanceof G&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new st,a=n.getDeepFieldValue(i)?.asObject();if(a)if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(sa).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function sa(e){return e.kind==="list"?`${sa(e.elementType)}[]`:e.name}function Rd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=En("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Cd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=En("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ad(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Id(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ua(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${En("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(lt(i)),o.join(" ")})}function kd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${En("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function aa(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ae(t.name,"true"))}function Od(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ae(t.name,"true"))}function Dd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ae(t.name,"true"))}function _d(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ae(t.name,t.typeNames.join(" | ")))}function la(e,r){let[t,n]=at(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ua(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ae(t.name,t.typeNames.join(" | ")))}function at(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function lt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function En(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Nd=3;function Ld(e,r){let t=1/0,n;for(let i of r){let o=(0,ia.default)(e,i);o>Nd||o<t&&(t=o,n=i)}return n}var ut=class{modelName;name;typeName;isList;isEnum;constructor(r,t,n,i,o){this.modelName=r,this.name=t,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let r=this.isList?"List":"",t=this.isEnum?"Enum":"";return`${r}${t}${this.typeName}FieldRefInput<${this.modelName}>`}};function Or(e){return e instanceof ut}var wn=Symbol(),$i=new WeakMap,Fe=class{constructor(r){r===wn?$i.set(this,`Prisma.${this._getName()}`):$i.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return $i.get(this)}},ct=class extends Fe{_getNamespace(){return"NullTypes"}},pt=class extends ct{#e};ji(pt,"DbNull");var dt=class extends ct{#e};ji(dt,"JsonNull");var mt=class extends ct{#e};ji(mt,"AnyNull");var qi={classes:{DbNull:pt,JsonNull:dt,AnyNull:mt},instances:{DbNull:new pt(wn),JsonNull:new dt(wn),AnyNull:new mt(wn)}};function ji(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ca=": ",xn=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ca.length}write(r){let t=new Pe(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(ca).write(this.value)}};var Vi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(`
36
36
  `)}};function Dr(e){return new Vi(pa(e))}function pa(e){let r=new kr;for(let[t,n]of Object.entries(e)){let i=new xn(t,da(n));r.addField(i)}return r}function da(e){if(typeof e=="string")return new G(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new G(String(e));if(typeof e=="bigint")return new G(`${e}n`);if(e===null)return new G("null");if(e===void 0)return new G("undefined");if(Sr(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=cn(e)?e.toISOString():"Invalid Date";return new G(`new Date("${r}")`)}return e instanceof Fe?new G(`Prisma.${e._getName()}`):Or(e)?new G(`prisma.${Ye(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fd(e):typeof e=="object"?pa(e):new G(Object.prototype.toString.call(e))}function Fd(e){let r=new Ir;for(let t of e)r.addItem(da(t));return r}function vn(e,r){let t=r==="pretty"?na:bn,n=e.renderAllMessages(t),i=new Cr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function Pn({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Dr(e);for(let p of r)gn(p,a,s);let{message:l,args:u}=vn(a,t),c=fn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new X(c,{clientVersion:o})}function Te(e){return e.replace(/^./,r=>r.toLowerCase())}function fa(e,r,t){let n=Te(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Md({...e,...ma(r.name,e,r.result.$allModels),...ma(r.name,e,r.result[n])})}function Md(e){let r=new ve,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return xr(e,n=>({...n,needs:t(n.name,new Set)}))}function ma(e,r,t){return t?xr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:$d(r,o,i)})):{}}function $d(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function ga(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function ha(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Tn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new ve;modelExtensionsCache=new ve;queryCallbacksCache=new ve;clientExtensions=ot(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ot(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>fa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Te(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},_r=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Tn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Tn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Sn=class{constructor(r){this.name=r}};function ya(e){return e instanceof Sn}function qd(e){return new Sn(e)}var ba=Symbol(),ft=class{constructor(r){if(r!==ba)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Bi:r}},Bi=new ft(ba);function Se(e){return e instanceof ft}var jd={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ea="explicitly `undefined` values are not allowed";function Gi({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=_r.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Ui({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:jd[r],query:gt(t,p)}}function gt({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:xa(t,n),selection:Vd(e,r,i,n)}}function Vd(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Qd(e,n)):Bd(n,r,t)}function Bd(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&Ud(n,r,e),Gd(n,t,e),n}function Ud(e,r,t){for(let[n,i]of Object.entries(r)){if(Se(i))continue;let o=t.nestSelection(n);if(Qi(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=gt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=gt(i,o)}}function Gd(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=ha(i,n);for(let[s,a]of Object.entries(o)){if(Se(a))continue;Qi(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Qd(e,r){let t={},n=r.getComputedFields(),i=ga(e,n);for(let[o,s]of Object.entries(i)){if(Se(s))continue;let a=r.nestSelection(o);Qi(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Se(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=gt({},a):t[o]=!0;continue}t[o]=gt(s,a)}}return t}function wa(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Tr(e)){if(cn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ya(e))return{$type:"Param",value:e.name};if(Or(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Wd(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(Jd(e))return e.values;if(Sr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Fe){if(e!==qi.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Hd(e))return e.toJSON();if(typeof e=="object")return xa(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function xa(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Se(i)||(i!==void 0?t[n]=wa(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ea}))}return t}function Wd(e,r){let t=[];for(let n=0;n<e.length;n++){let i=r.nestArgument(String(n)),o=e[n];if(o===void 0||Se(o)){let s=o===void 0?"undefined":"Prisma.skip";r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${r.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}t.push(wa(o,i))}return t}function Jd(e){return typeof e=="object"&&e!==null&&e.__prismaRawParameters__===!0}function Hd(e){return typeof e=="object"&&e!==null&&typeof e.toJSON=="function"}function Qi(e,r){e===void 0&&r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidSelectionValue",selectionPath:r.getSelectionPath(),underlyingError:Ea})}var Ui=class e{constructor(r){this.params=r;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}modelOrType;throwValidationError(r){Pn({errors:[r],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(r=>({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ye(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:De(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function va(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var ht=class{_client;constructor(r){this._client=r}prometheus(r){return va(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return va(this._client),this._client._engine.metrics({format:"json",...r})}};function Kd(e,r){let t=ot(()=>Yd(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function Yd(e){return{datamodel:{models:Wi(e.models),enums:Wi(e.enums),types:Wi(e.types)}}}function Wi(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var Ji=new WeakMap,Rn="$$PrismaTypedSql",yt=class{constructor(r,t){Ji.set(this,{sql:r,values:t}),Object.defineProperty(this,Rn,{value:Rn})}get sql(){return Ji.get(this).sql}get values(){return Ji.get(this).values}};function zd(e){return(...r)=>new yt(e,r)}function Cn(e){return e!=null&&e[Rn]===Rn}var Xl=se(ci());import{AsyncResource as kf}from"node:async_hooks";import{EventEmitter as Of}from"node:events";import Df from"node:fs";import So from"node:path";var le=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;i<t.length;){let s=t[i++],a=r[i];if(s instanceof e){this.strings[o]+=s.strings[0];let l=0;for(;l<s.values.length;)this.values[o++]=s.values[l++],this.strings[o]=s.strings[l];this.strings[o]+=a}else this.values[o++]=s,this.strings[o]=a}}get sql(){let r=this.strings.length,t=1,n=this.strings[0];for(;t<r;)n+=`?${this.strings[t++]}`;return n}get statement(){let r=this.strings.length,t=1,n=this.strings[0];for(;t<r;)n+=`:${t}${this.strings[t++]}`;return n}get text(){let r=this.strings.length,t=1,n=this.strings[0];for(;t<r;)n+=`$${t}${this.strings[t++]}`;return n}inspect(){return{sql:this.sql,statement:this.statement,text:this.text,values:this.values}}};function Zd(e,r=",",t="",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 le([t,...Array(e.length-1).fill(r),n],e)}function Pa(e){return new le([e],[])}var Xd=Pa("");function Ta(e,...r){return new le(e,r)}function bt(e){return{getKeys(){return Object.keys(e)},getPropertyValue(r){return e[r]}}}function ee(e,r){return{getKeys(){return[e]},getPropertyValue(){return r()}}}function sr(e){let r=new ve;return{getKeys(){return e.getKeys()},getPropertyValue(t){return r.getOrCreate(t,()=>e.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var An={enumerable:!0,configurable:!0,writable:!0};function In(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>An,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Sa=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=em(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ra(Reflect.ownKeys(o),t),a=Ra(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...An,...l?.getPropertyDescriptor(s)}:An:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Sa]=function(){let o={...this};return delete o[Sa],o},i}function em(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function Ra(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Nr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Lr(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function Ca(e){if(e===void 0)return"";let r=Dr(e);return new Cr(0,{colors:bn}).write(r).toString()}var rm="P2037";function Fr({error:e,user_facing_error:r},t,n){return r.error_code?new Z(tm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new q(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function tm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===rm&&(t+=`
37
37
  Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var Et="<unknown>";function Aa(e){var r=e.split(`
38
38
  `);return r.reduce(function(t,n){var i=om(n)||am(n)||cm(n)||fm(n)||dm(n);return i&&t.push(i),t},[])}var nm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,im=/\((\S*)(?::(\d+))(?::(\d+))\)/;function om(e){var r=nm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=im.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||Et,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var sm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function am(e){var r=sm.exec(e);return r?{file:r[2],methodName:r[1]||Et,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var lm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,um=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function cm(e){var r=lm.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=um.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||Et,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var pm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function dm(e){var r=pm.exec(e);return r?{file:r[3],methodName:r[1]||Et,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var mm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function fm(e){var r=mm.exec(e);return r?{file:r[2],methodName:r[1]||Et,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Hi=class{getLocation(){return null}},Ki=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=Aa(r).find(i=>{if(!i.file)return!1;let o=xi(i.file);return o!=="<anonymous>"&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Hi:new Ki}var Ia={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Mr(e={}){let r=hm(e);return Object.entries(r).reduce((n,[i,o])=>(Ia[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function hm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function kn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function ka(e,r){let t=kn(e);return r({action:"aggregate",unpacker:t,argsMapper:Mr})(e)}function ym(e={}){let{select:r,...t}=e;return typeof r=="object"?Mr({...t,_count:r}):Mr({...t,_count:{_all:!0}})}function bm(e={}){return typeof e.select=="object"?r=>kn(e)(r)._count:r=>kn(e)(r)._count._all}function Oa(e,r){return r({action:"count",unpacker:bm(e),argsMapper:ym})(e)}function Em(e={}){let r=Mr(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function wm(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Da(e,r){return r({action:"groupBy",unpacker:wm(e),argsMapper:Em})(e)}function _a(e,r,t){if(r==="aggregate")return n=>ka(n,t);if(r==="count")return n=>Oa(n,t);if(r==="groupBy")return n=>Da(n,t)}function Na(e,r){let t=r.fields.filter(i=>!i.relationName),n=Qs(t,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new ut(e,o,s.type,s.isList,s.kind==="enum")},...In(Object.keys(n))})}var La=e=>Array.isArray(e)?e:e.split("."),Yi=(e,r)=>La(r).reduce((t,n)=>t&&t[n],e),Fa=(e,r,t)=>La(r).reduceRight((n,i,o,s)=>Object.assign({},Yi(e,s.slice(0,o)),{[i]:n}),t);function xm(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function vm(e,r,t){return r===void 0?e??{}:Fa(r,t,e||!0)}function zi(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=xm(n,i),p=vm(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Pm(e,r);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let P=[a[h].type,t,h],S=[c,p];return zi(e,...P,...S)},...In([...f,...Object.getOwnPropertyNames(d)])})}}function Pm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Tm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Sm=["aggregate","count","groupBy"];function Zi(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[Rm(e,r),Am(e,r),bt(t),ee("name",()=>r),ee("$name",()=>r),ee("$parent",()=>e._appliedParent)];return he({},n)}function Rm(e,r){let t=Te(r),n=Object.keys(Rr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Tm.includes(o)?zi(e,r,s):Cm(i)?_a(e,i,s):s({})}}}function Cm(e){return Sm.includes(e)}function Am(e,r){return sr(ee("fields",()=>{let t=e._runtimeDataModel.models[r];return Na(r,t)}))}function Ma(e){return e.replace(/^./,r=>r.toUpperCase())}var Xi=Symbol();function wt(e){let r=[Im(e),km(e),ee(Xi,()=>e),ee("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(bt(t)),he(e,r)}function Im(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function km(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Te),n=[...new Set(r.concat(t))];return sr({getKeys(){return n},getPropertyValue(i){let o=Ma(i);if(e._runtimeDataModel.models[o]!==void 0)return Zi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Zi(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function $a(e){return e[Xi]?e[Xi]:e}function qa(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return wt(r)}function ja({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(Nr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Nr(u))}Om(e,l.needs)&&s.push(Dm(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Om(e,r){return r.every(t=>Ai(e,t))}function Dm(e,r){return sr(ee(e.name,()=>e.compute(r)))}function On({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;s<r.length;s++)r[s]=On({result:r[s],args:t,modelName:i,runtimeDataModel:n,visitor:e});return r}let o=e(r,i,t)??r;return t.include&&Va({includeOrSelect:t.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),t.select&&Va({includeOrSelect:t.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:e}),o}function Va({includeOrSelect:e,result:r,parentModelName:t,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(e)){if(!s||r[o]==null||Se(s))continue;let l=n.models[t].fields.find(c=>c.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=On({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Ba({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:On({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return ja({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var _m=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ua=_m;function Ga(e){if(e instanceof le)return Nm(e);if(Cn(e))return Lm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n<e.length;n++)t[n]=xt(e[n]);return t}let r={};for(let t in e)r[t]=xt(e[t]);return r}function Nm(e){return new le(e.strings,e.values)}function Lm(e){return new yt(e.sql,e.values)}function xt(e){if(typeof e!="object"||e==null||e instanceof Fe||Or(e))return e;if(Sr(e))return new Le(e.toFixed());if(Tr(e))return new Date(+e);if(ArrayBuffer.isView(e))return e.slice(0);if(Array.isArray(e)){let r=e.length,t;for(t=Array(r);r--;)t[r]=xt(e[r]);return t}if(typeof e=="object"){let r={};for(let t in e)t==="__proto__"?Object.defineProperty(r,t,{value:xt(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=xt(e[t]);return r}De(e,"Unknown value")}function Wa(e,r,t,n=0){return e._createPrismaPromise(i=>{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:Ga(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ya(o,l),a.args=s,Wa(e,a,t,n+1)}})})}function Ja(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return Wa(e,r,s)}function Ha(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?Ka(t,n,0,e):e(t)}}function Ka(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ya(i,l),Ka(a,r,t+1,n)}})}var Qa=e=>e;function Ya(e=Qa,r=Qa){return t=>e(r(t))}var za=L("prisma:client"),Za={Vercel:"vercel","Netlify CI":"netlify"};function Xa({postinstall:e,ciName:r,clientVersion:t}){if(za("checkPlatformCaching:postinstall",e),za("checkPlatformCaching:ciName",r),e===!0&&r&&r in Za){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process.
@@ -114,7 +114,7 @@ ${K(p)}
114
114
  If you want the Prisma team to look into it, please open the link above \u{1F64F}
115
115
  To increase the chance of success, please post your schema and a snippet of
116
116
  how you used Prisma Client in the issue.
117
- `}function to(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function Fn(e){return{ok:!0,value:e,map(r){return Fn(r(e))},flatMap(r){return r(e)}}}function ar(e){return{ok:!1,error:e,map(){return ar(e)},flatMap(){return ar(e)}}}var dl=L("driver-adapter-utils"),no=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var io=(e,r=new no)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:Me(r,e.queryRaw.bind(e)),executeRaw:Me(r,e.executeRaw.bind(e)),executeScript:Me(r,e.executeScript.bind(e)),dispose:Me(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Me(r,e.startTransaction.bind(e))(...n)).map(o=>Km(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Ym(r,e.getConnectionInfo.bind(e))),t},Km=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:Me(e,r.queryRaw.bind(r)),executeRaw:Me(e,r.executeRaw.bind(r)),commit:Me(e,r.commit.bind(r)),rollback:Me(e,r.rollback.bind(r))});function Me(e,r){return async(...t)=>{try{return Fn(await r(...t))}catch(n){if(dl("[error@wrapAsync]",n),to(n))return ar(n.cause);let i=e.registerNewError(n);return ar({kind:"GenericJs",id:i})}}}function Ym(e,r){return(...t)=>{try{return Fn(r(...t))}catch(n){if(dl("[error@wrapSync]",n),to(n))return ar(n.cause);let i=e.registerNewError(n);return ar({kind:"GenericJs",id:i})}}}function $r({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var Mn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Mn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var qr=class extends ie{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(qr,"ForcedRetryError");var lr=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(lr,"InvalidDatasourceError");var ur=class extends ie{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(ur,"NotImplementedYetError");var F=class extends ie{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var cr=class extends F{name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(cr,"SchemaMissingError");var oo="This request could not be understood by the server",vt=class extends F{name="BadRequestError";code="P5000";constructor(r,t,n){super(t||oo,R(r,!1)),n&&(this.code=n)}};x(vt,"BadRequestError");var Pt=class extends F{name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(Pt,"HealthcheckTimeoutError");var Tt=class extends F{name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(Tt,"EngineStartupError");var St=class extends F{name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(St,"EngineVersionNotSupportedError");var so="Request timed out",Rt=class extends F{name="GatewayTimeoutError";code="P5009";constructor(r,t=so){super(t,R(r,!1))}};x(Rt,"GatewayTimeoutError");var zm="Interactive transaction error",Ct=class extends F{name="InteractiveTransactionError";code="P5015";constructor(r,t=zm){super(t,R(r,!1))}};x(Ct,"InteractiveTransactionError");var Zm="Request parameters are invalid",At=class extends F{name="InvalidRequestError";code="P5011";constructor(r,t=Zm){super(t,R(r,!1))}};x(At,"InvalidRequestError");var ao="Requested resource does not exist",It=class extends F{name="NotFoundError";code="P5003";constructor(r,t=ao){super(t,R(r,!1))}};x(It,"NotFoundError");var lo="Unknown server error",jr=class extends F{name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||lo,R(r,!0)),this.logs=n}};x(jr,"ServerError");var uo="Unauthorized, check your connection string",kt=class extends F{name="UnauthorizedError";code="P5007";constructor(r,t=uo){super(t,R(r,!1))}};x(kt,"UnauthorizedError");var co="Usage exceeded, retry again later",Ot=class extends F{name="UsageExceededError";code="P5008";constructor(r,t=co){super(t,R(r,!0))}};x(Ot,"UsageExceededError");async function Xm(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Dt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await Xm(e);if(n.type==="QueryEngineError")throw new Z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new jr(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new cr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new St(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Tt(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Pt(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ct(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new At(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new kt(t,Vr(uo,n));if(e.status===404)return new It(t,Vr(ao,n));if(e.status===429)throw new Ot(t,Vr(co,n));if(e.status===504)throw new Rt(t,Vr(so,n));if(e.status>=500)throw new jr(t,Vr(lo,n));if(e.status>=400)throw new vt(t,Vr(oo,n))}function Vr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function ml(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function fl(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p<o;p=p+3)c=r[p]<<16|r[p+1]<<8|r[p+2],s=(c&16515072)>>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function gl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function ef(e){return e[0]*1e3+e[1]/1e6}function po(e){return new Date(ef(e))}var hl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.7.0-5.86e95ba127659d2076fd5a902b2a6f3921fc2d2c","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var _t=class extends ie{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service:
117
+ `}function to(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function Fn(e){return{ok:!0,value:e,map(r){return Fn(r(e))},flatMap(r){return r(e)}}}function ar(e){return{ok:!1,error:e,map(){return ar(e)},flatMap(){return ar(e)}}}var dl=L("driver-adapter-utils"),no=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var io=(e,r=new no)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:Me(r,e.queryRaw.bind(e)),executeRaw:Me(r,e.executeRaw.bind(e)),executeScript:Me(r,e.executeScript.bind(e)),dispose:Me(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Me(r,e.startTransaction.bind(e))(...n)).map(o=>Km(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Ym(r,e.getConnectionInfo.bind(e))),t},Km=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:Me(e,r.queryRaw.bind(r)),executeRaw:Me(e,r.executeRaw.bind(r)),commit:Me(e,r.commit.bind(r)),rollback:Me(e,r.rollback.bind(r))});function Me(e,r){return async(...t)=>{try{return Fn(await r(...t))}catch(n){if(dl("[error@wrapAsync]",n),to(n))return ar(n.cause);let i=e.registerNewError(n);return ar({kind:"GenericJs",id:i})}}}function Ym(e,r){return(...t)=>{try{return Fn(r(...t))}catch(n){if(dl("[error@wrapSync]",n),to(n))return ar(n.cause);let i=e.registerNewError(n);return ar({kind:"GenericJs",id:i})}}}function $r({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var Mn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Mn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var qr=class extends ie{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(qr,"ForcedRetryError");var lr=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(lr,"InvalidDatasourceError");var ur=class extends ie{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(ur,"NotImplementedYetError");var F=class extends ie{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var cr=class extends F{name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(cr,"SchemaMissingError");var oo="This request could not be understood by the server",vt=class extends F{name="BadRequestError";code="P5000";constructor(r,t,n){super(t||oo,R(r,!1)),n&&(this.code=n)}};x(vt,"BadRequestError");var Pt=class extends F{name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(Pt,"HealthcheckTimeoutError");var Tt=class extends F{name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(Tt,"EngineStartupError");var St=class extends F{name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(St,"EngineVersionNotSupportedError");var so="Request timed out",Rt=class extends F{name="GatewayTimeoutError";code="P5009";constructor(r,t=so){super(t,R(r,!1))}};x(Rt,"GatewayTimeoutError");var zm="Interactive transaction error",Ct=class extends F{name="InteractiveTransactionError";code="P5015";constructor(r,t=zm){super(t,R(r,!1))}};x(Ct,"InteractiveTransactionError");var Zm="Request parameters are invalid",At=class extends F{name="InvalidRequestError";code="P5011";constructor(r,t=Zm){super(t,R(r,!1))}};x(At,"InvalidRequestError");var ao="Requested resource does not exist",It=class extends F{name="NotFoundError";code="P5003";constructor(r,t=ao){super(t,R(r,!1))}};x(It,"NotFoundError");var lo="Unknown server error",jr=class extends F{name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||lo,R(r,!0)),this.logs=n}};x(jr,"ServerError");var uo="Unauthorized, check your connection string",kt=class extends F{name="UnauthorizedError";code="P5007";constructor(r,t=uo){super(t,R(r,!1))}};x(kt,"UnauthorizedError");var co="Usage exceeded, retry again later",Ot=class extends F{name="UsageExceededError";code="P5008";constructor(r,t=co){super(t,R(r,!0))}};x(Ot,"UsageExceededError");async function Xm(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Dt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await Xm(e);if(n.type==="QueryEngineError")throw new Z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new jr(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new cr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new St(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Tt(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Pt(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ct(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new At(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new kt(t,Vr(uo,n));if(e.status===404)return new It(t,Vr(ao,n));if(e.status===429)throw new Ot(t,Vr(co,n));if(e.status===504)throw new Rt(t,Vr(so,n));if(e.status>=500)throw new jr(t,Vr(lo,n));if(e.status>=400)throw new vt(t,Vr(oo,n))}function Vr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function ml(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function fl(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p<o;p=p+3)c=r[p]<<16|r[p+1]<<8|r[p+2],s=(c&16515072)>>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function gl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function ef(e){return e[0]*1e3+e[1]/1e6}function po(e){return new Date(ef(e))}var hl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.7.0-22.4c3ddfb7dad39802dcdfa9953a1bdf747a5494fa","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var _t=class extends ie{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service:
118
118
  ${r}`,R(t,!0))}};x(_t,"RequestError");async function pr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new _t(a,{clientVersion:n,cause:s})}}var tf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,yl=L("prisma:client:dataproxyEngine");async function nf(e,r){let t=hl["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&tf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=of(`<=${a}.${l}.${u}`),p=await pr(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||"<empty body>"}`);let d=await p.text();yl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new ur("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function bl(e,r){let t=await nf(e,r);return yl("version",t),t}function of(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var El=3,$n=L("prisma:client:dataproxyEngine"),mo=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,interactiveTransaction:t}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-transaction-id"]=t.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}},Nt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;constructor(r){gl(r),this.config=r,this.env={...r.env,...typeof process<"u"?process.env:{}},this.inlineSchema=fl(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,t]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new mo({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await bl(r,this.config),$n("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":$n(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:po(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:po(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await pr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||$n("schema response status",t.status);let n=await Dt(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Lr(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await pr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Dt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await pr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Dt(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await pr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Dt(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],n=$r({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new lr(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!==Ht)throw new lr(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r);let l=a.get("api_key");if(l===null||l.length<1)throw new lr(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);return[s,l]}metrics(){throw new ur("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(t>=El)throw i instanceof qr?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${El} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ml(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof cr)throw await this.uploadSchema(),new qr({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?Fr(r[0],this.config.clientVersion,this.config.activeProvider):new q(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function wl(e){if(e?.kind==="itx")return e.options.id}import xl from"node:os";import sf from"node:path";var fo=Symbol("PrismaLibraryEngineCache");function af(){let e=globalThis;return e[fo]===void 0&&(e[fo]={}),e[fo]}function lf(e){let r=af();if(r[e]!==void 0)return r[e];let t=sf.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=xl.constants.dlopen.RTLD_LAZY|xl.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var vl={async loadLibrary(e){let r=await ri(),t=await ol("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>lf(t))}catch(n){let i=mi({e:n,platformInfo:r,id:t});throw new T(i,e.clientVersion)}}};var go,Pl={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new T(`The \`adapter\` option for \`PrismaClient\` is required in this context (${eo().prettyName})`,r);if(n===void 0)throw new T("WASM engine was unexpectedly `undefined`",r);go===void 0&&(go=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new T("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await go;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var uf="P2036",Re=L("prisma:client:libraryEngine");function cf(e){return e.item_type==="query"&&"query"in e}function pf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Tl=[...Kn,"native"],df=0xffffffffffffffffn,ho=1n;function mf(){let e=ho++;return ho>df&&(ho=1n),e}var Br=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??vl,r.engineWasm!==void 0&&(this.libraryLoader=t??Pl),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r)}}withRequestId(r){return async(...t)=>{let n=mf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(ff(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Hn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>nr());if(!Tl.includes(r))throw new T(`Unknown ${ue("PRISMA_QUERY_ENGINE_LIBRARY")} ${ue(Q(r))}. Possible binaryTargets: ${qe(Tl.join(", "))} or a path to the query engine library.
119
119
  You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(io));let t=await this.adapterPromise;t&&Re("Using driver adapter: %O",t),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",cf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):pf(t)?this.loggerRustPanic=new de(yo(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof T)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new de(yo(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new q(`${a.message}
120
120
  ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Lr(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),wl(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new de(yo(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:Fr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===uf&&t){let n=r.meta?.id;Kt(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return Kt(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function ff(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function yo(e,r){return pl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Sl({copyEngine:e=!0},r){let t;try{t=$r({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let n=!!(t?.startsWith("prisma://")||gi(t));e&&n&&Xt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=wr(r.generator),o=n||!e,s=!!r.adapter,a=i==="library",l=i==="binary",u=i==="client";if(o&&s||s&&!1){let c;throw e?t?.startsWith("prisma://")?c=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:c=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:c=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new X(c.join(`
@@ -125,7 +125,7 @@ Example:
125
125
  await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`)
126
126
 
127
127
  More Information: https://pris.ly/d/execute-raw
128
- `)}var Eo=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Cn(t))n=t.sql,i={values:Ur(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Ur(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Ur(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Ur(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Cl(t),i={values:Ur(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Dl(`prisma.${e}(${n}, ${i.values})`):Dl(`prisma.${e}(${n})`),{query:n,parameters:i}},_l={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new le(r,t)}},Nl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function wo(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ll(t(s)):Ll(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ll(e){return typeof e.then=="function"?e:Promise.resolve(e)}var yf=ui.split(".")[0],bf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},xo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${yf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??bf}};function Fl(){return new xo}function Ml(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function $l(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var jn=class{_middlewares=[];use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var jl=se(wi());function Vn(e){return typeof e.batchRequestIdx=="number"}function ql(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(vo(e.query.arguments)),r.push(vo(e.query.selection)),r.join("")}function vo(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${vo(n)})`:t}).join(" ")})`}var Ef={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Po(e){return Ef[e]}var Bn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<t.length;i++)t[i].reject(n);else for(let i=0;i<t.length;i++){let o=n[i];o instanceof Error?t[i].reject(o):t[i].resolve(o)}}).catch(n=>{for(let i=0;i<t.length;i++)t[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function dr(e,r){if(r===null)return r;switch(e){case"bigint":return BigInt(r);case"bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"decimal":return new Le(r);case"datetime":case"date":return new Date(r);case"time":return new Date(`1970-01-01T${r}Z`);case"bigint-array":return r.map(t=>dr("bigint",t));case"bytes-array":return r.map(t=>dr("bytes",t));case"decimal-array":return r.map(t=>dr("decimal",t));case"datetime-array":return r.map(t=>dr("datetime",t));case"date-array":return r.map(t=>dr("date",t));case"time-array":return r.map(t=>dr("time",t));default:return r}}function To(e){let r=[],t=wf(e);for(let n=0;n<e.rows.length;n++){let i=e.rows[n],o={...t};for(let s=0;s<i.length;s++)o[e.columns[s]]=dr(e.types[s],i[s]);r.push(o)}return r}function wf(e){let r={};for(let t=0;t<e.columns.length;t++)r[e.columns[t]]=null;return r}var xf=L("prisma:client:request_handler"),Un=class{client;dataloader;logEmitter;constructor(r,t){this.logEmitter=t,this.client=r,this.dataloader=new Bn({batchLoader:Ha(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Po(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:vf(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Vl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Po(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ql(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(xf(r),Pf(r,i))throw r;if(r instanceof Z&&Tf(r)){let u=Bl(r.meta);Pn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=fn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new Z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new de(l,this.client._clientVersion);if(r instanceof q)throw new q(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof T)throw new T(l,this.client._clientVersion);if(r instanceof de)throw new de(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,jl.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=Yi(o,s),l=i==="queryRaw"?To(a):it(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function vf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Vl(e)};De(e,"Unknown transaction kind")}}function Vl(e){return{id:e.id,payload:e.payload}}function Pf(e,r){return Vn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Tf(e){return e.code==="P2009"||e.code==="P2012"}function Bl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bl)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var Ul="6.7.0-dev.9";var Gl=Ul;var Kl=se(Fi());var O=class extends Error{constructor(r){super(r+`
128
+ `)}var Eo=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Cn(t))n=t.sql,i={values:Ur(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Ur(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Ur(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Ur(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Cl(t),i={values:Ur(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Dl(`prisma.${e}(${n}, ${i.values})`):Dl(`prisma.${e}(${n})`),{query:n,parameters:i}},_l={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new le(r,t)}},Nl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function wo(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ll(t(s)):Ll(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ll(e){return typeof e.then=="function"?e:Promise.resolve(e)}var yf=ui.split(".")[0],bf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},xo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${yf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??bf}};function Fl(){return new xo}function Ml(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function $l(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var jn=class{_middlewares=[];use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var jl=se(wi());function Vn(e){return typeof e.batchRequestIdx=="number"}function ql(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(vo(e.query.arguments)),r.push(vo(e.query.selection)),r.join("")}function vo(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${vo(n)})`:t}).join(" ")})`}var Ef={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Po(e){return Ef[e]}var Bn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<t.length;i++)t[i].reject(n);else for(let i=0;i<t.length;i++){let o=n[i];o instanceof Error?t[i].reject(o):t[i].resolve(o)}}).catch(n=>{for(let i=0;i<t.length;i++)t[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function dr(e,r){if(r===null)return r;switch(e){case"bigint":return BigInt(r);case"bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"decimal":return new Le(r);case"datetime":case"date":return new Date(r);case"time":return new Date(`1970-01-01T${r}Z`);case"bigint-array":return r.map(t=>dr("bigint",t));case"bytes-array":return r.map(t=>dr("bytes",t));case"decimal-array":return r.map(t=>dr("decimal",t));case"datetime-array":return r.map(t=>dr("datetime",t));case"date-array":return r.map(t=>dr("date",t));case"time-array":return r.map(t=>dr("time",t));default:return r}}function To(e){let r=[],t=wf(e);for(let n=0;n<e.rows.length;n++){let i=e.rows[n],o={...t};for(let s=0;s<i.length;s++)o[e.columns[s]]=dr(e.types[s],i[s]);r.push(o)}return r}function wf(e){let r={};for(let t=0;t<e.columns.length;t++)r[e.columns[t]]=null;return r}var xf=L("prisma:client:request_handler"),Un=class{client;dataloader;logEmitter;constructor(r,t){this.logEmitter=t,this.client=r,this.dataloader=new Bn({batchLoader:Ha(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Po(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:vf(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Vl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Po(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ql(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(xf(r),Pf(r,i))throw r;if(r instanceof Z&&Tf(r)){let u=Bl(r.meta);Pn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=fn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new Z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new de(l,this.client._clientVersion);if(r instanceof q)throw new q(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof T)throw new T(l,this.client._clientVersion);if(r instanceof de)throw new de(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,jl.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=Yi(o,s),l=i==="queryRaw"?To(a):it(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function vf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Vl(e)};De(e,"Unknown transaction kind")}}function Vl(e){return{id:e.id,payload:e.payload}}function Pf(e,r){return Vn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Tf(e){return e.code==="P2009"||e.code==="P2012"}function Bl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bl)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var Ul="6.7.0-integration-push-qwtnrmswnvqm.1";var Gl=Ul;var Kl=se(Fi());var O=class extends Error{constructor(r){super(r+`
129
129
  Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(O,"PrismaClientConstructorValidationError");var Ql=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Wl=["pretty","colorless","minimal"],Jl=["info","query","warn","error"],Rf={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new O(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Gr(t,r)||` Available datasources: ${r.join(", ")}`;throw new O(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
130
130
  It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
131
131
  It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new O(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor.
@@ -1,2 +1,2 @@
1
- "use strict";var S=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var B=(e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})},U=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of D(t))!R.call(e,_)&&_!==n&&S(e,_,{get:()=>t[_],enumerable:!(o=k(t,_))||o.enumerable});return e};var L=e=>U(S({},"__esModule",{value:!0}),e);var Et={};B(Et,{QueryEngine:()=>Q,__wbg_String_8f0eb39a4a4c2f66:()=>H,__wbg_buffer_609cc3eee51ed158:()=>J,__wbg_call_672a4d21634d4a24:()=>K,__wbg_call_7cccdd69e0791ae2:()=>X,__wbg_crypto_805be4ce92f1e370:()=>Y,__wbg_done_769e5ede4b31c67b:()=>Z,__wbg_entries_3265d4158b33e5dc:()=>ee,__wbg_getRandomValues_f6a868620c8bab49:()=>te,__wbg_getTime_46267b1c24877e30:()=>ne,__wbg_get_67b2ba62fc30de12:()=>re,__wbg_get_b9b93047fe3cf45b:()=>oe,__wbg_get_ece95cf6585650d9:()=>_e,__wbg_getwithrefkey_1dc361bd10053bfe:()=>ce,__wbg_has_a5ea9117f258a0ec:()=>ie,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:()=>ue,__wbg_instanceof_Map_f3469ce2244d2430:()=>se,__wbg_instanceof_Promise_935168b8f4b49db3:()=>fe,__wbg_instanceof_Uint8Array_17156bcf118086a9:()=>ae,__wbg_isArray_a1eab7e0d067391b:()=>be,__wbg_isSafeInteger_343e2beeeece1bb0:()=>le,__wbg_iterator_9a24c88df860dc65:()=>ge,__wbg_keys_5c77a08ddc2fb8a6:()=>de,__wbg_length_a446193dc22c12f8:()=>we,__wbg_length_e2d2a49132c1b256:()=>pe,__wbg_msCrypto_2ac4d17c4748234a:()=>xe,__wbg_new0_f788a2397c7ca929:()=>ye,__wbg_new_23a2665fac83c611:()=>me,__wbg_new_405e22f390576ce2:()=>he,__wbg_new_5e0be73521bc8c17:()=>Te,__wbg_new_78feb108b6472713:()=>qe,__wbg_new_a12002a7f91c75be:()=>Se,__wbg_newnoargs_105ed471475aaf50:()=>Ae,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:()=>Ie,__wbg_newwithlength_a381634e90c276d4:()=>Ee,__wbg_next_25feadfc0913fea9:()=>Oe,__wbg_next_6574e1a8a62d1055:()=>Fe,__wbg_node_ecc8306b9857f33d:()=>Me,__wbg_now_7fd00a794a07d388:()=>je,__wbg_now_807e54c39636c349:()=>ke,__wbg_now_b3f7572f6ef3d3a9:()=>De,__wbg_process_5cff2739921be718:()=>Re,__wbg_push_737cfc8c1432c2c6:()=>Be,__wbg_queueMicrotask_5a8a9131f3f0b37b:()=>Ue,__wbg_queueMicrotask_6d79674585219521:()=>Le,__wbg_randomFillSync_d3c85af7e31cf1f8:()=>ve,__wbg_require_0c566c6f2eef6c79:()=>Ne,__wbg_resolve_4851785c9c5f573d:()=>$e,__wbg_setTimeout_5d6a1d4fc51ea450:()=>Ce,__wbg_set_37837023f3d740e8:()=>Ve,__wbg_set_3f1d0b984ed272ed:()=>ze,__wbg_set_65595bdd868b3009:()=>We,__wbg_set_8fc6bf8a5b1071d1:()=>Pe,__wbg_set_bb8cecf6a62b9f46:()=>Ge,__wbg_set_wasm:()=>v,__wbg_static_accessor_GLOBAL_88a902d13a557d07:()=>Qe,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:()=>He,__wbg_static_accessor_SELF_37c5d418e4bf5819:()=>Je,__wbg_static_accessor_WINDOW_5de37043a91a9c40:()=>Ke,__wbg_subarray_aa9065fa9dc5df96:()=>Xe,__wbg_then_44b73946d2fb3e7d:()=>Ye,__wbg_then_48b406749878a531:()=>Ze,__wbg_valueOf_7392193dd78c6b97:()=>et,__wbg_value_cd1ffa7b1ab794f1:()=>tt,__wbg_versions_a8e5a362e1f16442:()=>nt,__wbindgen_as_number:()=>rt,__wbindgen_bigint_from_i64:()=>ot,__wbindgen_bigint_from_u64:()=>_t,__wbindgen_bigint_get_as_i64:()=>ct,__wbindgen_boolean_get:()=>it,__wbindgen_cb_drop:()=>ut,__wbindgen_closure_wrapper7501:()=>st,__wbindgen_debug_string:()=>ft,__wbindgen_error_new:()=>at,__wbindgen_in:()=>bt,__wbindgen_init_externref_table:()=>lt,__wbindgen_is_bigint:()=>gt,__wbindgen_is_function:()=>dt,__wbindgen_is_object:()=>wt,__wbindgen_is_string:()=>pt,__wbindgen_is_undefined:()=>xt,__wbindgen_jsval_eq:()=>yt,__wbindgen_jsval_loose_eq:()=>mt,__wbindgen_memory:()=>ht,__wbindgen_number_get:()=>Tt,__wbindgen_number_new:()=>qt,__wbindgen_string_get:()=>St,__wbindgen_string_new:()=>At,__wbindgen_throw:()=>It,debug_panic:()=>W,getBuildTimeInfo:()=>z});module.exports=L(Et);var y=()=>{};y.prototype=y;let r;function v(e){r=e}let s=0,m=null;function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(r.memory.buffer)),m}const N=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let T=new N("utf-8");const $=typeof T.encodeInto=="function"?function(e,t){return T.encodeInto(e,t)}:function(e,t){const n=T.encode(e);return t.set(n),{read:e.length,written:n.length}};function f(e,t,n){if(n===void 0){const u=T.encode(e),a=t(u.length,1)>>>0;return h().subarray(a,a+u.length).set(u),s=u.length,a}let o=e.length,_=t(o,1)>>>0;const i=h();let c=0;for(;c<o;c++){const u=e.charCodeAt(c);if(u>127)break;i[_+c]=u}if(c!==o){c!==0&&(e=e.slice(c)),_=n(_,o,o=c+e.length*3,1)>>>0;const u=h().subarray(_+c,_+o),a=$(e,u);c+=a.written,_=n(_,o,c,1)>>>0}return s=c,_}let w=null;function g(){return(w===null||w.buffer.detached===!0||w.buffer.detached===void 0&&w.buffer!==r.memory.buffer)&&(w=new DataView(r.memory.buffer)),w}function p(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function b(e,t){try{return e.apply(this,t)}catch(n){const o=p(n);r.__wbindgen_exn_store(o)}}const C=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let I=new C("utf-8",{ignoreBOM:!0,fatal:!0});I.decode();function q(e,t){return e=e>>>0,I.decode(h().subarray(e,e+t))}function l(e){return e==null}const E=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{r.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function V(e,t,n,o){const _={a:e,b:t,cnt:1,dtor:n},i=(...c)=>{_.cnt++;const u=_.a;_.a=0;try{return o(u,_.b,...c)}finally{--_.cnt===0?(r.__wbindgen_export_5.get(_.dtor)(u,_.b),E.unregister(_)):_.a=u}};return i.original=_,E.register(i,_,_),i}function A(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const _=e.description;return _==null?"Symbol":`Symbol(${_})`}if(t=="function"){const _=e.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(e)){const _=e.length;let i="[";_>0&&(i+=A(e[0]));for(let c=1;c<_;c++)i+=", "+A(e[c]);return i+="]",i}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let o;if(n&&n.length>1)o=n[1];else return toString.call(e);if(o=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
- ${e.stack}`:o}function O(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function z(){return r.getBuildTimeInfo()}function W(e){var t=l(e)?0:f(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=s;const o=r.debug_panic(t,n);if(o[1])throw O(o[0])}function P(e,t,n){r.closure556_externref_shim(e,t,n)}function G(e,t,n,o){r.closure134_externref_shim(e,t,n,o)}const F=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_queryengine_free(e>>>0,1));class Q{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_queryengine_free(t,0)}constructor(t,n,o){const _=r.queryengine_new(t,n,o);if(_[2])throw O(_[1]);return this.__wbg_ptr=_[0]>>>0,F.register(this,this.__wbg_ptr,this),this}connect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_connect(this.__wbg_ptr,o,_,i,c)}disconnect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_disconnect(this.__wbg_ptr,o,_,i,c)}query(t,n,o,_){const i=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s,u=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),a=s;var d=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),x=s;const M=f(_,r.__wbindgen_malloc,r.__wbindgen_realloc),j=s;return r.queryengine_query(this.__wbg_ptr,i,c,u,a,d,x,M,j)}startTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_startTransaction(this.__wbg_ptr,_,i,c,u,a,d)}commitTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_commitTransaction(this.__wbg_ptr,_,i,c,u,a,d)}rollbackTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_rollbackTransaction(this.__wbg_ptr,_,i,c,u,a,d)}metrics(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_metrics(this.__wbg_ptr,n,o)}trace(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_trace(this.__wbg_ptr,n,o)}}function H(e,t){const n=String(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function J(e){return e.buffer}function K(){return b(function(e,t){return e.call(t)},arguments)}function X(){return b(function(e,t,n){return e.call(t,n)},arguments)}function Y(e){return e.crypto}function Z(e){return e.done}function ee(e){return Object.entries(e)}function te(){return b(function(e,t){e.getRandomValues(t)},arguments)}function ne(e){return e.getTime()}function re(){return b(function(e,t){return Reflect.get(e,t)},arguments)}function oe(e,t){return e[t>>>0]}function _e(){return b(function(e,t){return e[t]},arguments)}function ce(e,t){return e[t]}function ie(){return b(function(e,t){return Reflect.has(e,t)},arguments)}function ue(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function se(e){let t;try{t=e instanceof Map}catch{t=!1}return t}function fe(e){let t;try{t=e instanceof Promise}catch{t=!1}return t}function ae(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function be(e){return Array.isArray(e)}function le(e){return Number.isSafeInteger(e)}function ge(){return Symbol.iterator}function de(e){return Object.keys(e)}function we(e){return e.length}function pe(e){return e.length}function xe(e){return e.msCrypto}function ye(){return new Date}function me(e,t){try{var n={a:e,b:t},o=(i,c)=>{const u=n.a;n.a=0;try{return G(u,n.b,i,c)}finally{n.a=u}};return new Promise(o)}finally{n.a=n.b=0}}function he(){return new Object}function Te(){return new Map}function qe(){return new Array}function Se(e){return new Uint8Array(e)}function Ae(e,t){return new y(q(e,t))}function Ie(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Ee(e){return new Uint8Array(e>>>0)}function Oe(e){return e.next}function Fe(){return b(function(e){return e.next()},arguments)}function Me(e){return e.node}function je(e){return e.now()}function ke(){return Date.now()}function De(){return b(function(){return Date.now()},arguments)}function Re(e){return e.process}function Be(e,t){return e.push(t)}function Ue(e){return e.queueMicrotask}function Le(e){queueMicrotask(e)}function ve(){return b(function(e,t){e.randomFillSync(t)},arguments)}function Ne(){return b(function(){return module.require},arguments)}function $e(e){return Promise.resolve(e)}function Ce(e,t){return setTimeout(e,t>>>0)}function Ve(e,t,n){e[t>>>0]=n}function ze(e,t,n){e[t]=n}function We(e,t,n){e.set(t,n>>>0)}function Pe(e,t,n){return e.set(t,n)}function Ge(){return b(function(e,t,n){return Reflect.set(e,t,n)},arguments)}function Qe(){const e=typeof global>"u"?null:global;return l(e)?0:p(e)}function He(){const e=typeof globalThis>"u"?null:globalThis;return l(e)?0:p(e)}function Je(){const e=typeof self>"u"?null:self;return l(e)?0:p(e)}function Ke(){const e=typeof window>"u"?null:window;return l(e)?0:p(e)}function Xe(e,t,n){return e.subarray(t>>>0,n>>>0)}function Ye(e,t){return e.then(t)}function Ze(e,t,n){return e.then(t,n)}function et(e){return e.valueOf()}function tt(e){return e.value}function nt(e){return e.versions}function rt(e){return+e}function ot(e){return e}function _t(e){return BigInt.asUintN(64,e)}function ct(e,t){const n=t,o=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8*1,l(o)?BigInt(0):o,!0),g().setInt32(e+4*0,!l(o),!0)}function it(e){const t=e;return typeof t=="boolean"?t?1:0:2}function ut(e){const t=e.original;return t.cnt--==1?(t.a=0,!0):!1}function st(e,t,n){return V(e,t,557,P)}function ft(e,t){const n=A(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function at(e,t){return new Error(q(e,t))}function bt(e,t){return e in t}function lt(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function gt(e){return typeof e=="bigint"}function dt(e){return typeof e=="function"}function wt(e){const t=e;return typeof t=="object"&&t!==null}function pt(e){return typeof e=="string"}function xt(e){return e===void 0}function yt(e,t){return e===t}function mt(e,t){return e==t}function ht(){return r.memory}function Tt(e,t){const n=t,o=typeof n=="number"?n:void 0;g().setFloat64(e+8*1,l(o)?0:o,!0),g().setInt32(e+4*0,!l(o),!0)}function qt(e){return e}function St(e,t){const n=t,o=typeof n=="string"?n:void 0;var _=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s;g().setInt32(e+4*1,i,!0),g().setInt32(e+4*0,_,!0)}function At(e,t){return q(e,t)}function It(e,t){throw new Error(q(e,t))}0&&(module.exports={QueryEngine,__wbg_String_8f0eb39a4a4c2f66,__wbg_buffer_609cc3eee51ed158,__wbg_call_672a4d21634d4a24,__wbg_call_7cccdd69e0791ae2,__wbg_crypto_805be4ce92f1e370,__wbg_done_769e5ede4b31c67b,__wbg_entries_3265d4158b33e5dc,__wbg_getRandomValues_f6a868620c8bab49,__wbg_getTime_46267b1c24877e30,__wbg_get_67b2ba62fc30de12,__wbg_get_b9b93047fe3cf45b,__wbg_get_ece95cf6585650d9,__wbg_getwithrefkey_1dc361bd10053bfe,__wbg_has_a5ea9117f258a0ec,__wbg_instanceof_ArrayBuffer_e14585432e3737fc,__wbg_instanceof_Map_f3469ce2244d2430,__wbg_instanceof_Promise_935168b8f4b49db3,__wbg_instanceof_Uint8Array_17156bcf118086a9,__wbg_isArray_a1eab7e0d067391b,__wbg_isSafeInteger_343e2beeeece1bb0,__wbg_iterator_9a24c88df860dc65,__wbg_keys_5c77a08ddc2fb8a6,__wbg_length_a446193dc22c12f8,__wbg_length_e2d2a49132c1b256,__wbg_msCrypto_2ac4d17c4748234a,__wbg_new0_f788a2397c7ca929,__wbg_new_23a2665fac83c611,__wbg_new_405e22f390576ce2,__wbg_new_5e0be73521bc8c17,__wbg_new_78feb108b6472713,__wbg_new_a12002a7f91c75be,__wbg_newnoargs_105ed471475aaf50,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,__wbg_newwithlength_a381634e90c276d4,__wbg_next_25feadfc0913fea9,__wbg_next_6574e1a8a62d1055,__wbg_node_ecc8306b9857f33d,__wbg_now_7fd00a794a07d388,__wbg_now_807e54c39636c349,__wbg_now_b3f7572f6ef3d3a9,__wbg_process_5cff2739921be718,__wbg_push_737cfc8c1432c2c6,__wbg_queueMicrotask_5a8a9131f3f0b37b,__wbg_queueMicrotask_6d79674585219521,__wbg_randomFillSync_d3c85af7e31cf1f8,__wbg_require_0c566c6f2eef6c79,__wbg_resolve_4851785c9c5f573d,__wbg_setTimeout_5d6a1d4fc51ea450,__wbg_set_37837023f3d740e8,__wbg_set_3f1d0b984ed272ed,__wbg_set_65595bdd868b3009,__wbg_set_8fc6bf8a5b1071d1,__wbg_set_bb8cecf6a62b9f46,__wbg_set_wasm,__wbg_static_accessor_GLOBAL_88a902d13a557d07,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,__wbg_static_accessor_SELF_37c5d418e4bf5819,__wbg_static_accessor_WINDOW_5de37043a91a9c40,__wbg_subarray_aa9065fa9dc5df96,__wbg_then_44b73946d2fb3e7d,__wbg_then_48b406749878a531,__wbg_valueOf_7392193dd78c6b97,__wbg_value_cd1ffa7b1ab794f1,__wbg_versions_a8e5a362e1f16442,__wbindgen_as_number,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper7501,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_init_externref_table,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo});
1
+ "use strict";var S=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var B=(e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})},U=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of D(t))!R.call(e,_)&&_!==n&&S(e,_,{get:()=>t[_],enumerable:!(o=k(t,_))||o.enumerable});return e};var L=e=>U(S({},"__esModule",{value:!0}),e);var Et={};B(Et,{QueryEngine:()=>Q,__wbg_String_8f0eb39a4a4c2f66:()=>H,__wbg_buffer_609cc3eee51ed158:()=>J,__wbg_call_672a4d21634d4a24:()=>K,__wbg_call_7cccdd69e0791ae2:()=>X,__wbg_crypto_805be4ce92f1e370:()=>Y,__wbg_done_769e5ede4b31c67b:()=>Z,__wbg_entries_3265d4158b33e5dc:()=>ee,__wbg_getRandomValues_f6a868620c8bab49:()=>te,__wbg_getTime_46267b1c24877e30:()=>ne,__wbg_get_67b2ba62fc30de12:()=>re,__wbg_get_b9b93047fe3cf45b:()=>oe,__wbg_get_ece95cf6585650d9:()=>_e,__wbg_getwithrefkey_1dc361bd10053bfe:()=>ce,__wbg_has_a5ea9117f258a0ec:()=>ie,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:()=>ue,__wbg_instanceof_Map_f3469ce2244d2430:()=>se,__wbg_instanceof_Promise_935168b8f4b49db3:()=>fe,__wbg_instanceof_Uint8Array_17156bcf118086a9:()=>ae,__wbg_isArray_a1eab7e0d067391b:()=>be,__wbg_isSafeInteger_343e2beeeece1bb0:()=>le,__wbg_iterator_9a24c88df860dc65:()=>ge,__wbg_keys_5c77a08ddc2fb8a6:()=>de,__wbg_length_a446193dc22c12f8:()=>we,__wbg_length_e2d2a49132c1b256:()=>pe,__wbg_msCrypto_2ac4d17c4748234a:()=>xe,__wbg_new0_f788a2397c7ca929:()=>ye,__wbg_new_23a2665fac83c611:()=>me,__wbg_new_405e22f390576ce2:()=>he,__wbg_new_5e0be73521bc8c17:()=>Te,__wbg_new_78feb108b6472713:()=>qe,__wbg_new_a12002a7f91c75be:()=>Se,__wbg_newnoargs_105ed471475aaf50:()=>Ae,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:()=>Ie,__wbg_newwithlength_a381634e90c276d4:()=>Ee,__wbg_next_25feadfc0913fea9:()=>Oe,__wbg_next_6574e1a8a62d1055:()=>Fe,__wbg_node_ecc8306b9857f33d:()=>Me,__wbg_now_7fd00a794a07d388:()=>je,__wbg_now_807e54c39636c349:()=>ke,__wbg_now_b3f7572f6ef3d3a9:()=>De,__wbg_process_5cff2739921be718:()=>Re,__wbg_push_737cfc8c1432c2c6:()=>Be,__wbg_queueMicrotask_5a8a9131f3f0b37b:()=>Ue,__wbg_queueMicrotask_6d79674585219521:()=>Le,__wbg_randomFillSync_d3c85af7e31cf1f8:()=>ve,__wbg_require_0c566c6f2eef6c79:()=>Ne,__wbg_resolve_4851785c9c5f573d:()=>$e,__wbg_setTimeout_5d6a1d4fc51ea450:()=>Ce,__wbg_set_37837023f3d740e8:()=>Ve,__wbg_set_3f1d0b984ed272ed:()=>ze,__wbg_set_65595bdd868b3009:()=>We,__wbg_set_8fc6bf8a5b1071d1:()=>Pe,__wbg_set_bb8cecf6a62b9f46:()=>Ge,__wbg_set_wasm:()=>v,__wbg_static_accessor_GLOBAL_88a902d13a557d07:()=>Qe,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:()=>He,__wbg_static_accessor_SELF_37c5d418e4bf5819:()=>Je,__wbg_static_accessor_WINDOW_5de37043a91a9c40:()=>Ke,__wbg_subarray_aa9065fa9dc5df96:()=>Xe,__wbg_then_44b73946d2fb3e7d:()=>Ye,__wbg_then_48b406749878a531:()=>Ze,__wbg_valueOf_7392193dd78c6b97:()=>et,__wbg_value_cd1ffa7b1ab794f1:()=>tt,__wbg_versions_a8e5a362e1f16442:()=>nt,__wbindgen_as_number:()=>rt,__wbindgen_bigint_from_i64:()=>ot,__wbindgen_bigint_from_u64:()=>_t,__wbindgen_bigint_get_as_i64:()=>ct,__wbindgen_boolean_get:()=>it,__wbindgen_cb_drop:()=>ut,__wbindgen_closure_wrapper7495:()=>st,__wbindgen_debug_string:()=>ft,__wbindgen_error_new:()=>at,__wbindgen_in:()=>bt,__wbindgen_init_externref_table:()=>lt,__wbindgen_is_bigint:()=>gt,__wbindgen_is_function:()=>dt,__wbindgen_is_object:()=>wt,__wbindgen_is_string:()=>pt,__wbindgen_is_undefined:()=>xt,__wbindgen_jsval_eq:()=>yt,__wbindgen_jsval_loose_eq:()=>mt,__wbindgen_memory:()=>ht,__wbindgen_number_get:()=>Tt,__wbindgen_number_new:()=>qt,__wbindgen_string_get:()=>St,__wbindgen_string_new:()=>At,__wbindgen_throw:()=>It,debug_panic:()=>W,getBuildTimeInfo:()=>z});module.exports=L(Et);var y=()=>{};y.prototype=y;let r;function v(e){r=e}let s=0,m=null;function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(r.memory.buffer)),m}const N=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let T=new N("utf-8");const $=typeof T.encodeInto=="function"?function(e,t){return T.encodeInto(e,t)}:function(e,t){const n=T.encode(e);return t.set(n),{read:e.length,written:n.length}};function f(e,t,n){if(n===void 0){const u=T.encode(e),a=t(u.length,1)>>>0;return h().subarray(a,a+u.length).set(u),s=u.length,a}let o=e.length,_=t(o,1)>>>0;const i=h();let c=0;for(;c<o;c++){const u=e.charCodeAt(c);if(u>127)break;i[_+c]=u}if(c!==o){c!==0&&(e=e.slice(c)),_=n(_,o,o=c+e.length*3,1)>>>0;const u=h().subarray(_+c,_+o),a=$(e,u);c+=a.written,_=n(_,o,c,1)>>>0}return s=c,_}let w=null;function g(){return(w===null||w.buffer.detached===!0||w.buffer.detached===void 0&&w.buffer!==r.memory.buffer)&&(w=new DataView(r.memory.buffer)),w}function p(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function b(e,t){try{return e.apply(this,t)}catch(n){const o=p(n);r.__wbindgen_exn_store(o)}}const C=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let I=new C("utf-8",{ignoreBOM:!0,fatal:!0});I.decode();function q(e,t){return e=e>>>0,I.decode(h().subarray(e,e+t))}function l(e){return e==null}const E=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{r.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function V(e,t,n,o){const _={a:e,b:t,cnt:1,dtor:n},i=(...c)=>{_.cnt++;const u=_.a;_.a=0;try{return o(u,_.b,...c)}finally{--_.cnt===0?(r.__wbindgen_export_5.get(_.dtor)(u,_.b),E.unregister(_)):_.a=u}};return i.original=_,E.register(i,_,_),i}function A(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const _=e.description;return _==null?"Symbol":`Symbol(${_})`}if(t=="function"){const _=e.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(e)){const _=e.length;let i="[";_>0&&(i+=A(e[0]));for(let c=1;c<_;c++)i+=", "+A(e[c]);return i+="]",i}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let o;if(n&&n.length>1)o=n[1];else return toString.call(e);if(o=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
+ ${e.stack}`:o}function O(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function z(){return r.getBuildTimeInfo()}function W(e){var t=l(e)?0:f(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=s;const o=r.debug_panic(t,n);if(o[1])throw O(o[0])}function P(e,t,n){r.closure556_externref_shim(e,t,n)}function G(e,t,n,o){r.closure134_externref_shim(e,t,n,o)}const F=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_queryengine_free(e>>>0,1));class Q{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_queryengine_free(t,0)}constructor(t,n,o){const _=r.queryengine_new(t,n,o);if(_[2])throw O(_[1]);return this.__wbg_ptr=_[0]>>>0,F.register(this,this.__wbg_ptr,this),this}connect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_connect(this.__wbg_ptr,o,_,i,c)}disconnect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_disconnect(this.__wbg_ptr,o,_,i,c)}query(t,n,o,_){const i=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s,u=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),a=s;var d=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),x=s;const M=f(_,r.__wbindgen_malloc,r.__wbindgen_realloc),j=s;return r.queryengine_query(this.__wbg_ptr,i,c,u,a,d,x,M,j)}startTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_startTransaction(this.__wbg_ptr,_,i,c,u,a,d)}commitTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_commitTransaction(this.__wbg_ptr,_,i,c,u,a,d)}rollbackTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_rollbackTransaction(this.__wbg_ptr,_,i,c,u,a,d)}metrics(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_metrics(this.__wbg_ptr,n,o)}trace(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_trace(this.__wbg_ptr,n,o)}}function H(e,t){const n=String(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function J(e){return e.buffer}function K(){return b(function(e,t){return e.call(t)},arguments)}function X(){return b(function(e,t,n){return e.call(t,n)},arguments)}function Y(e){return e.crypto}function Z(e){return e.done}function ee(e){return Object.entries(e)}function te(){return b(function(e,t){e.getRandomValues(t)},arguments)}function ne(e){return e.getTime()}function re(){return b(function(e,t){return Reflect.get(e,t)},arguments)}function oe(e,t){return e[t>>>0]}function _e(){return b(function(e,t){return e[t]},arguments)}function ce(e,t){return e[t]}function ie(){return b(function(e,t){return Reflect.has(e,t)},arguments)}function ue(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function se(e){let t;try{t=e instanceof Map}catch{t=!1}return t}function fe(e){let t;try{t=e instanceof Promise}catch{t=!1}return t}function ae(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function be(e){return Array.isArray(e)}function le(e){return Number.isSafeInteger(e)}function ge(){return Symbol.iterator}function de(e){return Object.keys(e)}function we(e){return e.length}function pe(e){return e.length}function xe(e){return e.msCrypto}function ye(){return new Date}function me(e,t){try{var n={a:e,b:t},o=(i,c)=>{const u=n.a;n.a=0;try{return G(u,n.b,i,c)}finally{n.a=u}};return new Promise(o)}finally{n.a=n.b=0}}function he(){return new Object}function Te(){return new Map}function qe(){return new Array}function Se(e){return new Uint8Array(e)}function Ae(e,t){return new y(q(e,t))}function Ie(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Ee(e){return new Uint8Array(e>>>0)}function Oe(e){return e.next}function Fe(){return b(function(e){return e.next()},arguments)}function Me(e){return e.node}function je(e){return e.now()}function ke(){return Date.now()}function De(){return b(function(){return Date.now()},arguments)}function Re(e){return e.process}function Be(e,t){return e.push(t)}function Ue(e){return e.queueMicrotask}function Le(e){queueMicrotask(e)}function ve(){return b(function(e,t){e.randomFillSync(t)},arguments)}function Ne(){return b(function(){return module.require},arguments)}function $e(e){return Promise.resolve(e)}function Ce(e,t){return setTimeout(e,t>>>0)}function Ve(e,t,n){e[t>>>0]=n}function ze(e,t,n){e[t]=n}function We(e,t,n){e.set(t,n>>>0)}function Pe(e,t,n){return e.set(t,n)}function Ge(){return b(function(e,t,n){return Reflect.set(e,t,n)},arguments)}function Qe(){const e=typeof global>"u"?null:global;return l(e)?0:p(e)}function He(){const e=typeof globalThis>"u"?null:globalThis;return l(e)?0:p(e)}function Je(){const e=typeof self>"u"?null:self;return l(e)?0:p(e)}function Ke(){const e=typeof window>"u"?null:window;return l(e)?0:p(e)}function Xe(e,t,n){return e.subarray(t>>>0,n>>>0)}function Ye(e,t){return e.then(t)}function Ze(e,t,n){return e.then(t,n)}function et(e){return e.valueOf()}function tt(e){return e.value}function nt(e){return e.versions}function rt(e){return+e}function ot(e){return e}function _t(e){return BigInt.asUintN(64,e)}function ct(e,t){const n=t,o=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8*1,l(o)?BigInt(0):o,!0),g().setInt32(e+4*0,!l(o),!0)}function it(e){const t=e;return typeof t=="boolean"?t?1:0:2}function ut(e){const t=e.original;return t.cnt--==1?(t.a=0,!0):!1}function st(e,t,n){return V(e,t,557,P)}function ft(e,t){const n=A(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function at(e,t){return new Error(q(e,t))}function bt(e,t){return e in t}function lt(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function gt(e){return typeof e=="bigint"}function dt(e){return typeof e=="function"}function wt(e){const t=e;return typeof t=="object"&&t!==null}function pt(e){return typeof e=="string"}function xt(e){return e===void 0}function yt(e,t){return e===t}function mt(e,t){return e==t}function ht(){return r.memory}function Tt(e,t){const n=t,o=typeof n=="number"?n:void 0;g().setFloat64(e+8*1,l(o)?0:o,!0),g().setInt32(e+4*0,!l(o),!0)}function qt(e){return e}function St(e,t){const n=t,o=typeof n=="string"?n:void 0;var _=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s;g().setInt32(e+4*1,i,!0),g().setInt32(e+4*0,_,!0)}function At(e,t){return q(e,t)}function It(e,t){throw new Error(q(e,t))}0&&(module.exports={QueryEngine,__wbg_String_8f0eb39a4a4c2f66,__wbg_buffer_609cc3eee51ed158,__wbg_call_672a4d21634d4a24,__wbg_call_7cccdd69e0791ae2,__wbg_crypto_805be4ce92f1e370,__wbg_done_769e5ede4b31c67b,__wbg_entries_3265d4158b33e5dc,__wbg_getRandomValues_f6a868620c8bab49,__wbg_getTime_46267b1c24877e30,__wbg_get_67b2ba62fc30de12,__wbg_get_b9b93047fe3cf45b,__wbg_get_ece95cf6585650d9,__wbg_getwithrefkey_1dc361bd10053bfe,__wbg_has_a5ea9117f258a0ec,__wbg_instanceof_ArrayBuffer_e14585432e3737fc,__wbg_instanceof_Map_f3469ce2244d2430,__wbg_instanceof_Promise_935168b8f4b49db3,__wbg_instanceof_Uint8Array_17156bcf118086a9,__wbg_isArray_a1eab7e0d067391b,__wbg_isSafeInteger_343e2beeeece1bb0,__wbg_iterator_9a24c88df860dc65,__wbg_keys_5c77a08ddc2fb8a6,__wbg_length_a446193dc22c12f8,__wbg_length_e2d2a49132c1b256,__wbg_msCrypto_2ac4d17c4748234a,__wbg_new0_f788a2397c7ca929,__wbg_new_23a2665fac83c611,__wbg_new_405e22f390576ce2,__wbg_new_5e0be73521bc8c17,__wbg_new_78feb108b6472713,__wbg_new_a12002a7f91c75be,__wbg_newnoargs_105ed471475aaf50,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,__wbg_newwithlength_a381634e90c276d4,__wbg_next_25feadfc0913fea9,__wbg_next_6574e1a8a62d1055,__wbg_node_ecc8306b9857f33d,__wbg_now_7fd00a794a07d388,__wbg_now_807e54c39636c349,__wbg_now_b3f7572f6ef3d3a9,__wbg_process_5cff2739921be718,__wbg_push_737cfc8c1432c2c6,__wbg_queueMicrotask_5a8a9131f3f0b37b,__wbg_queueMicrotask_6d79674585219521,__wbg_randomFillSync_d3c85af7e31cf1f8,__wbg_require_0c566c6f2eef6c79,__wbg_resolve_4851785c9c5f573d,__wbg_setTimeout_5d6a1d4fc51ea450,__wbg_set_37837023f3d740e8,__wbg_set_3f1d0b984ed272ed,__wbg_set_65595bdd868b3009,__wbg_set_8fc6bf8a5b1071d1,__wbg_set_bb8cecf6a62b9f46,__wbg_set_wasm,__wbg_static_accessor_GLOBAL_88a902d13a557d07,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,__wbg_static_accessor_SELF_37c5d418e4bf5819,__wbg_static_accessor_WINDOW_5de37043a91a9c40,__wbg_subarray_aa9065fa9dc5df96,__wbg_then_44b73946d2fb3e7d,__wbg_then_48b406749878a531,__wbg_valueOf_7392193dd78c6b97,__wbg_value_cd1ffa7b1ab794f1,__wbg_versions_a8e5a362e1f16442,__wbindgen_as_number,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper7495,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_init_externref_table,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo});
@@ -1,2 +1,2 @@
1
1
  var y=()=>{};y.prototype=y;let r;function N(e){r=e}let s=0,m=null;function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(r.memory.buffer)),m}const j=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let T=new j("utf-8");const k=typeof T.encodeInto=="function"?function(e,t){return T.encodeInto(e,t)}:function(e,t){const n=T.encode(e);return t.set(n),{read:e.length,written:n.length}};function f(e,t,n){if(n===void 0){const u=T.encode(e),a=t(u.length,1)>>>0;return h().subarray(a,a+u.length).set(u),s=u.length,a}let o=e.length,_=t(o,1)>>>0;const i=h();let c=0;for(;c<o;c++){const u=e.charCodeAt(c);if(u>127)break;i[_+c]=u}if(c!==o){c!==0&&(e=e.slice(c)),_=n(_,o,o=c+e.length*3,1)>>>0;const u=h().subarray(_+c,_+o),a=k(e,u);c+=a.written,_=n(_,o,c,1)>>>0}return s=c,_}let w=null;function g(){return(w===null||w.buffer.detached===!0||w.buffer.detached===void 0&&w.buffer!==r.memory.buffer)&&(w=new DataView(r.memory.buffer)),w}function p(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function b(e,t){try{return e.apply(this,t)}catch(n){const o=p(n);r.__wbindgen_exn_store(o)}}const D=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let A=new D("utf-8",{ignoreBOM:!0,fatal:!0});A.decode();function q(e,t){return e=e>>>0,A.decode(h().subarray(e,e+t))}function l(e){return e==null}const I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{r.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function R(e,t,n,o){const _={a:e,b:t,cnt:1,dtor:n},i=(...c)=>{_.cnt++;const u=_.a;_.a=0;try{return o(u,_.b,...c)}finally{--_.cnt===0?(r.__wbindgen_export_5.get(_.dtor)(u,_.b),I.unregister(_)):_.a=u}};return i.original=_,I.register(i,_,_),i}function S(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const _=e.description;return _==null?"Symbol":`Symbol(${_})`}if(t=="function"){const _=e.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(e)){const _=e.length;let i="[";_>0&&(i+=S(e[0]));for(let c=1;c<_;c++)i+=", "+S(e[c]);return i+="]",i}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let o;if(n&&n.length>1)o=n[1];else return toString.call(e);if(o=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
- ${e.stack}`:o}function E(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function $(){return r.getBuildTimeInfo()}function C(e){var t=l(e)?0:f(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=s;const o=r.debug_panic(t,n);if(o[1])throw E(o[0])}function B(e,t,n){r.closure556_externref_shim(e,t,n)}function U(e,t,n,o){r.closure134_externref_shim(e,t,n,o)}const O=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_queryengine_free(e>>>0,1));class V{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_queryengine_free(t,0)}constructor(t,n,o){const _=r.queryengine_new(t,n,o);if(_[2])throw E(_[1]);return this.__wbg_ptr=_[0]>>>0,O.register(this,this.__wbg_ptr,this),this}connect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_connect(this.__wbg_ptr,o,_,i,c)}disconnect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_disconnect(this.__wbg_ptr,o,_,i,c)}query(t,n,o,_){const i=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s,u=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),a=s;var d=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),x=s;const F=f(_,r.__wbindgen_malloc,r.__wbindgen_realloc),M=s;return r.queryengine_query(this.__wbg_ptr,i,c,u,a,d,x,F,M)}startTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_startTransaction(this.__wbg_ptr,_,i,c,u,a,d)}commitTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_commitTransaction(this.__wbg_ptr,_,i,c,u,a,d)}rollbackTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_rollbackTransaction(this.__wbg_ptr,_,i,c,u,a,d)}metrics(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_metrics(this.__wbg_ptr,n,o)}trace(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_trace(this.__wbg_ptr,n,o)}}function z(e,t){const n=String(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function W(e){return e.buffer}function P(){return b(function(e,t){return e.call(t)},arguments)}function G(){return b(function(e,t,n){return e.call(t,n)},arguments)}function Q(e){return e.crypto}function H(e){return e.done}function J(e){return Object.entries(e)}function K(){return b(function(e,t){e.getRandomValues(t)},arguments)}function X(e){return e.getTime()}function Y(){return b(function(e,t){return Reflect.get(e,t)},arguments)}function Z(e,t){return e[t>>>0]}function ee(){return b(function(e,t){return e[t]},arguments)}function te(e,t){return e[t]}function ne(){return b(function(e,t){return Reflect.has(e,t)},arguments)}function re(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function oe(e){let t;try{t=e instanceof Map}catch{t=!1}return t}function _e(e){let t;try{t=e instanceof Promise}catch{t=!1}return t}function ce(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function ie(e){return Array.isArray(e)}function ue(e){return Number.isSafeInteger(e)}function se(){return Symbol.iterator}function fe(e){return Object.keys(e)}function ae(e){return e.length}function be(e){return e.length}function le(e){return e.msCrypto}function ge(){return new Date}function de(e,t){try{var n={a:e,b:t},o=(i,c)=>{const u=n.a;n.a=0;try{return U(u,n.b,i,c)}finally{n.a=u}};return new Promise(o)}finally{n.a=n.b=0}}function we(){return new Object}function pe(){return new Map}function xe(){return new Array}function ye(e){return new Uint8Array(e)}function me(e,t){return new y(q(e,t))}function he(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Te(e){return new Uint8Array(e>>>0)}function qe(e){return e.next}function Se(){return b(function(e){return e.next()},arguments)}function Ae(e){return e.node}function Ie(e){return e.now()}function Ee(){return Date.now()}function Oe(){return b(function(){return Date.now()},arguments)}function Fe(e){return e.process}function Me(e,t){return e.push(t)}function je(e){return e.queueMicrotask}function ke(e){queueMicrotask(e)}function De(){return b(function(e,t){e.randomFillSync(t)},arguments)}function Re(){return b(function(){return module.require},arguments)}function Be(e){return Promise.resolve(e)}function Ue(e,t){return setTimeout(e,t>>>0)}function Le(e,t,n){e[t>>>0]=n}function ve(e,t,n){e[t]=n}function Ne(e,t,n){e.set(t,n>>>0)}function $e(e,t,n){return e.set(t,n)}function Ce(){return b(function(e,t,n){return Reflect.set(e,t,n)},arguments)}function Ve(){const e=typeof global>"u"?null:global;return l(e)?0:p(e)}function ze(){const e=typeof globalThis>"u"?null:globalThis;return l(e)?0:p(e)}function We(){const e=typeof self>"u"?null:self;return l(e)?0:p(e)}function Pe(){const e=typeof window>"u"?null:window;return l(e)?0:p(e)}function Ge(e,t,n){return e.subarray(t>>>0,n>>>0)}function Qe(e,t){return e.then(t)}function He(e,t,n){return e.then(t,n)}function Je(e){return e.valueOf()}function Ke(e){return e.value}function Xe(e){return e.versions}function Ye(e){return+e}function Ze(e){return e}function et(e){return BigInt.asUintN(64,e)}function tt(e,t){const n=t,o=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8*1,l(o)?BigInt(0):o,!0),g().setInt32(e+4*0,!l(o),!0)}function nt(e){const t=e;return typeof t=="boolean"?t?1:0:2}function rt(e){const t=e.original;return t.cnt--==1?(t.a=0,!0):!1}function ot(e,t,n){return R(e,t,557,B)}function _t(e,t){const n=S(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function ct(e,t){return new Error(q(e,t))}function it(e,t){return e in t}function ut(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function st(e){return typeof e=="bigint"}function ft(e){return typeof e=="function"}function at(e){const t=e;return typeof t=="object"&&t!==null}function bt(e){return typeof e=="string"}function lt(e){return e===void 0}function gt(e,t){return e===t}function dt(e,t){return e==t}function wt(){return r.memory}function pt(e,t){const n=t,o=typeof n=="number"?n:void 0;g().setFloat64(e+8*1,l(o)?0:o,!0),g().setInt32(e+4*0,!l(o),!0)}function xt(e){return e}function yt(e,t){const n=t,o=typeof n=="string"?n:void 0;var _=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s;g().setInt32(e+4*1,i,!0),g().setInt32(e+4*0,_,!0)}function mt(e,t){return q(e,t)}function ht(e,t){throw new Error(q(e,t))}export{V as QueryEngine,z as __wbg_String_8f0eb39a4a4c2f66,W as __wbg_buffer_609cc3eee51ed158,P as __wbg_call_672a4d21634d4a24,G as __wbg_call_7cccdd69e0791ae2,Q as __wbg_crypto_805be4ce92f1e370,H as __wbg_done_769e5ede4b31c67b,J as __wbg_entries_3265d4158b33e5dc,K as __wbg_getRandomValues_f6a868620c8bab49,X as __wbg_getTime_46267b1c24877e30,Y as __wbg_get_67b2ba62fc30de12,Z as __wbg_get_b9b93047fe3cf45b,ee as __wbg_get_ece95cf6585650d9,te as __wbg_getwithrefkey_1dc361bd10053bfe,ne as __wbg_has_a5ea9117f258a0ec,re as __wbg_instanceof_ArrayBuffer_e14585432e3737fc,oe as __wbg_instanceof_Map_f3469ce2244d2430,_e as __wbg_instanceof_Promise_935168b8f4b49db3,ce as __wbg_instanceof_Uint8Array_17156bcf118086a9,ie as __wbg_isArray_a1eab7e0d067391b,ue as __wbg_isSafeInteger_343e2beeeece1bb0,se as __wbg_iterator_9a24c88df860dc65,fe as __wbg_keys_5c77a08ddc2fb8a6,ae as __wbg_length_a446193dc22c12f8,be as __wbg_length_e2d2a49132c1b256,le as __wbg_msCrypto_2ac4d17c4748234a,ge as __wbg_new0_f788a2397c7ca929,de as __wbg_new_23a2665fac83c611,we as __wbg_new_405e22f390576ce2,pe as __wbg_new_5e0be73521bc8c17,xe as __wbg_new_78feb108b6472713,ye as __wbg_new_a12002a7f91c75be,me as __wbg_newnoargs_105ed471475aaf50,he as __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,Te as __wbg_newwithlength_a381634e90c276d4,qe as __wbg_next_25feadfc0913fea9,Se as __wbg_next_6574e1a8a62d1055,Ae as __wbg_node_ecc8306b9857f33d,Ie as __wbg_now_7fd00a794a07d388,Ee as __wbg_now_807e54c39636c349,Oe as __wbg_now_b3f7572f6ef3d3a9,Fe as __wbg_process_5cff2739921be718,Me as __wbg_push_737cfc8c1432c2c6,je as __wbg_queueMicrotask_5a8a9131f3f0b37b,ke as __wbg_queueMicrotask_6d79674585219521,De as __wbg_randomFillSync_d3c85af7e31cf1f8,Re as __wbg_require_0c566c6f2eef6c79,Be as __wbg_resolve_4851785c9c5f573d,Ue as __wbg_setTimeout_5d6a1d4fc51ea450,Le as __wbg_set_37837023f3d740e8,ve as __wbg_set_3f1d0b984ed272ed,Ne as __wbg_set_65595bdd868b3009,$e as __wbg_set_8fc6bf8a5b1071d1,Ce as __wbg_set_bb8cecf6a62b9f46,N as __wbg_set_wasm,Ve as __wbg_static_accessor_GLOBAL_88a902d13a557d07,ze as __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,We as __wbg_static_accessor_SELF_37c5d418e4bf5819,Pe as __wbg_static_accessor_WINDOW_5de37043a91a9c40,Ge as __wbg_subarray_aa9065fa9dc5df96,Qe as __wbg_then_44b73946d2fb3e7d,He as __wbg_then_48b406749878a531,Je as __wbg_valueOf_7392193dd78c6b97,Ke as __wbg_value_cd1ffa7b1ab794f1,Xe as __wbg_versions_a8e5a362e1f16442,Ye as __wbindgen_as_number,Ze as __wbindgen_bigint_from_i64,et as __wbindgen_bigint_from_u64,tt as __wbindgen_bigint_get_as_i64,nt as __wbindgen_boolean_get,rt as __wbindgen_cb_drop,ot as __wbindgen_closure_wrapper7501,_t as __wbindgen_debug_string,ct as __wbindgen_error_new,it as __wbindgen_in,ut as __wbindgen_init_externref_table,st as __wbindgen_is_bigint,ft as __wbindgen_is_function,at as __wbindgen_is_object,bt as __wbindgen_is_string,lt as __wbindgen_is_undefined,gt as __wbindgen_jsval_eq,dt as __wbindgen_jsval_loose_eq,wt as __wbindgen_memory,pt as __wbindgen_number_get,xt as __wbindgen_number_new,yt as __wbindgen_string_get,mt as __wbindgen_string_new,ht as __wbindgen_throw,C as debug_panic,$ as getBuildTimeInfo};
2
+ ${e.stack}`:o}function E(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function $(){return r.getBuildTimeInfo()}function C(e){var t=l(e)?0:f(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=s;const o=r.debug_panic(t,n);if(o[1])throw E(o[0])}function B(e,t,n){r.closure556_externref_shim(e,t,n)}function U(e,t,n,o){r.closure134_externref_shim(e,t,n,o)}const O=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_queryengine_free(e>>>0,1));class V{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_queryengine_free(t,0)}constructor(t,n,o){const _=r.queryengine_new(t,n,o);if(_[2])throw E(_[1]);return this.__wbg_ptr=_[0]>>>0,O.register(this,this.__wbg_ptr,this),this}connect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_connect(this.__wbg_ptr,o,_,i,c)}disconnect(t,n){const o=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s,i=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s;return r.queryengine_disconnect(this.__wbg_ptr,o,_,i,c)}query(t,n,o,_){const i=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=s,u=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),a=s;var d=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),x=s;const F=f(_,r.__wbindgen_malloc,r.__wbindgen_realloc),M=s;return r.queryengine_query(this.__wbg_ptr,i,c,u,a,d,x,F,M)}startTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_startTransaction(this.__wbg_ptr,_,i,c,u,a,d)}commitTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_commitTransaction(this.__wbg_ptr,_,i,c,u,a,d)}rollbackTransaction(t,n,o){const _=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s,c=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=s,a=f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),d=s;return r.queryengine_rollbackTransaction(this.__wbg_ptr,_,i,c,u,a,d)}metrics(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_metrics(this.__wbg_ptr,n,o)}trace(t){const n=f(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=s;return r.queryengine_trace(this.__wbg_ptr,n,o)}}function z(e,t){const n=String(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function W(e){return e.buffer}function P(){return b(function(e,t){return e.call(t)},arguments)}function G(){return b(function(e,t,n){return e.call(t,n)},arguments)}function Q(e){return e.crypto}function H(e){return e.done}function J(e){return Object.entries(e)}function K(){return b(function(e,t){e.getRandomValues(t)},arguments)}function X(e){return e.getTime()}function Y(){return b(function(e,t){return Reflect.get(e,t)},arguments)}function Z(e,t){return e[t>>>0]}function ee(){return b(function(e,t){return e[t]},arguments)}function te(e,t){return e[t]}function ne(){return b(function(e,t){return Reflect.has(e,t)},arguments)}function re(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function oe(e){let t;try{t=e instanceof Map}catch{t=!1}return t}function _e(e){let t;try{t=e instanceof Promise}catch{t=!1}return t}function ce(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function ie(e){return Array.isArray(e)}function ue(e){return Number.isSafeInteger(e)}function se(){return Symbol.iterator}function fe(e){return Object.keys(e)}function ae(e){return e.length}function be(e){return e.length}function le(e){return e.msCrypto}function ge(){return new Date}function de(e,t){try{var n={a:e,b:t},o=(i,c)=>{const u=n.a;n.a=0;try{return U(u,n.b,i,c)}finally{n.a=u}};return new Promise(o)}finally{n.a=n.b=0}}function we(){return new Object}function pe(){return new Map}function xe(){return new Array}function ye(e){return new Uint8Array(e)}function me(e,t){return new y(q(e,t))}function he(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Te(e){return new Uint8Array(e>>>0)}function qe(e){return e.next}function Se(){return b(function(e){return e.next()},arguments)}function Ae(e){return e.node}function Ie(e){return e.now()}function Ee(){return Date.now()}function Oe(){return b(function(){return Date.now()},arguments)}function Fe(e){return e.process}function Me(e,t){return e.push(t)}function je(e){return e.queueMicrotask}function ke(e){queueMicrotask(e)}function De(){return b(function(e,t){e.randomFillSync(t)},arguments)}function Re(){return b(function(){return module.require},arguments)}function Be(e){return Promise.resolve(e)}function Ue(e,t){return setTimeout(e,t>>>0)}function Le(e,t,n){e[t>>>0]=n}function ve(e,t,n){e[t]=n}function Ne(e,t,n){e.set(t,n>>>0)}function $e(e,t,n){return e.set(t,n)}function Ce(){return b(function(e,t,n){return Reflect.set(e,t,n)},arguments)}function Ve(){const e=typeof global>"u"?null:global;return l(e)?0:p(e)}function ze(){const e=typeof globalThis>"u"?null:globalThis;return l(e)?0:p(e)}function We(){const e=typeof self>"u"?null:self;return l(e)?0:p(e)}function Pe(){const e=typeof window>"u"?null:window;return l(e)?0:p(e)}function Ge(e,t,n){return e.subarray(t>>>0,n>>>0)}function Qe(e,t){return e.then(t)}function He(e,t,n){return e.then(t,n)}function Je(e){return e.valueOf()}function Ke(e){return e.value}function Xe(e){return e.versions}function Ye(e){return+e}function Ze(e){return e}function et(e){return BigInt.asUintN(64,e)}function tt(e,t){const n=t,o=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8*1,l(o)?BigInt(0):o,!0),g().setInt32(e+4*0,!l(o),!0)}function nt(e){const t=e;return typeof t=="boolean"?t?1:0:2}function rt(e){const t=e.original;return t.cnt--==1?(t.a=0,!0):!1}function ot(e,t,n){return R(e,t,557,B)}function _t(e,t){const n=S(t),o=f(n,r.__wbindgen_malloc,r.__wbindgen_realloc),_=s;g().setInt32(e+4*1,_,!0),g().setInt32(e+4*0,o,!0)}function ct(e,t){return new Error(q(e,t))}function it(e,t){return e in t}function ut(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function st(e){return typeof e=="bigint"}function ft(e){return typeof e=="function"}function at(e){const t=e;return typeof t=="object"&&t!==null}function bt(e){return typeof e=="string"}function lt(e){return e===void 0}function gt(e,t){return e===t}function dt(e,t){return e==t}function wt(){return r.memory}function pt(e,t){const n=t,o=typeof n=="number"?n:void 0;g().setFloat64(e+8*1,l(o)?0:o,!0),g().setInt32(e+4*0,!l(o),!0)}function xt(e){return e}function yt(e,t){const n=t,o=typeof n=="string"?n:void 0;var _=l(o)?0:f(o,r.__wbindgen_malloc,r.__wbindgen_realloc),i=s;g().setInt32(e+4*1,i,!0),g().setInt32(e+4*0,_,!0)}function mt(e,t){return q(e,t)}function ht(e,t){throw new Error(q(e,t))}export{V as QueryEngine,z as __wbg_String_8f0eb39a4a4c2f66,W as __wbg_buffer_609cc3eee51ed158,P as __wbg_call_672a4d21634d4a24,G as __wbg_call_7cccdd69e0791ae2,Q as __wbg_crypto_805be4ce92f1e370,H as __wbg_done_769e5ede4b31c67b,J as __wbg_entries_3265d4158b33e5dc,K as __wbg_getRandomValues_f6a868620c8bab49,X as __wbg_getTime_46267b1c24877e30,Y as __wbg_get_67b2ba62fc30de12,Z as __wbg_get_b9b93047fe3cf45b,ee as __wbg_get_ece95cf6585650d9,te as __wbg_getwithrefkey_1dc361bd10053bfe,ne as __wbg_has_a5ea9117f258a0ec,re as __wbg_instanceof_ArrayBuffer_e14585432e3737fc,oe as __wbg_instanceof_Map_f3469ce2244d2430,_e as __wbg_instanceof_Promise_935168b8f4b49db3,ce as __wbg_instanceof_Uint8Array_17156bcf118086a9,ie as __wbg_isArray_a1eab7e0d067391b,ue as __wbg_isSafeInteger_343e2beeeece1bb0,se as __wbg_iterator_9a24c88df860dc65,fe as __wbg_keys_5c77a08ddc2fb8a6,ae as __wbg_length_a446193dc22c12f8,be as __wbg_length_e2d2a49132c1b256,le as __wbg_msCrypto_2ac4d17c4748234a,ge as __wbg_new0_f788a2397c7ca929,de as __wbg_new_23a2665fac83c611,we as __wbg_new_405e22f390576ce2,pe as __wbg_new_5e0be73521bc8c17,xe as __wbg_new_78feb108b6472713,ye as __wbg_new_a12002a7f91c75be,me as __wbg_newnoargs_105ed471475aaf50,he as __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,Te as __wbg_newwithlength_a381634e90c276d4,qe as __wbg_next_25feadfc0913fea9,Se as __wbg_next_6574e1a8a62d1055,Ae as __wbg_node_ecc8306b9857f33d,Ie as __wbg_now_7fd00a794a07d388,Ee as __wbg_now_807e54c39636c349,Oe as __wbg_now_b3f7572f6ef3d3a9,Fe as __wbg_process_5cff2739921be718,Me as __wbg_push_737cfc8c1432c2c6,je as __wbg_queueMicrotask_5a8a9131f3f0b37b,ke as __wbg_queueMicrotask_6d79674585219521,De as __wbg_randomFillSync_d3c85af7e31cf1f8,Re as __wbg_require_0c566c6f2eef6c79,Be as __wbg_resolve_4851785c9c5f573d,Ue as __wbg_setTimeout_5d6a1d4fc51ea450,Le as __wbg_set_37837023f3d740e8,ve as __wbg_set_3f1d0b984ed272ed,Ne as __wbg_set_65595bdd868b3009,$e as __wbg_set_8fc6bf8a5b1071d1,Ce as __wbg_set_bb8cecf6a62b9f46,N as __wbg_set_wasm,Ve as __wbg_static_accessor_GLOBAL_88a902d13a557d07,ze as __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,We as __wbg_static_accessor_SELF_37c5d418e4bf5819,Pe as __wbg_static_accessor_WINDOW_5de37043a91a9c40,Ge as __wbg_subarray_aa9065fa9dc5df96,Qe as __wbg_then_44b73946d2fb3e7d,He as __wbg_then_48b406749878a531,Je as __wbg_valueOf_7392193dd78c6b97,Ke as __wbg_value_cd1ffa7b1ab794f1,Xe as __wbg_versions_a8e5a362e1f16442,Ye as __wbindgen_as_number,Ze as __wbindgen_bigint_from_i64,et as __wbindgen_bigint_from_u64,tt as __wbindgen_bigint_get_as_i64,nt as __wbindgen_boolean_get,rt as __wbindgen_cb_drop,ot as __wbindgen_closure_wrapper7495,_t as __wbindgen_debug_string,ct as __wbindgen_error_new,it as __wbindgen_in,ut as __wbindgen_init_externref_table,st as __wbindgen_is_bigint,ft as __wbindgen_is_function,at as __wbindgen_is_object,bt as __wbindgen_is_string,lt as __wbindgen_is_undefined,gt as __wbindgen_jsval_eq,dt as __wbindgen_jsval_loose_eq,wt as __wbindgen_memory,pt as __wbindgen_number_get,xt as __wbindgen_number_new,yt as __wbindgen_string_get,mt as __wbindgen_string_new,ht as __wbindgen_throw,C as debug_panic,$ as getBuildTimeInfo};